[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aFEAbc5URD93out3@google.com>
Date: Tue, 17 Jun 2025 05:43:09 +0000
From: Pranjal Shrivastava <praan@...gle.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: jgg@...dia.com, kevin.tian@...el.com, will@...nel.org,
robin.murphy@....com, joro@...tes.org, yi.l.liu@...el.com,
peterz@...radead.org, jsnitsel@...hat.com,
linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev,
baolu.lu@...ux.intel.com
Subject: Re: [PATCH v2 10/14] iommu/arm-smmu-v3: Replace arm_vsmmu_alloc with
arm_vsmmu_init
On Mon, Jun 16, 2025 at 07:15:19PM -0700, Nicolin Chen wrote:
> On Mon, Jun 16, 2025 at 10:43:22PM +0000, Pranjal Shrivastava wrote:
> > On Fri, Jun 13, 2025 at 11:35:22PM -0700, Nicolin Chen wrote:
> > > To ease the for-driver iommufd APIs, get_viommu_size and viommu_init ops
> > > are introduced.
> > >
> > > Sanitize the inputs and report the size of struct arm_vsmmu on success, in
> > > arm_smmu_get_viommu_size().
> > >
> > > Place the type sanity at the last, becase there will be soon an impl level
> > > get_viommu_size op, which will require the same sanity tests prior. It can
> > > simply insert a piece of code in front of the IOMMU_VIOMMU_TYPE_ARM_SMMUV3
> > > sanity.
> > >
> >
> > That's what I was wondering, so we plan to replace the impl->vsmmu_alloc
> > op as well?
>
> There is no such op in v6.16-rc1.
>
> > > - return &vsmmu->core;
> > > + viommu->ops = &arm_vsmmu_ops;
> > > + return 0;
> > > }
> >
> > Seems much better now that the driver doesn't need to callback to the
> > core for allocating viommu. One quick question though I see we've
> > removed the following too:
> >
> > if (master->smmu->impl_ops &&master->smmu->impl_ops->vsmmu_alloc)
> > vsmmu = master->smmu->impl_ops->vsmmu_alloc(
> > master->smmu, s2_parent,
> > ictx, viommu_type,
> > user_data);
> >
> > Not sure why don't I see that in the diffs.. do we plan to split this
> > into an impl-specific size and init too?
>
> Because there is no vsmmu_alloc in v6.16-rc1. I guess you are
> referring to older versions of HW queue (vCMDQ) series that
> was not merged?
That's right, my bad. I rebased the older series while pulling,
apologies for the confusion!
Reviewed-by: Pranjal Shrivastava <praan@...gle.com>
>
> Thanks
> Nicolin
Thanks!
Powered by blists - more mailing lists