Skip to content

iommu/amd, vfio: Reduce IOTLB Flushm Rate

Joerg Roedel kvm linux-iommu lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4iommu/amd: Finish TLB flush in amd_iommu_unmap()drivers/iommu/amd_iommu.c+1 -00 replies
2/4iommu/amd: Implement IOMMU-API TLB flush interfacedrivers/iommu/amd_iommu.c+10 -30 replies
3/4vfio/type1: Make use of iommu_unmap_fast()drivers/vfio/vfio_iommu_type1.c+18 -60 replies
4/4vfio/type1: Gather TLB-syncs and pages to unpindrivers/vfio/vfio_iommu_type1.c+101 -51 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] iommu/amd, vfio: Reduce IOTLB Flushm Rate

Hi,

these patches implement the new IOTLB flush interface in the AMD IOMMU driver. But for it to take effect, changes in VFIO are also necessary, because VFIO unpins the pages after every successful iommu_unmap() call. This requires an IOTLB flush, so that we don't save flushes.

So I implemented vfio-gather code to collect up to 32 ranges before they are unpinned together. This significantly reduces the number of necessary IOTLB flushes in my tests.

Please review.

Thanks,

Joerg

Joerg Roedel (4):
iommu/amd: Finish TLB flush in amd_iommu_unmap() iommu/amd: Implement IOMMU-API TLB flush interface vfio/type1: Make use of iommu_unmap_fast() vfio/type1: Gather TLB-syncs and pages to unpin

 drivers/iommu/amd_iommu.c       |  12 +++-
 drivers/vfio/vfio_iommu_type1.c | 128 ++++++++++++++++++++++++++++++++++++----
 2 files changed, 128 insertions(+), 12 deletions(-)
Signature · 1 line
2.7.4