From patchwork Wed Oct 23 16:48:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 11207263 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C2BD112C for ; Wed, 23 Oct 2019 17:12:00 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 677B120640 for ; Wed, 23 Oct 2019 17:12:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="O1sYz/uz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 677B120640 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iNK9s-0002iy-VP; Wed, 23 Oct 2019 17:10:52 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iNK9r-0002hy-In for xen-devel@lists.xenproject.org; Wed, 23 Oct 2019 17:10:51 +0000 X-Inumbo-ID: 0a0723dc-f5b8-11e9-beca-bc764e2007e4 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0a0723dc-f5b8-11e9-beca-bc764e2007e4; Wed, 23 Oct 2019 17:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1571850640; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YbA9SI4dXaBhkfGcxHlkutqpTm/GLo57nNWGOBv7ixE=; b=O1sYz/uz9u0cRepLg++FbFXDC/d24B/rJDBkx1o6e43ROlII1kjoTcZB 5AeUM4HvZ2JHwjkRwHPXDcIQODfimc30enM/z/GLMY8j2gwhdH/2vGdGW YK3dOSWOfwYi85AIZPTX3GUteP7vHO6SMJ3TRaAp2E14IrjY1xya95F6u o=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: +vtZqGqoUm+raEUwmCYorwR5lLkJvtnxHL6GOlH02ToyVPuhlp6CN/rMtAxm3EQq/Oh+dxF0Kg GlULQncaiYML4ewBQPHhFmw8vsrbrSSzXV8ZVbJm1hBWbnZvDaMdHULQBv24F63GjPl5sZM7qS 5ZxtrtueXqH188ECo187yBJTqLsIrXYijcPicDz94AeUecTNmZ1XE0PppE0TJIwHPEqV3fXzSq hRwyenidytqVGa72OZRnY/CQpHA9HQyQB6CgKhxUbj2aSsjXs5SEk4gNhxgbtusp8+HWAgFYvP mx0= X-SBRS: 2.7 X-MesageID: 7683600 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.68,221,1569297600"; d="scan'208";a="7683600" From: Anthony PERARD To: Date: Wed, 23 Oct 2019 17:48:26 +0100 Message-ID: <20191023164837.2700240-13-anthony.perard@citrix.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191023164837.2700240-1-anthony.perard@citrix.com> References: <20191023164837.2700240-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [RFC XEN PATCH 12/23] Build guest_walk* in arch/x86/mm X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Rewrite the rules to build the different level of guest page walk so the work and use Kbuild functions. Signed-off-by: Anthony PERARD --- xen/arch/x86/mm/Makefile | 14 +++++++------- xen/arch/x86/mm/hap/Makefile | 14 +++++++------- xen/arch/x86/mm/shadow/Makefile | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index d87dc0aa6eeb..9c6d14c2fabb 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -11,11 +11,11 @@ obj-y += p2m.o p2m-pt.o obj-$(CONFIG_HVM) += p2m-ept.o p2m-pod.o obj-y += paging.o -guest_walk_%.o: guest_walk.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ +$(foreach sfx,o i s,$(obj)/guest_walk_%.$(sfx)): ccflags-y = -DGUEST_PAGING_LEVELS=$* -guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_walk_%.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -S $< -o $@ +$(obj)/guest_walk_%.o: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cc_o_c) +$(obj)/guest_walk_%.i: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cpp_i_c) +$(obj)/guest_walk_%.s: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cc_s_c) diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile index b14a9aff93d2..a0da2bfe77e6 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -5,11 +5,11 @@ obj-y += guest_walk_4level.o obj-y += nested_hap.o obj-y += nested_ept.o -guest_walk_%level.o: guest_walk.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ +$(foreach sfx,o i s,$(obj)/guest_walk_%level.$(sfx)): ccflags-y = -DGUEST_PAGING_LEVELS=$* -guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_walk_%level.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -S $< -o $@ +$(obj)/guest_walk_%level.o: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cc_o_c) +$(obj)/guest_walk_%level.i: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cpp_i_c) +$(obj)/guest_walk_%level.s: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cc_s_c) diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makefile index ff03a9937f9b..8c264fab7fda 100644 --- a/xen/arch/x86/mm/shadow/Makefile +++ b/xen/arch/x86/mm/shadow/Makefile @@ -6,11 +6,11 @@ else obj-y += none.o endif -guest_%.o: multi.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ +$(foreach sfx,o i s,$(obj)/guest_%.$(sfx)): ccflags-y = -DGUEST_PAGING_LEVELS=$* -guest_%.i: multi.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_%.s: multi.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -S $< -o $@ +$(obj)/guest_%.o: $(src)/multi.c FORCE + $(call if_changed_dep,cc_o_c) +$(obj)/guest_%.i: $(src)/multi.c FORCE + $(call if_changed_dep,cpp_i_c) +$(obj)/guest_%.s: $(src)/multi.c FORCE + $(call if_changed_dep,cc_s_c)