Re: [PATCH v1 04/16] iommufd: Add iommufd_struct_destroy to revert iommufd_viommu_alloc

2025-04-23 Thread Jason Gunthorpe
On Thu, Apr 10, 2025 at 11:37:43PM -0700, Nicolin Chen wrote: > An IOMMU driver that allocated a vIOMMU may want to revert the allocation, > if it encounters an internal error after the allocation. So, there needs a > destroy helper for drivers to use. > > Move iommufd_object_abort() to the driver

[PATCH v1 04/16] iommufd: Add iommufd_struct_destroy to revert iommufd_viommu_alloc

2025-04-10 Thread Nicolin Chen
An IOMMU driver that allocated a vIOMMU may want to revert the allocation, if it encounters an internal error after the allocation. So, there needs a destroy helper for drivers to use. Move iommufd_object_abort() to the driver.c file and the public header, to introduce common iommufd_struct_destro