From: Peng Fan <peng.fan@oss.nxp.com>
To: Nicolin Chen <nicolinc@nvidia.com>,
Robin Murphy <robin.murphy@arm.com>,
Jason Gunthorpe <jgg@ziepe.ca>
Cc: Robin Murphy <robin.murphy@arm.com>,
Jason Gunthorpe <jgg@ziepe.ca>, Will Deacon <will@kernel.org>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
Jean-Philippe Brucker <jpb@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Krishna Reddy <vdumpa@nvidia.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH RFC v6 5/5] iommu/arm-smmu-v3: Wire up shared-SID STE ordering and feature gating
Date: Fri, 30 Oct 2026 20:12:54 +0800 [thread overview]
Message-ID: <auSJxoCvrdMg/rZN@shlinux89> (raw)
In-Reply-To: <as6HfzpcalIh6SMs@nvidia.com>
Hi Nicolin, Robin, Jason
On Tue, Oct 13, 2026 at 12:33:19PM -0700, Nicolin Chen wrote:
>On Tue, Oct 13, 2026 at 05:23:21PM +0100, Robin Murphy wrote:
>> On 13/10/2026 1:44 pm, Jason Gunthorpe wrote:
>> > On Tue, Oct 13, 2026 at 12:22:06PM +0100, Robin Murphy wrote:
>> > > If we're not going to support PASID for shared streams (which I suggest we
>> > > don't...) than we shouldn't strictly need to worry about CD tables anyway.
>> > > So rather than having to special-case CD table sharing for shared streams,
>> > > perhaps it might make sense to generalise back to a "default" per-domain CD
>> > > for non-PASID use, which can then get switched for the private per-stream
>> > > cd_table if and when a device does enable PASID?
>> >
>> > If we have stared STEs then the group becomes the per-STE data
>> > structure not the master.. We don't have any way right now to do that,
>> > but it would make some sense for the group to store the shared CD
>>
>> That would be precisely the aforementioned special case that I'd hope to
>> avoid. My point is that the CD represents the domain context, so we really
>> shouldn't have to have multiple copies of that per-device _or_ per-group,
>> _unless_ it is attached via a PASID, since in that case it does need to be
>> copied into a per-device CD table (since the per-domain CD table was indeed
>> the wrong move in hindsight).
>>
>> So what I'm saying is that if we're going to make anything share CDs, then
>> ideally we should just make all non-PASID devices always directly share the
>> domain's own CD, then if we just enforce that any devices sharing StreamIDs
>> must be non-PASID devices, it should all work out, we save some memory in
>> the normal case, and never have to be concerned with rewriting any STE with
>> a different S1ContextPtr for the _same_ domain except when enabling or
>> disabling PASID for the (single) device owning that STE.
>
>FWIW, master->ats_always_on would be a special case here: it is
>non-PASID but needs s1cdmax to be non zero.
>
>But yea, that sounds like a good approach, though requires a big
>refactor.
I just post out RFC V7 version with sharing CD table. But I not
have the hardware to test the advanced features (:
only tested i.MX95, Qemu, KUNIT.
Thanks
Peng
>
>Thanks
>Nicolin
>
>
prev parent reply other threads:[~2026-10-30 12:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 11:31 [PATCH RFC v6 0/5] iommu/arm-smmu-v3: Support shared Stream IDs Peng Fan (OSS)
2026-10-11 11:31 ` [PATCH RFC v6 1/5] iommu/arm-smmu-v3: Allocate streams individually Peng Fan (OSS)
2026-10-11 11:31 ` [PATCH RFC v6 2/5] iommu/arm-smmu-v3: Delay stream allocation to inside the mutex Peng Fan (OSS)
2026-10-12 20:36 ` Nicolin Chen
2026-10-11 11:31 ` [PATCH RFC v6 3/5] iommu/arm-smmu-v3: Support shared SIDs in insert/remove_master Peng Fan (OSS)
2026-10-12 20:48 ` Nicolin Chen
2026-10-11 11:31 ` [PATCH RFC v6 4/5] iommu/arm-smmu-v3: Group aliasing devices into the same IOMMU group Peng Fan (OSS)
2026-10-12 12:24 ` Peng Fan
2026-10-12 13:05 ` Robin Murphy
2026-10-11 11:31 ` [PATCH RFC v6 5/5] iommu/arm-smmu-v3: Wire up shared-SID STE ordering and feature gating Peng Fan (OSS)
2026-10-12 13:23 ` Peng Fan
2026-10-12 23:54 ` Nicolin Chen
2026-10-13 11:22 ` Robin Murphy
2026-10-13 12:44 ` Jason Gunthorpe
2026-10-13 14:46 ` Peng Fan
2026-10-13 15:14 ` Jason Gunthorpe
2026-10-13 18:26 ` Nicolin Chen
2026-10-13 16:23 ` Robin Murphy
2026-10-13 19:33 ` Nicolin Chen
2026-10-30 12:12 ` Peng Fan [this message]
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=auSJxoCvrdMg/rZN@shlinux89 \
--to=peng.fan@oss.nxp.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=jonathanh@nvidia.com \
--cc=joro@8bytes.org \
--cc=jpb@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=peng.fan@nxp.com \
--cc=robin.murphy@arm.com \
--cc=thierry.reding@kernel.org \
--cc=vdumpa@nvidia.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