powerpc/powernv: Add iommu DMA bypass support for IODA2
This patch adds the support for to create a direct iommu "bypass"
window on IODA2 bridges (such as Power8) allowing to bypass iommu
page translation completely for 64-bit DMA capable devices, thus
significantly improving DMA performances.
Additionally, this adds a hook to the struct iommu_table so that
the IOMMU API / VFIO can disable the bypass when external ownership
is requested, since in that case, the device will be used by an
environment such as userspace or a KVM guest which must not be
allowed to bypass translations.
Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Showing
- arch/powerpc/include/asm/dma-mapping.h 1 addition, 0 deletionsarch/powerpc/include/asm/dma-mapping.h
- arch/powerpc/include/asm/iommu.h 1 addition, 0 deletionsarch/powerpc/include/asm/iommu.h
- arch/powerpc/kernel/dma.c 7 additions, 3 deletionsarch/powerpc/kernel/dma.c
- arch/powerpc/kernel/iommu.c 12 additions, 0 deletionsarch/powerpc/kernel/iommu.c
- arch/powerpc/platforms/powernv/pci-ioda.c 84 additions, 0 deletionsarch/powerpc/platforms/powernv/pci-ioda.c
- arch/powerpc/platforms/powernv/pci.c 10 additions, 0 deletionsarch/powerpc/platforms/powernv/pci.c
- arch/powerpc/platforms/powernv/pci.h 5 additions, 1 deletionarch/powerpc/platforms/powernv/pci.h
- arch/powerpc/platforms/powernv/powernv.h 8 additions, 0 deletionsarch/powerpc/platforms/powernv/powernv.h
- arch/powerpc/platforms/powernv/setup.c 9 additions, 0 deletionsarch/powerpc/platforms/powernv/setup.c
Loading
Please register or sign in to comment