MAINTAINERS | 2 + include/exec/memory.h | 32 ---- include/hw/i386/intel_iommu.h | 2 + include/hw/pci/pci.h | 38 ++++- include/hw/vfio/vfio-common.h | 18 ++- include/hw/vfio/vfio-container-base.h | 22 +-- include/hw/virtio/virtio-iommu.h | 2 + include/qemu/range.h | 11 ++ include/sysemu/host_iommu_device.h | 102 ++++++++++++ include/sysemu/iommufd.h | 19 +++ backends/host_iommu_device.c | 33 ++++ backends/iommufd.c | 76 +++++++-- hw/i386/intel_iommu.c | 203 ++++++++++++++++++----- hw/pci/pci.c | 79 ++++++++- hw/vfio/common.c | 150 ++++++++++------- hw/vfio/container-base.c | 70 ++++---- hw/vfio/container.c | 164 +++++++++++++------ hw/vfio/helpers.c | 17 ++ hw/vfio/iommufd.c | 68 +++++++- hw/vfio/pci.c | 23 ++- hw/vfio/spapr.c | 3 + hw/virtio/virtio-iommu.c | 296 ++++++++++++++++++++++------------ system/memory.c | 13 -- backends/meson.build | 1 + 24 files changed, 1066 insertions(+), 378 deletions(-) create mode 100644 include/sysemu/host_iommu_device.h create mode 100644 backends/host_iommu_device.c