Re: [PATCH v3 07/11] iommu: Prepare for separating SVA and IOPF

From: Jason Gunthorpe
Date: Mon Aug 21 2023 - 13:07:07 EST


On Fri, Aug 18, 2023 at 07:40:43AM +0800, Lu Baolu wrote:
> Move iopf_group data structure to iommu.h. This is being done to make it
> a minimal set of faults that a domain's page fault handler should handle.
>
> Add two new helpers for the domain's page fault handler:
> - iopf_free_group: free a fault group after all faults in the group are
> handled.
> - iopf_queue_work: queue a given work item for a fault group.
>
> This will simplify the sequential patches.
>
> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> ---
> include/linux/iommu.h | 12 ++++++++++
> drivers/iommu/io-pgfault.c | 49 ++++++++++++++++++++++----------------
> 2 files changed, 41 insertions(+), 20 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason