iommu/dma: Avoid PCI host bridge windows
authorRobin Murphy <robin.murphy@arm.com>
Mon, 12 Sep 2016 16:14:00 +0000 (17:14 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 16 Sep 2016 08:34:22 +0000 (09:34 +0100)
commitfade1ec055dc6b6373e7487906b7899b41d0c46f
treed8583918947bb5936ecf6e26f8b22598cca7e604
parent44bb7e243bd4b4e5c79de2452cd9762582f58925
iommu/dma: Avoid PCI host bridge windows

With our DMA ops enabled for PCI devices, we should avoid allocating
IOVAs which a host bridge might misinterpret as peer-to-peer DMA and
lead to faults, corruption or other badness. To be safe, punch out holes
for all of the relevant host bridge's windows when initialising a DMA
domain for a PCI device.

CC: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Inki Dae <inki.dae@samsung.com>
Reported-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/dma-mapping.c
drivers/gpu/drm/exynos/exynos_drm_iommu.h
drivers/iommu/dma-iommu.c
include/linux/dma-iommu.h