]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
x86: convert shadow-paging to Kconfig
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 1 Feb 2016 12:54:46 +0000 (13:54 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 1 Feb 2016 12:54:46 +0000 (13:54 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/Kconfig
xen/arch/x86/Rules.mk
xen/arch/x86/mm/shadow/Makefile

index 4781b34f787f019ba29b2b762a61ca5163640c28..1fd72fab63c73ca54b7696d53d2f9117d3b3ae32 100644 (file)
@@ -27,6 +27,24 @@ menu "Architecture Features"
 
 source "arch/Kconfig"
 
+config SHADOW_PAGING
+        bool "Shadow Paging"
+        default y
+        ---help---
+
+          Shadow paging is a software alternative to hardware paging support
+          (Intel EPT, AMD NPT).
+
+          It is required for:
+            * Running HVM guests on hardware lacking hardware paging support
+              (First-generation Intel VT-x or AMD SVM).
+            * Live migration of PV guests.
+
+          Under a small number of specific workloads, shadow paging may be
+          deliberately used as a performance optimisation.
+
+          If unsure, say Y.
+
 config BIGMEM
        bool "big memory support"
        default n
index a108d24a354aa4fa79cbf27f0ee49568384297ac..a1cdae04e8d58672bb2bd0d02e9d3658eab1044a 100644 (file)
@@ -22,13 +22,9 @@ $(call as-insn-check,CFLAGS,CC,".equ \"x\"$$(comma)1", \
                      -U__OBJECT_LABEL__ -DHAVE_GAS_QUOTED_SYM \
                      '-D__OBJECT_LABEL__=$(subst $(BASEDIR)/,,$(CURDIR))/$$@')
 
-shadow-paging ?= y
-
 CFLAGS += -mno-red-zone -mno-sse -fpic
 CFLAGS += -fno-asynchronous-unwind-tables
 # -fvisibility=hidden reduces -fpic cost, if it's available
 ifneq ($(call cc-option,$(CC),-fvisibility=hidden,n),n)
 CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
 endif
-
-CFLAGS-$(shadow-paging) += -DCONFIG_SHADOW_PAGING
index a07bc0cf4a941ffc671839b9521f0cd50236b6aa..cd4ec8a36b344dbdbbc7aff5c4e31f5e3ea3ff88 100644 (file)
@@ -1,4 +1,4 @@
-ifeq ($(shadow-paging),y)
+ifeq ($(CONFIG_SHADOW_PAGING),y)
 obj-y += common.o guest_2.o guest_3.o guest_4.o
 else
 obj-y += none.o