[PATCH v2 0/4] Fixes for dma-iommu swiotlb bounce buffers

From: David Stevens
Date: Thu Jul 08 2021 - 23:35:45 EST


From: David Stevens <stevensd@xxxxxxxxxxxx>

This patch set includes two fixes for bugs caused by mixing up the
original buffer's physical address and bounce buffer's physical address.
It also includes a performance fix that avoids an extra copy, as well as
a general cleanup fix.

The issues were found via code inspection, so I don't have any specific
use cases where things were not working, or any performance numbers.

v1 -> v2:
- Split fixes into dedicated patches
- Less invasive changes to fix arch_sync when mapping
- Leave dev_is_untrusted check for strict iommu

David Stevens (4):
dma-iommu: fix sync_sg with swiotlb
dma-iommu: fix arch_sync_dma for map with swiotlb
dma-iommu: pass SKIP_CPU_SYNC to swiotlb unmap
dma-iommu: Check CONFIG_SWIOTLB more broadly

drivers/iommu/dma-iommu.c | 63 ++++++++++++++++++++-------------------
1 file changed, 33 insertions(+), 30 deletions(-)

--
2.32.0.93.g670b81a890-goog