iommufd: Apply the new iommufd_object_alloc_ucmd helper
authorNicolin Chen <nicolinc@nvidia.com>
Sat, 14 Jun 2025 06:35:26 +0000 (23:35 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 19 Jun 2025 18:43:30 +0000 (15:43 -0300)
commit3e2a9811f6a9cefd310cc33cab73d5435b4a4caa
tree4040f729be4d1a7769b9361c6e4e4dd96599fe8f
parentc0d498a1b99d5417f19c35ecd98ac0ff73c351a4
iommufd: Apply the new iommufd_object_alloc_ucmd helper

Now the new ucmd-based object allocator eases the finalize/abort routine,
apply this to all existing allocators that aren't protected by any lock.

Upgrade the for-driver vIOMMU alloctor too, and pass down to all existing
viommu_alloc op accordingly.

Note that __iommufd_object_alloc_ucmd() builds in some static tests that
cover both static_asserts in the iommufd_viommu_alloc(). Thus drop them.

Link: https://patch.msgid.link/r/107b24a3b791091bb09c92ffb0081c56c413b26d.1749882255.git.nicolinc@nvidia.com
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/eventq.c
drivers/iommu/iommufd/viommu.c