Skip to content

iommu/s390: Further improvements

Niklas Schnelle linux-iommu linux-s390 lkml 2 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 3 repliesApplied
  2. v15 patches 22 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5iommu/s390: Make attach succeed even if the device is in error statearch/s390/include/asm/pci.h arch/s390/kvm/pci.c arch/s390/pci/pci.c +2 more+20 -112 replies
2/5iommu/s390: Add I/O TLB opsdrivers/iommu/s390-iommu.c+56 -110 replies
3/5iommu/s390: Use RCU to allow concurrent domain_list iterationarch/s390/include/asm/pci.h arch/s390/pci/pci.c drivers/iommu/s390-iommu.c+29 -180 replies
4/5iommu/s390: Optimize IOMMU table walkingdrivers/iommu/s390-iommu.c+43 -260 replies
5/5s390/pci: use lock-free I/O translation updatesarch/s390/include/asm/pci.h arch/s390/pci/pci_dma.c drivers/iommu/s390-iommu.c+58 -540 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchMatthew Rosato
1/5R-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] iommu/s390: Further improvements

Hi All,

This series of patches improves the s390 IOMMU driver. These improvements help existing IOMMU users, mainly vfio-pci, but at the same time are also in preparation of converting s390 to use the common DMA API implementation in drivers/iommu/dma-iommu.c instead of its platform specific DMA API in arch/s390/pci/pci_dma.c that sidesteps the IOMMU driver to control the same hardware interface directly.

Among the included changes patch 1 improves the robustness of switching IOMMU domains and patch 2 adds the I/O TLB operations necessary for the DMA API conversion. Patches 3, 4, and 5 aim to improve performance with patch 5 being the most intrusive by removing the I/O translation table lock and using atomic updates instead.

This series is based on the s390 branch of Joerg's IOMMU tree[0] that includes the latest s390 IOMMU fixes. It is available for easy testing in the iommu_improve_v2 branch with signed tag s390_iommu_improve_v2 of my git.kernel.org tree[1].

Best regards,
Niklas Schnelle

Changes sinve v1:
- If an IOTLB flush fails for one device don't skip the flush for other devices. This is also needed when RCU readers try to flush a detached device. (Jason)
- Free a domain's IOMMU translation table via call_rcu() (Jason)

[0] https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/log/?h=s390
[1] https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git/

Niklas Schnelle (5):
iommu/s390: Make attach succeed even if the device is in error state iommu/s390: Add I/O TLB ops
iommu/s390: Use RCU to allow concurrent domain_list iteration iommu/s390: Optimize IOMMU table walking
s390/pci: use lock-free I/O translation updates

 arch/s390/include/asm/pci.h |   4 +-
 arch/s390/kvm/pci.c         |   6 +-
 arch/s390/pci/pci.c         |  13 +--
 arch/s390/pci/pci_dma.c     |  77 +++++++++------
 drivers/iommu/s390-iommu.c  | 184 ++++++++++++++++++++++++------------
 5 files changed, 185 insertions(+), 99 deletions(-)
Signature · 1 line
2.34.1