diff mbox series

[v3,20/24] x86/hvm: add HVM-specific Kconfig

Message ID 20250103-vuart-ns8250-v3-v1-20-c5d36b31d66c@ford.com (mailing list archive)
State New
Headers show
Series x86: introduce NS16550-compatible UART emulator | expand

Commit Message

Denis Mukhin via B4 Relay Jan. 4, 2025, 1:58 a.m. UTC
From: Denis Mukhin <dmukhin@ford.com>

Add separate menu for configuring HVM build-time settings to help organizing
HVM-specific options.

Signed-off-by: Denis Mukhin <dmukhin@ford.com>
---
 xen/arch/x86/Kconfig     | 76 +-----------------------------------------------
 xen/arch/x86/hvm/Kconfig | 74 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 75 deletions(-)

Comments

Jan Beulich Jan. 30, 2025, 1:12 p.m. UTC | #1
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote:
> From: Denis Mukhin <dmukhin@ford.com>
> 
> Add separate menu for configuring HVM build-time settings to help organizing
> HVM-specific options.
> 
> Signed-off-by: Denis Mukhin <dmukhin@ford.com>

Largely: Why not. Question is whether what is being moved now may
eventually require moving back, if support was extended to PV (MEM_PAGING
and MEM_SHARING). That doesn't look very likely though.

> --- a/xen/arch/x86/Kconfig
> +++ b/xen/arch/x86/Kconfig
> @@ -30,7 +30,6 @@ config X86
>  	select HAS_SCHED_GRANULARITY
>  	select HAS_UBSAN
>  	select HAS_VMAP
> -	select HAS_VPCI if HVM
>  	select NEEDS_LIBELF

I don't mind the movement of this line, but I'd like to point out that it
may be beneficial to have all selects of HAS_* in a central place. Views
of other maintainers (or of course anyone else) appreciated.

> --- /dev/null
> +++ b/xen/arch/x86/hvm/Kconfig
> @@ -0,0 +1,74 @@
> +menuconfig HVM
> +	bool "HVM support"
> +	depends on !PV_SHIM_EXCLUSIVE
> +	default !PV_SHIM
> +	select COMPAT
> +	select IOREQ_SERVER
> +	select MEM_ACCESS_ALWAYS_ON
> +	select HAS_VPCI

We strive to have such lists of selects sorted alphabetically, preventing
everyone to add to the end of the list (in turn reducing the risk of
patches conflicting).

Jan
Denis Mukhin Feb. 7, 2025, 10:14 p.m. UTC | #2
On Thursday, January 30th, 2025 at 5:12 AM, Jan Beulich <jbeulich@suse.com> wrote:

> 
> 
> On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote:
> 
> > From: Denis Mukhin dmukhin@ford.com
> > 
> > Add separate menu for configuring HVM build-time settings to help organizing
> > HVM-specific options.
> > 
> > Signed-off-by: Denis Mukhin dmukhin@ford.com
> 
> 
> Largely: Why not. Question is whether what is being moved now may
> eventually require moving back, if support was extended to PV (MEM_PAGING
> and MEM_SHARING). That doesn't look very likely though.

Thank you.

I moved the patch to a separate thread:
  https://lore.kernel.org/xen-devel/20250207220302.4190210-1-dmukhin@ford.com/

> 
> > --- a/xen/arch/x86/Kconfig
> > +++ b/xen/arch/x86/Kconfig
> > @@ -30,7 +30,6 @@ config X86
> > select HAS_SCHED_GRANULARITY
> > select HAS_UBSAN
> > select HAS_VMAP
> > - select HAS_VPCI if HVM
> > select NEEDS_LIBELF
> 
> 
> I don't mind the movement of this line, but I'd like to point out that it
> may be beneficial to have all selects of HAS_* in a central place. Views
> of other maintainers (or of course anyone else) appreciated.
> 
> > --- /dev/null
> > +++ b/xen/arch/x86/hvm/Kconfig
> > @@ -0,0 +1,74 @@
> > +menuconfig HVM
> > + bool "HVM support"
> > + depends on !PV_SHIM_EXCLUSIVE
> > + default !PV_SHIM
> > + select COMPAT
> > + select IOREQ_SERVER
> > + select MEM_ACCESS_ALWAYS_ON
> > + select HAS_VPCI
> 
> 
> We strive to have such lists of selects sorted alphabetically, preventing
> everyone to add to the end of the list (in turn reducing the risk of
> patches conflicting).
> 
> Jan
diff mbox series

Patch

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 9cdd04721afa1916c7edd8fdf7d606858c73ce88..37362c205dc664a1e809322c2cfe9f45394e30df 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -30,7 +30,6 @@  config X86
 	select HAS_SCHED_GRANULARITY
 	select HAS_UBSAN
 	select HAS_VMAP
-	select HAS_VPCI if HVM
 	select NEEDS_LIBELF
 
 config ARCH_DEFCONFIG
@@ -107,42 +106,7 @@  config PV_LINEAR_PT
 
          If unsure, say Y.
 
