[PATCH 0/3] iommu/vtd: Per device dma ops

From: Lu Baolu
Date: Thu Aug 01 2019 - 02:03:03 EST


Current Intel IOMMU driver sets the system level dma_ops. This
means every dma API call will be routed to the iommu driver,
even the privileged user might select to bypass iommu for some
specific devices.

Furthermore, if the priviledged user requests to bypass iommu
translation for a device, the iommu driver might fall back to
use dma domain blindly if the device is not able to address all
system memory.

This sets the per-device dma_ops only if a device is using DMA
domain. Otherwise, use the default dma_ops for direct dma.

Lu Baolu (3):
iommu/vt-d: Refactor find_domain() helper
iommu/vt-d: Apply per-device dma_ops
iommu/vt-d: Cleanup after using per-device dma ops

drivers/iommu/intel-iommu.c | 131 ++++++++++--------------------------
1 file changed, 34 insertions(+), 97 deletions(-)

--
2.17.1