Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

From: Jason Gunthorpe
Date: Thu May 06 2021 - 08:22:30 EST


On Wed, May 05, 2021 at 04:23:19PM -0700, Raj, Ashok wrote:
> > Which implies the API to the iommu driver should be more like:
> >
> > 'assign an IOASID to this RID and return the PASID'
> > 'reserve a PASID from every RID'
>
> I don't think this has any decent change of success. Its rather round about
> way to get a global PASID namespace.
>
> > 'assign an IOASID to this RID and use this specific PASID'
>
> This seems a bit complicated. Another way to specify this.

Maybe, but I don't like that the driver-based iommu API has been
corrupted by injecting a global 'first driver to claim it'
resource. It is not properly layered anymore.

Jason