iommu/arm-smmu-v3-iommufd: Add vsmmu_size/type and vsmmu_init impl ops
authorNicolin Chen <nicolinc@nvidia.com>
Thu, 10 Jul 2025 05:59:15 +0000 (22:59 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 11 Jul 2025 17:34:35 +0000 (14:34 -0300)
commit61dd912ee02e4d1d412e1090c6e5d7f8cd0779df
tree3c58b83921f966ca13a4f0be4abae88cf0f10a47
parent3a35f7d4a4673edf6f02422bb2d78b17c667e167
iommu/arm-smmu-v3-iommufd: Add vsmmu_size/type and vsmmu_init impl ops

An impl driver might want to allocate its own type of vIOMMU object or the
standard IOMMU_VIOMMU_TYPE_ARM_SMMUV3 by setting up its own SW/HW bits, as
the tegra241-cmdqv driver will add IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV.

Add vsmmu_size/type and vsmmu_init to struct arm_smmu_impl_ops. Prioritize
them in arm_smmu_get_viommu_size() and arm_vsmmu_init().

Link: https://patch.msgid.link/r/375ac2b056764534bb7c10ecc4f34a0bae82b108.1752126748.git.nicolinc@nvidia.com
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h