[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9737606f-d3af-4c20-b1ce-7c705a7c8590@linux.intel.com>
Date: Sun, 27 Apr 2025 14:55:40 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Nicolin Chen <nicolinc@...dia.com>, jgg@...dia.com, kevin.tian@...el.com,
corbet@....net, will@...nel.org
Cc: bagasdotme@...il.com, robin.murphy@....com, joro@...tes.org,
thierry.reding@...il.com, vdumpa@...dia.com, jonathanh@...dia.com,
shuah@...nel.org, jsnitsel@...hat.com, nathan@...nel.org,
peterz@...radead.org, yi.l.liu@...el.com, mshavit@...gle.com,
praan@...gle.com, zhangzekun11@...wei.com, iommu@...ts.linux.dev,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-tegra@...r.kernel.org,
linux-kselftest@...r.kernel.org, patches@...ts.linux.dev, mochs@...dia.com,
alok.a.tiwari@...cle.com, vasant.hegde@....com
Subject: Re: [PATCH v2 05/22] iommufd: Add iommufd_struct_destroy to revert
iommufd_viommu_alloc
On 4/26/25 13:58, 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.
A brief explanation or a small code snippet illustrating a typical
allocation and potential abort scenario would be helpful.
> Move iommufd_object_abort() to the driver.c file and the public header, to
> introduce common iommufd_struct_destroy() helper that will abort all kinds
> of driver structures, not confined to iommufd_viommu but also the new ones
> being added in the future.
>
> Reviewed-by: Jason Gunthorpe<jgg@...dia.com>
> Signed-off-by: Nicolin Chen<nicolinc@...dia.com>
Reviewed-by: Lu Baolu <baolu.lu@...ux.intel.com>
Thanks,
baolu
Powered by blists - more mailing lists