Inspired by Christoph's last set: https://lkml.org/lkml/2019/8/28/667 VMD currently works with VT-d enabled by pointing DMA and IOMMU actions at the VMD endpoint. The problem with this approach is that the VMD endpoint's device-specific attributes, such as the dma mask, are used instead. This set cleans up VMD by removing the override that redirects dma map operations to the VMD endpoint. Instead it introduces a new dma alias mechanism into the existing dma alias infrastructure. Patch 1 and 2 are miscellaneous fixes discovered during development. Patch 1 is ready, but 2 likely doesn't go far enough for proper teardown on addition failure. Jon Derrick (5): iommu: Remove device link to group on failure iommu/vt-d: Unlink device if failed to add to group x86/PCI: Expose VMD's device in pci_sysdata PCI: vmd: Stop overriding dma_map_ops x86/PCI: Remove unused X86_DEV_DMA_OPS arch/x86/Kconfig | 3 - arch/x86/include/asm/device.h | 10 --- arch/x86/include/asm/pci.h | 4 +- arch/x86/pci/common.c | 44 ++---------- drivers/iommu/intel-iommu.c | 26 ++++--- drivers/iommu/iommu.c | 1 + drivers/pci/controller/Kconfig | 1 - drivers/pci/controller/vmd.c | 152 +---------------------------------------- drivers/pci/pci.c | 4 +- drivers/pci/search.c | 6 ++ include/linux/pci.h | 1 + 11 files changed, 37 insertions(+), 215 deletions(-) -- 1.8.3.1