Re: [PATCH v8 12/12] iommu: Use refcount for fault data access

Jason Gunthorpe
2023-12-12T15:18:51Z

On Tue, Dec 12, 2023 at 11:44:14AM +0800, Baolu Lu wrote:
> > @@ -210,7 +211,8 @@ struct iommu_domain {
> > unsigned long pgsize_bitmap; /* Bitmap of page sizes in use */
> > struct iommu_domain_geometry geometry;
> > struct iommu_dma_cookie *iova_cookie;
> > - int (*iopf_handler)(struct iopf_group *group);
> > + int (*iopf_handler)(struct iommu_fault_param *fault_param,
> > + struct iopf_group *group);
>
> How about folding fault_param into iopf_group?
>
> iopf_group is the central data around a iopf handling. The iopf_group
> holds the reference count of the device's fault parameter structure
> throughout its entire lifecycle.

Yeah, I think that is the right thing to do

Jason