[PATCH 0/5] iommu/s390: Further improvements

From: Niklas Schnelle
Date: Tue Oct 18 2022 - 10:52:03 EST


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 goes on top of v7 of my previous series of IOMMU fixes[0] and
similarly is available for easy testing in the iommu_improve_v1 branch with
signed tag s390_iommu_improve_v1 of my git.kernel.org tree[1].

Best regards,
Niklas Schnelle

[0] https://lore.kernel.org/linux-iommu/20221017124558.1386337-1-schnelle@xxxxxxxxxxxxx/
[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 | 180 ++++++++++++++++++++++++------------
5 files changed, 183 insertions(+), 97 deletions(-)

--
2.34.1