[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXgw2Jozu0pwFNFI@Asurada-Nvidia>
Date: Mon, 26 Jan 2026 19:28:24 -0800
From: Nicolin Chen <nicolinc@...dia.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: <will@...nel.org>, <robin.murphy@....com>, <joro@...tes.org>,
<jpb@...nel.org>, <praan@...gle.com>, <miko.lenczewski@....com>,
<linux-arm-kernel@...ts.infradead.org>, <iommu@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>, <patches@...ts.linux.dev>
Subject: Re: [PATCH v2 02/10] iommu/arm-smmu-v3: Pass in IOTLB cache tag to
CD and STE
On Mon, Jan 26, 2026 at 04:53:58PM -0400, Jason Gunthorpe wrote:
> On Wed, Jan 21, 2026 at 05:24:20PM -0800, Nicolin Chen wrote:
> > Now, struct arm_smmu_attach_state has the IOTLB cache tags copied from the
> > cd->asid or s2_cfg->vmid of an smmu_domain.
> >
> > Pass it down to arm_smmu_make_s1_cd() and arm_smmu_make_s2_domain_ste() to
> > set in the CD and STE, removing the references of smmu_domain for its asid
> > or vmid.
> >
> > Note the two set_dev_pasid callbacks finalize CDs in arm_smmu_set_pasid().
> > So, it is safe for arm_smmu_make_sva_cd() and arm_smmu_make_s1_cd() to use
> > a dummy iotlb tag (asid=0) because arm_smmu_set_pasid() will fix it.
>
> Maybe it is time to fix that up?
>
> I think if you make arm_smmu_set_pasid() take in a function pointer of signature:
>
> void (*func)(struct arm_smmu_cd *target,
> struct arm_smmu_master *master,
> struct arm_smmu_domain *smmu_domain,
> struct arm_smmu_inv *tag)
>
> It can accept both arm_smmu_make_s1_cd() and arm_smmu_make_sva_cd()
> then call them at the right point once the tag is finally known.
Ack. That's cleaner. I will add a preparatory patch doing this.
Thanks!
Nicolin
Powered by blists - more mailing lists