On Fri, Apr 12, 2024 at 01:15:08AM -0700, Yi Liu wrote: > @@ -413,9 +414,23 @@ struct attach_data { > struct iommufd_hw_pagetable *(*attach_fn)( > struct iommufd_device *idev, > struct iommufd_hw_pagetable *hwpt); > + struct iommufd_hw_pagetable *(*pasid_attach_fn)( > + struct iommufd_device *idev, u32 pasid, > + struct iommufd_hw_pagetable *hwpt); > }; > + u32 pasid; > }; I suggest you change this around to pass the attach_data to the attach_fn and just pass the pasid through that way instead of having to function pointers. Jason