diff mbox series

[v2,1/8] x86/iommu: introduce AMD-Vi and Intel VT-d Kconfig options

Message ID 20230104084502.61734-2-burzalodowa@gmail.com (mailing list archive)
State Superseded
Headers show
Series Make x86 IOMMU driver support configurable | expand

Commit Message

Xenia Ragiadakou Jan. 4, 2023, 8:44 a.m. UTC
Introduce two new Kconfig options, AMD_IOMMU and INTEL_IOMMU, to allow code
specific to each IOMMU technology to be separated and, when not required,
stripped. AMD_IOMMU will be used to enable IOMMU support for platforms that
implement the AMD I/O Virtualization Technology. INTEL_IOMMU will be used to
enable IOMMU support for platforms that implement the Intel Virtualization
Technology for Directed I/O.

Since, at this point, disabling any of them would cause Xen to not compile,
the options are not visible to the user and are enabled by default if X86.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
---

Changes in v2:
  - just introduce the new options but not make them selectable by the user
  - adjust commit message
  - replace CONFIG_INTEL_VTD with CONFIG_INTEL_IOMMU

 xen/drivers/passthrough/Kconfig  | 6 ++++++
 xen/drivers/passthrough/Makefile | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

Comments

Jan Beulich Jan. 11, 2023, 2:56 p.m. UTC | #1
On 04.01.2023 09:44, Xenia Ragiadakou wrote:
> Introduce two new Kconfig options, AMD_IOMMU and INTEL_IOMMU, to allow code
> specific to each IOMMU technology to be separated and, when not required,
> stripped. AMD_IOMMU will be used to enable IOMMU support for platforms that
> implement the AMD I/O Virtualization Technology. INTEL_IOMMU will be used to
> enable IOMMU support for platforms that implement the Intel Virtualization
> Technology for Directed I/O.
> 
> Since, at this point, disabling any of them would cause Xen to not compile,
> the options are not visible to the user and are enabled by default if X86.
> 
> Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/drivers/passthrough/Kconfig b/xen/drivers/passthrough/Kconfig
index 479d7de57a..5c65567744 100644
--- a/xen/drivers/passthrough/Kconfig
+++ b/xen/drivers/passthrough/Kconfig
@@ -37,6 +37,12 @@  config IPMMU_VMSA
 
 endif
 
+config AMD_IOMMU
+	def_bool y if X86
+
+config INTEL_IOMMU
+	def_bool y if X86
+
 config IOMMU_FORCE_PT_SHARE
 	bool
 
diff --git a/xen/drivers/passthrough/Makefile b/xen/drivers/passthrough/Makefile
index a5efa22714..a1621540b7 100644
--- a/xen/drivers/passthrough/Makefile
+++ b/xen/drivers/passthrough/Makefile
@@ -1,5 +1,5 @@ 
-obj-$(CONFIG_X86) += vtd/
-obj-$(CONFIG_X86) += amd/
+obj-$(CONFIG_INTEL_IOMMU) += vtd/
+obj-$(CONFIG_AMD_IOMMU) += amd/
 obj-$(CONFIG_X86) += x86/
 obj-$(CONFIG_ARM) += arm/