On Wed, May 20, 2020 at 05:21:59PM +0200, Jean-Philippe Brucker wrote: > IOMMU drivers currently check themselves if a device is untrusted > (plugged into an external-facing port) before enabling ATS. Move the > check to drivers/pci. The only functional change should be to the AMD > IOMMU driver. With this change all IOMMU drivers block 'Translated' PCIe > transactions and Translation Requests from untrusted devices. > > Since v1 [1] I added tags, addressed comments on patches 1 and 3, and > fixed a regression in patch 3. > > [1] https://lore.kernel.org/linux-iommu/20200515104359.1178606-1-jean-philippe@xxxxxxxxxx/ > > Jean-Philippe Brucker (4): > PCI/ATS: Only enable ATS for trusted devices > iommu/amd: Use pci_ats_supported() > iommu/arm-smmu-v3: Use pci_ats_supported() > iommu/vt-d: Use pci_ats_supported() > > include/linux/pci-ats.h | 3 +++ > drivers/iommu/amd_iommu.c | 12 ++++-------- > drivers/iommu/arm-smmu-v3.c | 20 +++++++------------- > drivers/iommu/intel-iommu.c | 9 +++------ > drivers/pci/ats.c | 18 +++++++++++++++++- > 5 files changed, 34 insertions(+), 28 deletions(-) Applied, thanks.