[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC XEN PATCH 12/23] Build guest_walk* in arch/x86/mm


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Wed, 23 Oct 2019 17:48:26 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@xxxxxxxxxx; spf=Pass smtp.mailfrom=anthony.perard@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 23 Oct 2019 17:10:53 +0000
  • Ironport-sdr: +vtZqGqoUm+raEUwmCYorwR5lLkJvtnxHL6GOlH02ToyVPuhlp6CN/rMtAxm3EQq/Oh+dxF0Kg GlULQncaiYML4ewBQPHhFmw8vsrbrSSzXV8ZVbJm1hBWbnZvDaMdHULQBv24F63GjPl5sZM7qS 5ZxtrtueXqH188ECo187yBJTqLsIrXYijcPicDz94AeUecTNmZ1XE0PppE0TJIwHPEqV3fXzSq hRwyenidytqVGa72OZRnY/CQpHA9HQyQB6CgKhxUbj2aSsjXs5SEk4gNhxgbtusp8+HWAgFYvP mx0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Rewrite the rules to build the different level of guest page walk so
the work and use Kbuild functions.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 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)
-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.