RE: [PATCH 2/2] iommu/ioasid: Remove custom IOASID allocator
From: Tian, Kevin
Date: Tue Feb 14 2023 - 20:39:27 EST
> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Sent: Tuesday, February 14, 2023 10:56 PM
>
> On Tue, Feb 14, 2023 at 06:26:25AM +0000, Tian, Kevin wrote:
> > > From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> > > Sent: Tuesday, February 14, 2023 7:46 AM
> > >
> > > > > So if a cgroup comes it is just a matter of putting charges in the
> > > > > right place which is auditable by looking at calls to attach pasid
> > > > > functions.
> > > > shouldn't we charge cg during allocation? Or it might be too early for
> > > > iommufd so we have to wait until attach?
> > >
> > > We need to sort this all out. I would expect that iommufd will have an
> > > allocation API.
> > >
> >
> > yes.
> >
> > btw presumably iommu_global_pasid_ida should be move to iommu.c
> > since it will be used beyond sva.
>
> Yeah, maybe, I'd think about moving it when we get patches to use it
> more than SVA.
>
that also works.