x86: Convert shadow-paging to Kconfig
PATCH 1/1 x86: Convert shadow-paging to Kconfig
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Doug Goldstein <[email protected]>
CC: Tim Deegan <[email protected]>
CC: George Dunlap <[email protected]>
v2:
* Expand text. Use more-common makefile syntax
--- xen/arch/x86/Kconfig | 18 ++++++++++++++++++ xen/arch/x86/Rules.mk | 4 ---- xen/arch/x86/mm/shadow/Makefile | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-)
xen/arch/x86/Kconfig +18 -0
@@ -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
xen/arch/x86/Rules.mk +0 -4
@@ -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
xen/arch/x86/mm/shadow/Makefile +1 -1
@@ -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
Signature · 1 line
2.1.4
Quoted 68 lines · Andrew Cooper
Signed-off-by Andrew Cooper <[email protected]>---
CC: Jan Beulich <[email protected]>
CC: Doug Goldstein <[email protected]>
CC: Tim Deegan <[email protected]>
CC: George Dunlap <[email protected]>v2:
* Expand text. Use more-common makefile syntax--- xen/arch/x86/Kconfig | 18 ++++++++++++++++++ xen/arch/x86/Rules.mk | 4 ---- xen/arch/x86/mm/shadow/Makefile | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-)xen/arch/x86/Kconfig +18
-0@@ -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 nxen/arch/x86/Rules.mk +0
-4@@ -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_PAGINGxen/arch/x86/mm/shadow/Makefile +0
-0
xen/arch/x86/mm/shadow/Makefile line 4
Quoted 5 lines
xen/arch/x86/mm/shadow/Makefile +1
-1@@ -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
Reviewed-by Doug Goldstein <[email protected]>
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 1 line · Andrew Cooper
Signed-off-by Andrew Cooper <[email protected]>
Acked-by Tim Deegan <[email protected]>
Quoted 6 lines · Andrew Cooper
Signed-off-by Andrew Cooper <[email protected]>---
CC: Jan Beulich <[email protected]>
CC: Doug Goldstein <[email protected]>
CC: Tim Deegan <[email protected]>
CC: George Dunlap <[email protected]>
Acked-by George Dunlap <[email protected]>