Currently, for x86 platforms, Xen does not provide to the users any configuration control over the IOMMU support and can only be built with both AMD and Intel IOMMU drivers enabled. However, there are use cases, e.g in safety-critical systems, that require Xen to be able to be configured to exclude unused code. A smaller tailored configuration would help Xen to meet faster certification requirements for individual platforms.
Introduce two new Kconfig options, AMD_IOMMU and INTEL_VTD, to allow code specific to each IOMMU technology to be separated and, when not required, stripped. AMD_IOMMU enables IOMMU support for platforms that implement the AMD I/O Virtualization Technology. INTEL_VTD enables IOMMU support for platforms that implement the Intel Virtualization Technology for Directed I/O. Since no functional change is intended regarding the default configuration of an x86 system, both options depend on x86 and default to 'y'. Signed-off-by: Xenia Ragiadakou <burzalod...@gmail.com> --- xen/drivers/passthrough/Kconfig | 16 ++++++++++++++++ xen/drivers/passthrough/Makefile | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/Kconfig b/xen/drivers/passthrough/Kconfig index 479d7de57a..82465aa627 100644 --- a/xen/drivers/passthrough/Kconfig +++ b/xen/drivers/passthrough/Kconfig @@ -37,6 +37,22 @@ config IPMMU_VMSA endif +config AMD_IOMMU + bool "AMD IOMMU" + depends on X86 + default y + ---help--- + Enables I/O virtualization on platforms that implement the + AMD I/O Virtualization Technology (IOMMU). + +config INTEL_VTD + bool "Intel VT-d" + depends on X86 + default y + ---help--- + Enables I/O virtualization on platforms that implement the + Intel Virtualization Technology for Directed I/O (Intel VT-d). + config IOMMU_FORCE_PT_SHARE bool diff --git a/xen/drivers/passthrough/Makefile b/xen/drivers/passthrough/Makefile index a5efa22714..d4fc7a3ddc 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_VTD) += vtd/ +obj-$(CONFIG_AMD_IOMMU) += amd/ obj-$(CONFIG_X86) += x86/ obj-$(CONFIG_ARM) += arm/ -- 2.37.2