[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aQjOEQOPP2p1KsIX@Asurada-Nvidia>
Date: Mon, 3 Nov 2025 07:45:21 -0800
From: Nicolin Chen <nicolinc@...dia.com>
To: Pranjal Shrivastava <praan@...gle.com>
CC: <jgg@...dia.com>, <will@...nel.org>, <robin.murphy@....com>,
<joro@...tes.org>, <kevin.tian@...el.com>,
<linux-arm-kernel@...ts.infradead.org>, <iommu@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>, <skolothumtho@...dia.com>
Subject: Re: [PATCH] iommu/arm-smmu-v3-iommufd: Allow attaching nested domain
for GBPA cases
On Mon, Nov 03, 2025 at 02:29:34PM +0000, Pranjal Shrivastava wrote:
> On Thu, Oct 23, 2025 at 09:05:51PM -0700, Nicolin Chen wrote:
> > int arm_smmu_attach_prepare_vmaster(struct arm_smmu_attach_state *state,
> > struct arm_smmu_nested_domain *nested_domain)
> > {
> > + unsigned int cfg =
> > + FIELD_GET(STRTAB_STE_0_CFG, le64_to_cpu(nested_domain->ste[0]));
> > struct arm_smmu_vmaster *vmaster;
> > - unsigned long vsid;
> > + unsigned long vsid = 0;
>
> I'm a little confused here, can we not have a vDEVICE allocated with
> vSID = 0 ?
Ah, good catch..
> Perhaps a separate bool has_vdevice flag in struct arm_smmu_vmaster
> would be clearer and avoid this ambiguity, allowing vsid = 0 to be a
> valid ID for an allocated vdevice when user-space explicitly requests it?
Yes. I will send a v2.
Thanks
Nicolin
Powered by blists - more mailing lists