[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z9B2LMIi+88hlfza@Asurada-Nvidia>
Date: Tue, 11 Mar 2025 10:43:08 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Will Deacon <will@...nel.org>
CC: <jgg@...dia.com>, <kevin.tian@...el.com>, <corbet@....net>,
<joro@...tes.org>, <suravee.suthikulpanit@....com>, <robin.murphy@....com>,
<dwmw2@...radead.org>, <baolu.lu@...ux.intel.com>,
<linux-kernel@...r.kernel.org>, <iommu@...ts.linux.dev>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kselftest@...r.kernel.org>,
<linux-doc@...r.kernel.org>, <eric.auger@...hat.com>,
<jean-philippe@...aro.org>, <mdf@...nel.org>, <mshavit@...gle.com>,
<shameerali.kolothum.thodi@...wei.com>, <smostafa@...gle.com>,
<ddutile@...hat.com>, <yi.l.liu@...el.com>, <praan@...gle.com>,
<patches@...ts.linux.dev>
Subject: Re: [PATCH v8 12/14] iommu/arm-smmu-v3: Introduce struct
arm_smmu_vmaster
On Tue, Mar 11, 2025 at 03:57:16PM +0000, Will Deacon wrote:
> On Tue, Feb 25, 2025 at 09:25:40AM -0800, Nicolin Chen wrote:
> > Use it to store all vSMMU-related data. The vsid (Virtual Stream ID) will
> > be the first use case. Since the vsid reader will be the eventq handler
> > that already holds a streams_mutex, reuse that to fenche the vmaster too.
>
> "fenche"?
fence :)
And I fixed other nits too.
> > +int arm_smmu_attach_prepare_vmaster(struct arm_smmu_attach_state *state,
> > + struct arm_smmu_nested_domain *nested_domain)
> > +{
> > + struct arm_smmu_vmaster *vmaster;
> > + unsigned long vsid;
> > + int ret;
> > +
> > + iommu_group_mutex_assert(state->master->dev);
> > +
> > + /* Skip invalid vSTE */
> > + if (!(nested_domain->ste[0] & cpu_to_le64(STRTAB_STE_0_V)))
> > + return 0;
>
> Ok, and we don't need to set 'state->vmaster' in this case because we
> only report stage-1 faults back to the vSMMU?
This is a good question that I didn't ask myself hard enough..
I think we should probably drop it. An invalid STE should trigger
a C_BAD_STE event that is in the supported vEVENT list. I'll run
some test before removing this line from v9.
> With the nits fixed:
>
> Acked-by: Will Deacon <will@...nel.org>
Thanks!
Nicolin
Powered by blists - more mailing lists