[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFDPtzY3EygoOpUx@nvidia.com>
Date: Mon, 16 Jun 2025 19:15:19 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Pranjal Shrivastava <praan@...gle.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 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?
Thanks
Nicolin
Powered by blists - more mailing lists