iommu/sva: Stop using ioasid_set for SVA
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 22 Mar 2023 20:08:00 +0000 (13:08 -0700)
committerJoerg Roedel <jroedel@suse.de>
Fri, 31 Mar 2023 08:03:25 +0000 (10:03 +0200)
commit4e14176ab13fb6986dd079c711d46b70712da2f1
tree6c189fee0c11e4fc61f3ea4afe56ea509feb270e
parent2bef9ba8aefc211674427a0db046a773001b3329
iommu/sva: Stop using ioasid_set for SVA

Instead SVA drivers can use a simple global IDA to allocate PASIDs for
each mm_struct.

Future work would be to allow drivers using the SVA APIs to reserve global
PASIDs from this IDA for their internal use, eg with the DMA API PASID
support.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20230322200803.869130-5-jacob.jun.pan@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu-sva.c
drivers/iommu/iommu-sva.h