Introduce IOMMU-API TLB Flushing Interface
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest13 patches 20 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | iommu/amd: Rename a few flush functionsdrivers/ | +8 | 0 replies | |
| 2/13 | iommu: Introduce Interface for IOMMU TLB Flushingdrivers/ include/ | +105 | 5 replies | |
| 3/13 | vfio/type1: Use sychronized interface of the IOMMU-APIdrivers/ | +20 | 0 replies | |
| 4/13 | iommu/dma: Use sychronized interface of the IOMMU-APIdrivers/ | +4 | 0 replies | |
| 5/13 | arm: dma-mapping: Use sychronized interface of the IOMMU-APIarch/ | +11 | 0 replies | |
| 6/13 | drm/etnaviv: Use sychronized interface of the IOMMU-APIdrivers/ | +5 | 6 replies | |
| 7/13 | drm/msm: Use sychronized interface of the IOMMU-APIdrivers/ | +3 | 1 reply | |
| 8/13 | drm/nouveau/imem/gk20a: Use sychronized interface of the IOMMU-APIdrivers/ | +7 | 0 replies | |
| 9/13 | drm/rockchip: Use sychronized interface of the IOMMU-APIdrivers/ | +3 | 0 replies | |
| 10/13 | drm/tegra: Use sychronized interface of the IOMMU-APIdrivers/ drivers/ | +6 | 1 reply | |
| 11/13 | gpu: host1x: Use sychronized interface of the IOMMU-APIdrivers/ drivers/ | +6 | 1 reply | |
| 12/13 | IB/usnic: Use sychronized interface of the IOMMU-APIdrivers/ | +5 | 0 replies | |
| 13/13 | remoteproc: Use sychronized interface of the IOMMU-APIdrivers/ | +6 | 1 reply |
Reviews trailers per patch
4 of 13 patches have a Reviewed-by or Acked-by.
| Patch | Thierry Reding | Rob Clark | Bjorn Andersson |
|---|---|---|---|
| 1/13 | |||
| 2/13 | |||
| 3/13 | |||
| 4/13 | |||
| 5/13 | |||
| 6/13 | |||
| 7/13 | A-b | ||
| 8/13 | |||
| 9/13 | |||
| 10/13 | A-b | ||
| 11/13 | A-b | ||
| 12/13 | |||
| 13/13 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 00/13] Introduce IOMMU-API TLB Flushing Interface
Hi,
here is a patch-set to introduce an explicit interface to the IOMMU-API to flush IOMMU and device IO/TLBs. Currently the iommu_map(), iommu_map_sg(), and iommu_unmap() functions have to make sure all IO/TLBs in the system are synchronized with the page-table updates they made.
This is very inefficient in some scenarios, for example when a large address space is unmapped and an IO/TLB flush has to be done in every call of iommu_unmap(). Or in a scenario where it makes sense to queue up some changes to the page-tables and flush them together.
To optimize these scenarios, the need to synchronize with the IOMMU and device TLBs has been removed from the map/unmap functions of the IOMMU-API and an interface to explicitly do the flushes has been introduced.
To make the conversion of existing users of the IOMMU-API easier, new functions - iommu_map_sync(), iommu_map_sg_sync(), and iommu_unmap_sync() - have been introduced. These functions guarantee that the IO/TLBs are synchronized with any page-table update when they return. The optimizations possible with the new interface are subject to separate patch-sets.
Patch 1 just renames a few functions in the AMD-Vi driver that would otherwise collide with the new TLB-flush functions from the IOMMU-API.
Patch 2 introduces the new IO/TLB Flush-Interface.
Patch 3-13 convert existing users of the IOMMU-API to use the *_sync functions for now.
Please review.
Thanks,
Joerg
Joerg Roedel (13):
iommu/amd: Rename a few flush functions
iommu: Introduce Interface for IOMMU TLB Flushing vfio/type1: Use sychronized interface of the IOMMU-API iommu/dma: Use sychronized interface of the IOMMU-API
arm: dma-mapping: Use sychronized interface of the IOMMU-API drm/etnaviv: Use sychronized interface of the IOMMU-API drm/msm: Use sychronized interface of the IOMMU-API drm/nouveau/imem/gk20a: Use sychronized interface of the IOMMU-API drm/rockchip: Use sychronized interface of the IOMMU-API drm/tegra: Use sychronized interface of the IOMMU-API
gpu: host1x: Use sychronized interface of the IOMMU-API IB/usnic: Use sychronized interface of the IOMMU-API
remoteproc: Use sychronized interface of the IOMMU-API
arch/arm/mm/dma-mapping.c | 21 +++--- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 10 +-- drivers/gpu/drm/msm/msm_iommu.c | 5 +- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 12 ++-- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 6 +- drivers/gpu/drm/tegra/drm.c | 6 +- drivers/gpu/drm/tegra/gem.c | 6 +- drivers/gpu/host1x/cdma.c | 6 +- drivers/gpu/host1x/job.c | 6 +- drivers/infiniband/hw/usnic/usnic_uiom.c | 10 +-- drivers/iommu/amd_iommu.c | 16 ++--- drivers/iommu/dma-iommu.c | 8 +-- drivers/iommu/iommu.c | 26 +++++++ drivers/remoteproc/remoteproc_core.c | 10 +-- drivers/vfio/vfio_iommu_type1.c | 38 +++++----- include/linux/iommu.h | 80 +++++++++++++++++++++- 16 files changed, 189 insertions(+), 77 deletions(-)
Signature · 1 line
2.7.4