mbox series

[v3,0/8] Make x86 IOMMU driver support configurable

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

Message

Xenia Ragiadakou Jan. 16, 2023, 7:04 a.m. UTC
This series aims to provide a means to render the iommu driver support for x86
configurable. Currently, irrespectively of the target platform, both AMD and
Intel iommu drivers are built. This is the case because the existent Kconfig
infrastructure does not provide any facilities for finer-grained configuration.

The series adds two new Kconfig options, AMD_IOMMU and INTEL_IOMMU, that can be
used to generate a tailored iommu configuration for a given platform.

This version of the series is rebased on top of the current staging and
addresses the comments made on version 2.
Patch "[v2] x86/iommu: introduce AMD-Vi and Intel VT-d Kconfig options"
is not included in this series because it has been already merged, and patch
"[v2] x86/iommu: iommu_igfx, iommu_qinval and iommu_snoop are VT-d specific"
has been splitted up into two separate patches.

Xenia Ragiadakou (8):
  x86/iommu: amd_iommu_perdev_intremap is AMD-Vi specific
  x86/iommu: iommu_igfx and iommu_qinval are Intel VT-d specific
  x86/iommu: snoop control is allowed only by Intel VT-d
  x86/acpi: separate AMD-Vi and VT-d specific functions
  x86/iommu: make code addressing CVE-2011-1898 no VT-d specific
  x86/iommu: call pi_update_irte through an hvm_function callback
  x86/dpci: move hvm_dpci_isairq_eoi() to generic HVM code
  x86/iommu: make AMD-Vi and Intel VT-d support configurable

 xen/arch/x86/hvm/vmx/vmx.c               | 41 +++++++++++++++
 xen/arch/x86/include/asm/acpi.h          |  6 ++-
 xen/arch/x86/include/asm/hvm/hvm.h       | 10 ++++
 xen/arch/x86/include/asm/iommu.h         |  3 --
 xen/drivers/passthrough/Kconfig          | 22 +++++++-
 xen/drivers/passthrough/amd/iommu_init.c |  2 +
 xen/drivers/passthrough/iommu.c          | 15 +++++-
 xen/drivers/passthrough/vtd/intremap.c   | 36 -------------
 xen/drivers/passthrough/vtd/iommu.c      |  3 --
 xen/drivers/passthrough/vtd/x86/Makefile |  1 -
 xen/drivers/passthrough/vtd/x86/hvm.c    | 64 ------------------------
 xen/drivers/passthrough/x86/hvm.c        | 50 ++++++++++++++++--
 xen/drivers/passthrough/x86/iommu.c      |  5 ++
 xen/include/xen/acpi.h                   |  7 +++
 xen/include/xen/iommu.h                  |  8 ++-
 15 files changed, 156 insertions(+), 117 deletions(-)
 delete mode 100644 xen/drivers/passthrough/vtd/x86/hvm.c