linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Niklas Schnelle <schnelle@linux.ibm.com>
To: Matthew Rosato <mjrosato@linux.ibm.com>,
	Pierre Morel <pmorel@linux.ibm.com>,
	iommu@lists.linux.dev
Cc: 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, joro@8bytes.org, will@kernel.org,
	Robin Murphy <robin.murphy@arm.com>,
	linux-kernel@vger.kernel.org, Jason Gunthorpe <jgg@nvidia.com>
Subject: Re: [PATCH v6 0/6] iommu/s390: Fixes related to attach and aperture handling
Date: Mon, 10 Oct 2022 16:54:07 +0200	[thread overview]
Message-ID: <838e7df1128e52ac5229307dde6690c2e26b830c.camel@linux.ibm.com> (raw)
In-Reply-To: <20221007095005.2017126-1-schnelle@linux.ibm.com>

On Fri, 2022-10-07 at 11:49 +0200, Niklas Schnelle wrote:
> Hi All,
> 
> This is v5 of a follow up to Matt's recent series[0] where he tackled
> a race that turned out to be outside of the s390 IOMMU driver itself as
> well as duplicate device attachments. After an internal discussion we came
> up with what I believe is a cleaner fix. Instead of actively checking for
> duplicates we instead detach from any previous domain on attach. From my
> cursory reading of the code this seems to be what the Intel IOMMU driver is
> doing as well.
> 
> Moreover we drop the attempt to re-attach the device to its previous IOMMU
> domain on failure. This was fragile, unlikely to help and unexpected for
> calling code. Thanks Jason for the suggestion.
> 
> We can also get rid of struct s390_domain_device entirely if we instead
> thread the list through the attached struct zpci_devs. This saves us from
> having to allocate during attach and gets rid of one level of indirection
> during IOMMU operations.
> 
> Additionally 3 more fixes have been added in v3 that weren't in v2 of this
> series. One is for a potential situation where the aperture of a domain
> could shrink and leave invalid translations. The next one fixes an off by
> one in checking validity of an IOVA and the last one fixes a wrong value
> for pgsize_bitmap.
> 
> In v4 we also add a patch changing to the map_pages()/unmap_pages()
> interface in order to prevent a performance regression due to the
> pgsize_bitmap change.
> 
> *Note*:
> This series is against the s390 features branch[1] which already contains
> the bus_next field removal that was part of v2.
> 
> It is also available as branch iommu_fixes_v6 with the GPG signed tag
> s390_iommu_fixes_v5 on my niks/linux.git on git.kernel.org[2].
> 
> *Open Question*:
> Which tree should this go via?

The conflicting commit that removed the bus_next field from struct
zpci_dev has now made it into Linus' tree via the s390 pull. So this
series now applies cleanly on mainline master. Still not sure though
which tree this would best go into.

> 
> Best regards,
> Niklas
> 
> 
---8<---



  parent reply	other threads:[~2022-10-10 14:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-07  9:49 [PATCH v6 0/6] iommu/s390: Fixes related to attach and aperture handling Niklas Schnelle
2022-10-07  9:50 ` [PATCH v6 1/6] iommu/s390: Fix duplicate domain attachments Niklas Schnelle
2022-10-07 13:28   ` Matthew Rosato
2022-10-07  9:50 ` [PATCH v6 2/6] iommu/s390: Get rid of s390_domain_device Niklas Schnelle
2022-10-07  9:50 ` [PATCH v6 3/6] iommu/s390: Fix potential s390_domain aperture shrinking Niklas Schnelle
2022-10-07  9:50 ` [PATCH v6 4/6] iommu/s390: Fix incorrect aperture check Niklas Schnelle
2022-10-07  9:50 ` [PATCH v6 5/6] iommu/s390: Fix incorrect pgsize_bitmap Niklas Schnelle
2022-10-07  9:50 ` [PATCH v6 6/6] iommu/s390: Implement map_pages()/unmap_pages() instead of map()/unmap() Niklas Schnelle
2022-10-10 14:54 ` Niklas Schnelle [this message]
2022-10-10 18:45   ` [PATCH v6 0/6] iommu/s390: Fixes related to attach and aperture handling Jason Gunthorpe
2022-10-11 11:03     ` Niklas Schnelle
2022-10-11 12:34       ` Jason Gunthorpe

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=838e7df1128e52ac5229307dde6690c2e26b830c.camel@linux.ibm.com \
    --to=schnelle@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@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).