xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: [PATCH] [RFC] x86/kconfig: Introduce CONFIG_PV and CONFIG_HVM
Date: Wed, 15 Feb 2017 19:41:45 +0000	[thread overview]
Message-ID: <1487187705-24445-8-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1487187705-24445-1-git-send-email-andrew.cooper3@citrix.com>

Making PV and HVM guests individually compilable is useful as a reduction in
hypervisor size, and as an aid to enforcing clean API boundaries.

Introduce CONFIG_PV and CONFIG_HVM, although there is a lot of work to do
until either can actually be disabled.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
---
 xen/arch/x86/Kconfig               | 68 ++++++++++++++++++++++++++++----------
 xen/arch/x86/Makefile              |  4 +--
 xen/tools/kconfig/allrandom.config |  4 +++
 3 files changed, 56 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 96ca2bf..87b03f3 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -32,6 +32,56 @@ menu "Architecture Features"
 
 source "arch/Kconfig"
 
+config PV
+	def_bool y
+	prompt "PV guest support" if EXPERT = "y"
+	depends on X86
+	---help---
+	  Support for Xen Paravirtual guests.
+
+	  Xen PV guests use Ring Deprivileging as a method of virtualisation.
+	  This requires no specific hardware support, but does require an OS
+	  capable of running PV under Xen.
+
+	  If unsure, say Y.
+
+	  TODO: This is a work in process, and Xen doesn't currently compile
+	  if this option is disabled.
+
+config HVM
+	def_bool y
+	prompt "HVM guest support" if EXPERT = "y"
+	depends on X86
+	---help---
+	  Support for Xen Hardware Virtual Machine guests.
+
+	  Xen HVM guests use hardware virtualisation extentions (Intel VT-x,
+	  AMD SVM) to run OSes.	 This requires a CPU with appropriate
+	  extentions, but can in principle run any OS, even if unmodified.
+
+	  If unsure, say Y.
+
+	  TODO: This is a work in process, and Xen doesn't currently compile
+	  if this option is disabled.
+
+config HVM_FEP
+	bool "HVM Forced Emulation Prefix support" if EXPERT = "y"
+	default DEBUG
+	depends on HVM
+	---help---
+	  Compiles in a feature that allows HVM guest to arbitrarily
+	  exercise the instruction emulator.
+
+	  This feature can only be enabled during boot time with
+	  appropriate hypervisor command line option. Please read
+	  hypervisor command line documentation before trying to use
+	  this feature.
+
+	  This is strictly for testing purposes, and not appropriate
+	  for use in production.
+
+	  If unsure, say N.
+
 config SHADOW_PAGING
         bool "Shadow Paging"
         default y
@@ -61,24 +111,6 @@ config BIGMEM
 
 	  If unsure, say N.
 
-config HVM_FEP
-	bool "HVM Forced Emulation Prefix support" if EXPERT = "y"
-	default DEBUG
-	---help---
-
-	  Compiles in a feature that allows HVM guest to arbitrarily
-	  exercise the instruction emulator.
-
-	  This feature can only be enabled during boot time with
-	  appropriate hypervisor command line option. Please read
-	  hypervisor command line documentation before trying to use
-	  this feature.
-
-	  This is strictly for testing purposes, and not appropriate
-	  for use in production.
-
-	  If unsure, say N.
-
 config TBOOT
 	def_bool y
 	prompt "Xen tboot support" if EXPERT = "y"
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 10f519e..d7c8970 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -1,10 +1,10 @@
 subdir-y += acpi
 subdir-y += cpu
 subdir-y += genapic
-subdir-y += hvm
+subdir-$(CONFIG_HVM) += hvm
 subdir-y += mm
 subdir-$(CONFIG_XENOPROF) += oprofile
-subdir-y += pv
+subdir-$(CONFIG_PV) += pv
 subdir-y += x86_64
 
 alternative-y := alternative.init.o
diff --git a/xen/tools/kconfig/allrandom.config b/xen/tools/kconfig/allrandom.config
index c7753ac..329ef59 100644
--- a/xen/tools/kconfig/allrandom.config
+++ b/xen/tools/kconfig/allrandom.config
@@ -1,3 +1,7 @@
 # Explicit option choices not subject to regular RANDCONFIG
 
 CONFIG_GCOV_FORMAT_AUTODETECT=y
+
+# Being able to compile-out guest subsystems is a work-in-progress.
+CONFIG_PV=y
+CONFIG_HVM=y
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-02-15 19:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 19:41 [PATCH] Common hypercall handing improvements Andrew Cooper
2017-02-15 19:41 ` [PATCH] x86/hypercall: Make the HVM hcall_preempted boolean common Andrew Cooper
2017-02-16 10:44   ` [PATCH 1/7] " Jan Beulich
2017-02-15 19:41 ` [PATCH] arm/hypercall: Use the common hcall_preempted boolean Andrew Cooper
2017-02-16 12:04   ` Julien Grall
2017-02-15 19:41 ` [PATCH] xen/multicall: " Andrew Cooper
2017-02-16 10:37   ` Jan Beulich
2017-02-16 10:42     ` Andrew Cooper
2017-02-16 11:02   ` [PATCH 2/7] " Jan Beulich
2017-02-16 12:10   ` [PATCH] " Julien Grall
2017-02-15 19:41 ` [PATCH] x86/hypercall: Make the HVM hcall_64bit boolean common Andrew Cooper
2017-02-16 11:07   ` [PATCH 4/7] " Jan Beulich
2017-02-15 19:41 ` [PATCH] x86/hypercall: Split out PV hypercall infrastructure Andrew Cooper
2017-02-16 11:19   ` Jan Beulich
2017-02-15 19:41 ` [PATCH] x86/hypercall: Move hypercall continuation logic Andrew Cooper
2017-02-16 11:23   ` Jan Beulich
2017-02-15 19:41 ` Andrew Cooper [this message]
2017-02-16 14:39   ` [PATCH] [RFC] x86/kconfig: Introduce CONFIG_PV and CONFIG_HVM Jan Beulich
2017-02-16 14:58     ` Andrew Cooper
2017-02-16 15:49       ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487187705-24445-8-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).