public inbox for iommu@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "joro@8bytes.org" <joro@8bytes.org>,
	"jgg@nvidia.com" <jgg@nvidia.com>,
	"will@kernel.org" <will@kernel.org>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"baolu.lu@linux.intel.com" <baolu.lu@linux.intel.com>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"xueshuai@linux.alibaba.com" <xueshuai@linux.alibaba.com>
Subject: Re: [PATCH rc v6] iommu: Fix nested pci_dev_reset_iommu_prepare/done()
Date: Tue, 21 Apr 2026 10:43:44 -0700	[thread overview]
Message-ID: <aee3UHxqIOWoqbrw@Asurada-Nvidia> (raw)
In-Reply-To: <BN9PR11MB52769FE4DAB38B80D73AE6258C2C2@BN9PR11MB5276.namprd11.prod.outlook.com>

On Tue, Apr 21, 2026 at 07:01:22AM +0000, Tian, Kevin wrote:
> > From: Nicolin Chen <nicolinc@nvidia.com>
> > Sent: Saturday, April 18, 2026 12:57 PM
> > 
> > On Fri, Apr 17, 2026 at 02:44:41PM -0700, Nicolin Chen wrote:
> > > @@ -2469,9 +2469,2 @@ static int
> > __iommu_group_set_domain_internal(struct iommu_group *group,
> > >
> > > -       /*
> > > -        * This is a concurrent attach during device recovery. Reject it until
> > > -        * pci_dev_reset_iommu_done() attaches the device to group->domain.
> > > -        */
> > > -       if (group->recovery_cnt)
> > > -               return -EBUSY;
> > > -
> > 
> > On a second thought, we may not simply drop this -- IIRC, we added
> > it particularly to fence a case where gdevs share the same RID or
> > some corner case like that?
> > 
> 
> this is by design according to the original commit:
> 
> "
>     Note that there are two corner cases:
>      1. Devices in the same iommu_group
>         Since an attachment is always per iommu_group, this means that any
>         sibling devices in the iommu_group cannot change domain, to prevent
>         race conditions.
>     ...
> "

Well, we changed the implementation a few times, and it isn't in
the merged v8 cover-letter..

Nicolin

  reply	other threads:[~2026-04-21 17:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 19:46 [PATCH rc v6] iommu: Fix nested pci_dev_reset_iommu_prepare/done() Nicolin Chen
2026-04-14 14:20 ` Jason Gunthorpe
2026-04-16  7:48 ` Shuai Xue
2026-04-17  8:24 ` Tian, Kevin
2026-04-17 21:44   ` Nicolin Chen
2026-04-18  4:56     ` Nicolin Chen
2026-04-21  7:01       ` Tian, Kevin
2026-04-21 17:43         ` Nicolin Chen [this message]
2026-04-21  6:58     ` Tian, Kevin
2026-04-21 18:00       ` Nicolin Chen

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=aee3UHxqIOWoqbrw@Asurada-Nvidia \
    --to=nicolinc@nvidia.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    --cc=xueshuai@linux.alibaba.com \
    /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