iommu: Add generic PASID table library
hulk inclusion category: feature bugzilla: 14369 CVE: NA ------------------- Add a small API within the IOMMU subsystem to handle different formats of PASID tables. It uses the same principle as io-pgtable: * The IOMMU driver registers a PASID table with some invalidation callbacks. * The pasid-table lib allocates a set of tables of the right format, and returns an iommu_pasid_table_ops structure. * The IOMMU driver allocates entries and writes them using the provided ops. * The pasid-table lib calls the IOMMU driver back for invalidation when necessary. * The IOMMU driver unregisters the ops which frees the tables when finished. An example user will be Arm SMMU in a subsequent patch. Other IOMMU drivers (e.g. paravirtualized ones) will be able to use the same PASID table code. Signed-off-by:Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by:
Fang Lijun <fanglijun3@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Reviewed-by:
Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Loading
Please sign in to comment