Message ID | 20240416065012.3470263-1-Sergiy_Kibrik@epam.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | None | expand |
Hello Sergiy, > Also make INTEL_IOMMU/AMD_IOMMU options dependant on VMX/SVM options. The discussion in the RFC series stated the IOMMU may be used with PV guests, and doesn't rely on VMX/SVM support (in fact, it can be used without HVM support in Xen). However, in the discussion, posted interrupts were supposed to be dependent on VMX/SVM instead. I suppose this is a leftover from the original RFC ? > https://lore.kernel.org/xen-devel/e29e375f-3d30-0eb1-7e28-b93f2d831b43@suse.com/ Teddy --- Teddy Astie | Vates XCP-ng Intern XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
On 16/04/2024 7:50 am, Sergiy Kibrik wrote: > From: Xenia Ragiadakou <burzalodowa@gmail.com> > > Provide the user with configuration control over the cpu virtualization support > in Xen by making SVM and VMX options user selectable. > > To preserve the current default behavior, both options depend on HVM and > default to Y. > > To prevent users from unknowingly disabling virtualization support, make the > controls user selectable only if EXPERT is enabled. > Also make INTEL_IOMMU/AMD_IOMMU options dependant on VMX/SVM options. Everything else seems ok, but there's no inherent dependency between VMX/SVM and IOMMUs. There are certain features (HAP/IOMMU pagetable sharing, posted interrupts) which do depend on both, but the vast majority of functionality is independent. It would be a legitimate config (although getting less plausible, these days) to have PV && IOMMU && !HVM. Furthermore, randconfig will do a better job without such restrictions in place. ~Andrew
hi Teddy, 16.04.24 11:40, Teddy Astie: > Hello Sergiy, > >> Also make INTEL_IOMMU/AMD_IOMMU options dependant on VMX/SVM options. > > The discussion in the RFC series stated the IOMMU may be used with PV > guests, and doesn't rely on VMX/SVM support (in fact, it can be used > without HVM support in Xen). > > However, in the discussion, posted interrupts were supposed to be > dependent on VMX/SVM instead. I suppose this is a leftover from the > original RFC ? > oh, yes, this bit remained from original patch, and indeed shouldn't be here. I shall drop it in v2. -Sergiy
16.04.24 12:36, Andrew Cooper: > > Everything else seems ok, but there's no inherent dependency between > VMX/SVM and IOMMUs. There are certain features (HAP/IOMMU pagetable > sharing, posted interrupts) which do depend on both, but the vast > majority of functionality is independent. > > It would be a legitimate config (although getting less plausible, these > days) to have PV && IOMMU && !HVM. > > Furthermore, randconfig will do a better job without such restrictions > in place. understood. I'll make a patch instead to guard posted interrupts calls from iommu driver. -Sergiy
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 6f06d3baa5..98a6f8d877 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -121,10 +121,24 @@ config HVM If unsure, say Y. config SVM - def_bool y if HVM + 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 VMX - def_bool y if HVM + bool "Intel VT-x" if EXPERT + depends on HVM + default y + 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 XEN_SHSTK bool "Supervisor Shadow Stacks" diff --git a/xen/drivers/passthrough/Kconfig b/xen/drivers/passthrough/Kconfig index 864fcf3b0c..5f53639c2d 100644 --- a/xen/drivers/passthrough/Kconfig +++ b/xen/drivers/passthrough/Kconfig @@ -39,7 +39,7 @@ endif config AMD_IOMMU bool "AMD IOMMU" if EXPERT - depends on X86 + depends on X86 && SVM default y help Enables I/O virtualization on platforms that implement the @@ -51,7 +51,7 @@ config AMD_IOMMU config INTEL_IOMMU bool "Intel VT-d" if EXPERT - depends on X86 + depends on X86 && VMX default y help Enables I/O virtualization on platforms that implement the