iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Niklas Schnelle <schnelle@linux.ibm.com>
To: Matthew Rosato <mjrosato@linux.ibm.com>,
	iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Jason Gunthorpe <jgg@nvidia.com>
Cc: Gerd Bayer <gbayer@linux.ibm.com>,
	Pierre Morel <pmorel@linux.ibm.com>,
	linux-s390@vger.kernel.org, borntraeger@linux.ibm.com,
	hca@linux.ibm.com, gor@linux.ibm.com,
	gerald.schaefer@linux.ibm.com, agordeev@linux.ibm.com,
	svens@linux.ibm.com, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/5] iommu/s390: Further improvements
Date: Wed,  9 Nov 2022 15:28:58 +0100	[thread overview]
Message-ID: <20221109142903.4080275-1-schnelle@linux.ibm.com> (raw)

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(-)

-- 
2.34.1


             reply	other threads:[~2022-11-09 14:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 14:28 Niklas Schnelle [this message]
2022-11-09 14:28 ` [PATCH v2 1/5] iommu/s390: Make attach succeed even if the device is in error state Niklas Schnelle
2022-11-14 15:05   ` Gerd Bayer
2022-11-14 15:30   ` Matthew Rosato
2022-11-09 14:29 ` [PATCH v2 2/5] iommu/s390: Add I/O TLB ops Niklas Schnelle
2022-11-09 14:29 ` [PATCH v2 3/5] iommu/s390: Use RCU to allow concurrent domain_list iteration Niklas Schnelle
2022-11-09 14:29 ` [PATCH v2 4/5] iommu/s390: Optimize IOMMU table walking Niklas Schnelle
2022-11-09 14:29 ` [PATCH v2 5/5] s390/pci: use lock-free I/O translation updates Niklas Schnelle
2022-11-19  9:28 ` [PATCH v2 0/5] iommu/s390: Further improvements Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221109142903.4080275-1-schnelle@linux.ibm.com \
    --to=schnelle@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gbayer@linux.ibm.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --cc=robin.murphy@arm.com \
    --cc=svens@linux.ibm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).