-config HVM
-	bool "HVM support"
-	depends on !PV_SHIM_EXCLUSIVE
-	default !PV_SHIM
-	select COMPAT
-	select IOREQ_SERVER
-	select MEM_ACCESS_ALWAYS_ON
-	help
-	  Interfaces to support HVM domains.  HVM domains require hardware
-	  virtualisation extensions (e.g. Intel VT-x, AMD SVM), but can boot
-	  guests which have no specific Xen knowledge.
-
-	  This option is needed if you want to run HVM or PVH domains.
-
-	  If unsure, say Y.
-
-config AMD_SVM
-	bool "AMD-V" if EXPERT
-	depends on HVM
-	default y
-	help
-	  Enables virtual machine extensions on platforms that implement the
-	  AMD Virtualization Technology (AMD-V).
-	  If your system includes a processor with AMD-V support, say Y.
-	  If in doubt, say Y.
-
-config INTEL_VMX
-	bool "Intel VT-x" if EXPERT
-	depends on HVM
-	default y
-	select ARCH_VCPU_IOREQ_COMPLETION
-	help
-	  Enables virtual machine extensions on platforms that implement the
-	  Intel Virtualization Technology (Intel VT-x).
-	  If your system includes a processor with Intel VT-x support, say Y.
-	  If in doubt, say Y.
+source "arch/x86/hvm/Kconfig"
 
 config XEN_SHSTK
 	bool "Supervisor Shadow Stacks"
@@ -201,25 +165,6 @@  config BIGMEM
 
 	  If unsure, say N.
 
-config HVM_FEP
-	bool "HVM Forced Emulation Prefix support (UNSUPPORTED)" if UNSUPPORTED
-	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 TBOOT
 	bool "Xen tboot support (UNSUPPORTED)"
 	depends on INTEL && UNSUPPORTED
@@ -348,14 +293,6 @@  config HYPERV_GUEST
 
 endif
 
-config MEM_PAGING
-	bool "Xen memory paging support (UNSUPPORTED)" if UNSUPPORTED
-	depends on HVM
-
-config MEM_SHARING
-	bool "Xen memory sharing support (UNSUPPORTED)" if UNSUPPORTED
-	depends on HVM
-
 config REQUIRE_NX
 	bool "Require NX (No eXecute) support"
 	help
@@ -372,17 +309,6 @@  config REQUIRE_NX
 	  was unavailable. However, if enabled, Xen will no longer boot on
 	  any CPU which is lacking NX support.
 
-config ALTP2M
-	bool "Alternate P2M support" if EXPERT
-	depends on INTEL_VMX
-	default y
-	help
-	  Alternate-p2m allows a guest to manage multiple p2m guest physical
-	  "memory views" (as opposed to a single p2m).
-	  Useful for memory introspection.
-
-	  If unsure, stay with defaults.
-
 endmenu
 
 source "common/Kconfig"
diff --git a/xen/arch/x86/hvm/Kconfig b/xen/arch/x86/hvm/Kconfig
new file mode 100644
index 0000000000000000000000000000000000000000..fdfa9f80d30347ac9c34e52f5ba829bc11916dc0
--- /dev/null
+++ b/xen/arch/x86/hvm/Kconfig
@@ -0,0 +1,74 @@ 
+menuconfig HVM
+	bool "HVM support"
+	depends on !PV_SHIM_EXCLUSIVE
+	default !PV_SHIM
+	select COMPAT
+	select IOREQ_SERVER
+	select MEM_ACCESS_ALWAYS_ON
+	select HAS_VPCI
+	help
+	  Interfaces to support HVM domains.  HVM domains require hardware
+	  virtualisation extensions (e.g. Intel VT-x, AMD SVM), but can boot
+	  guests which have no specific Xen knowledge.
+
+	  This option is needed if you want to run HVM or PVH domains.
+
+	  If unsure, say Y.
+
+if HVM
+
+config AMD_SVM
+	bool "AMD-V" if EXPERT
+	default y
+	help
+	  Enables virtual machine extensions on platforms that implement the
+	  AMD Virtualization Technology (AMD-V).
+	  If your system includes a processor with AMD-V support, say Y.
+	  If in doubt, say Y.
+
+config INTEL_VMX
+	bool "Intel VT-x" if EXPERT
+	default y
+	select ARCH_VCPU_IOREQ_COMPLETION
+	help
+	  Enables virtual machine extensions on platforms that implement the
+	  Intel Virtualization Technology (Intel VT-x).
+	  If your system includes a processor with Intel VT-x support, say Y.
+	  If in doubt, say Y.
+
+config ALTP2M
+	bool "Alternate P2M support" if EXPERT
+	depends on INTEL_VMX
+	default y
+	help
+	  Alternate-p2m allows a guest to manage multiple p2m guest physical
+	  "memory views" (as opposed to a single p2m).
+	  Useful for memory introspection.
+
+	  If unsure, stay with defaults.
+
+config MEM_PAGING
+	bool "Xen memory paging support (UNSUPPORTED)" if UNSUPPORTED
+
+config MEM_SHARING
+	bool "Xen memory sharing support (UNSUPPORTED)" if UNSUPPORTED
+
+config HVM_FEP
+	bool "HVM Forced Emulation Prefix support (UNSUPPORTED)" if UNSUPPORTED
+	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.
+
+endif