[XEN PATCH v2 05/15] x86: introduce CONFIG_ALTP2M Kconfig option

Sergiy Kibrik posted 15 patches 6 months, 1 week ago
There is a newer version of this series
[XEN PATCH v2 05/15] x86: introduce CONFIG_ALTP2M Kconfig option
Posted by Sergiy Kibrik 6 months, 1 week ago
Add new option to make altp2m code inclusion optional.
Currently altp2m support provided for VT-d only, so option is dependant on VMX.

No functional change intended.

Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
CC: Tamas K Lengyel <tamas@tklengyel.com>
---
 xen/arch/x86/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 8c9f8431f0..2872b031a7 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -358,6 +358,11 @@ 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"
+	def_bool y
+	depends on VMX && EXPERT
+
 endmenu
 
 source "common/Kconfig"
-- 
2.25.1
Re: [XEN PATCH v2 05/15] x86: introduce CONFIG_ALTP2M Kconfig option
Posted by Tamas K Lengyel 6 months, 1 week ago
> Currently altp2m support provided for VT-d only, so option is dependant on VMX.

No clue what is meant by "support provided for VT-d only". Altp2m has
nothing to do with VT-d. It would be more accurate to say it's only
implemented for Intel EPT.

Tamas
Re: [XEN PATCH v2 05/15] x86: introduce CONFIG_ALTP2M Kconfig option
Posted by Jan Beulich 6 months, 1 week ago
On 15.05.2024 11:08, Sergiy Kibrik wrote:
> --- a/xen/arch/x86/Kconfig
> +++ b/xen/arch/x86/Kconfig
> @@ -358,6 +358,11 @@ 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"
> +	def_bool y

Since you have "bool" already, here you mean "default".

> +	depends on VMX && EXPERT

This doesn't look right. Typical distro builds will be with EXPERT=n. Such
builds would suddenly end up without altp2m support then. What I think you
mean is a conditional prompt. I.e. overall

config ALTP2M
	bool "Alternate P2M support" if EXPERT
	default y
	depends on VMX
	help
	  ...

Jan
Re: [XEN PATCH v2 05/15] x86: introduce CONFIG_ALTP2M Kconfig option
Posted by Stefano Stabellini 6 months, 1 week ago
On Wed, 15 May 2024, Sergiy Kibrik wrote:
> Add new option to make altp2m code inclusion optional.
> Currently altp2m support provided for VT-d only, so option is dependant on VMX.
> 
> No functional change intended.
> 
> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
> CC: Tamas K Lengyel <tamas@tklengyel.com>
> ---
>  xen/arch/x86/Kconfig | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
> index 8c9f8431f0..2872b031a7 100644
> --- a/xen/arch/x86/Kconfig
> +++ b/xen/arch/x86/Kconfig
> @@ -358,6 +358,11 @@ 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"
> +	def_bool y
> +	depends on VMX && EXPERT

I think we need a small help text here, something like

Alternate-p2m allows a guest to manage multiple p2m guest physical "memory
views" (as opposed to a single p2m). Useful for memory introspection.


>  endmenu
>  
>  source "common/Kconfig"
> -- 
> 2.25.1
>