From: Jason Gunthorpe <jgg@nvidia.com>
To: Yi Liu <yi.l.liu@intel.com>
Cc: joro@8bytes.org, kevin.tian@intel.com, baolu.lu@linux.intel.com,
iommu@lists.linux.dev, robin.murphy@arm.com, nicolinc@nvidia.com,
will@kernel.org
Subject: Re: [PATCH 5/5] iommu: Retire group->domain
Date: Thu, 20 Feb 2025 12:18:14 -0400 [thread overview]
Message-ID: <20250220161814.GC50639@nvidia.com> (raw)
In-Reply-To: <a72d2d49-a3e8-4da4-8a2a-355c0fc03df0@intel.com>
On Thu, Feb 20, 2025 at 12:01:56PM +0800, Yi Liu wrote:
> On 2025/2/19 21:10, Jason Gunthorpe wrote:
> > On Wed, Feb 19, 2025 at 08:31:52PM +0800, Yi Liu wrote:
> > > > > And then iommu_get_domain_for_dev() which explains it is an older
> > > > > function that depends on the caller somehow ensuring that the attached
> > > > > domain cannot change. Ideally we would someday try to remove calls to
> > > > > iommu_get_domain_for_dev()..
> > >
> > > currently, the paths hold group->mutex are mostly in the iommu drivers.
> > > So what we may do is updating the iommu drivers to use a version that
> > > has lockdep. While other callers keep using the iommu_get_domain_for_dev().
> >
> > Honestly I would prefer to pass the old domain in as a function argument to
> > attach and remove the calls entirely.
>
> hmmm. I may drop the retire group->domain from this series to avoid
> blocking the iommufd pasid series.
Ok
> yes. Since group->domain is set/clear under group->mutex as well. So I'm
> wondering if it is ok to add kdoc to iommu_get_domain_for_dev() to note
> it, and just add the xa_load && entry_decode stuffs without lockdep?
Yes, kdoc is the way to go here
Jason
next prev parent reply other threads:[~2025-02-20 16:18 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 6:05 [PATCH 0/5] Misc iommu_attach_handle enhancements in iommu core Yi Liu
2025-02-12 6:05 ` [PATCH 1/5] iommu: Make @handle mandatory in iommu_{attach|replace}_group_handle() Yi Liu
2025-02-18 19:09 ` Jason Gunthorpe
2025-02-19 16:48 ` Nicolin Chen
2025-02-20 3:50 ` Yi Liu
2025-02-20 8:21 ` Tian, Kevin
2025-02-12 6:05 ` [PATCH 2/5] iommu: Drop iommu_group_replace_domain() Yi Liu
2025-02-18 19:10 ` Jason Gunthorpe
2025-02-19 16:53 ` Nicolin Chen
2025-02-20 3:51 ` Yi Liu
2025-02-20 8:22 ` Tian, Kevin
2025-02-12 6:05 ` [PATCH 3/5] iommu: Store either domain or handle in group->pasid_array Yi Liu
2025-02-18 19:14 ` Jason Gunthorpe
2025-02-19 17:15 ` Nicolin Chen
2025-02-20 3:51 ` Yi Liu
2025-02-20 8:28 ` Tian, Kevin
2025-02-20 8:27 ` Tian, Kevin
2025-02-12 6:05 ` [PATCH 4/5] iommu: Swap the order of setting group->pasid_array and calling attach op of iommu drivers Yi Liu
2025-02-18 19:27 ` Jason Gunthorpe
2025-02-19 4:29 ` Yi Liu
2025-02-20 8:31 ` Tian, Kevin
2025-02-12 6:05 ` [PATCH 5/5] iommu: Retire group->domain Yi Liu
2025-02-18 19:39 ` Jason Gunthorpe
2025-02-19 6:52 ` Yi Liu
2025-02-19 12:31 ` Yi Liu
2025-02-19 13:10 ` Jason Gunthorpe
2025-02-20 4:01 ` Yi Liu
2025-02-20 8:33 ` Tian, Kevin
2025-02-20 16:18 ` Jason Gunthorpe [this message]
2025-02-18 19:57 ` Jason Gunthorpe
2025-02-19 12:20 ` Yi Liu
2025-02-12 15:25 ` [PATCH 0/5] Misc iommu_attach_handle enhancements in iommu core Jason Gunthorpe
2025-02-13 3:16 ` Yi Liu
2025-02-13 15:08 ` 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=20250220161814.GC50639@nvidia.com \
--to=jgg@nvidia.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=nicolinc@nvidia.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=yi.l.liu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.