All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Convert shadow-paging to Kconfig
@ 2016-01-18 18:40 Andrew Cooper
  2016-01-18 22:53 ` Doug Goldstein
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Andrew Cooper @ 2016-01-18 18:40 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Doug Goldstein, Jan Beulich

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Doug Goldstein <cardoe@cardoe.com>
---
 xen/arch/x86/Kconfig            | 14 ++++++++++++++
 xen/arch/x86/Rules.mk           |  4 ----
 xen/arch/x86/mm/shadow/Makefile |  2 +-
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 4781b34..9869630 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -27,6 +27,20 @@ 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) for use with HVM guests.
+
+          It is required to run HVM guests for first-generation hardware
+          virtualisation (Intel VT-x, AMD SVM) which did not include hardware
+          paging support.  Under a small number of specific workloads, shadow
+          paging may also be deliberately used as a performance improvement.
+
+          If unsure, say Y.
+
 config BIGMEM
 	bool "big memory support"
 	default n
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index a108d24..a1cdae0 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -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
diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makefile
index a07bc0c..df194ad 100644
--- a/xen/arch/x86/mm/shadow/Makefile
+++ b/xen/arch/x86/mm/shadow/Makefile
@@ -1,4 +1,4 @@
-ifeq ($(shadow-paging),y)
+ifdef CONFIG_SHADOW_PAGING
 obj-y += common.o guest_2.o guest_3.o guest_4.o
 else
 obj-y += none.o
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [PATCH] x86: Convert shadow-paging to Kconfig
@ 2016-01-29 18:20 Andrew Cooper
  2016-01-29 21:46 ` Doug Goldstein
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Andrew Cooper @ 2016-01-29 18:20 UTC (permalink / raw)
  To: Xen-devel
  Cc: George Dunlap, Andrew Cooper, Doug Goldstein, Jan Beulich, Tim Deegan

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Doug Goldstein <cardoe@cardoe.com>
CC: Tim Deegan <tim@xen.org>
CC: George Dunlap <george.dunlap@eu.citrix.com>

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(-)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 4781b34..1fd72fa 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -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
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index a108d24..a1cdae0 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -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
diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makefile
index a07bc0c..cd4ec8a 100644
--- a/xen/arch/x86/mm/shadow/Makefile
+++ b/xen/arch/x86/mm/shadow/Makefile
@@ -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
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-02-02 11:39 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-18 18:40 [PATCH] x86: Convert shadow-paging to Kconfig Andrew Cooper
2016-01-18 22:53 ` Doug Goldstein
2016-01-19  9:46 ` Ian Campbell
2016-01-19 13:23   ` Jan Beulich
2016-01-19 13:30     ` Andrew Cooper
2016-01-19 13:38       ` Jan Beulich
2016-01-19 13:47         ` Andrew Cooper
2016-01-19 13:39   ` Andrew Cooper
2016-01-19 13:50     ` Ian Campbell
2016-01-19 13:54       ` Andrew Cooper
2016-01-19 13:46   ` Tim Deegan
2016-01-19 13:51     ` Andrew Cooper
2016-01-19 13:27 ` Jan Beulich
2016-01-19 13:33   ` Andrew Cooper
2016-01-19 13:39     ` Jan Beulich
2016-01-29 18:20 Andrew Cooper
2016-01-29 21:46 ` Doug Goldstein
2016-02-01  9:54 ` Tim Deegan
2016-02-02 11:39 ` George Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.