> From: Liu, Yi L <yi.l....@intel.com>
> Sent: Thursday, September 12, 2024 9:13 PM
> 
> The iommu_attach_handle is optional in the RID attach/replace API and the
> PASID attach APIs. But it is a mandatory argument for the PASID replace API.
> Without it, the PASID replace path cannot get the old domain. Hence, the
> PASID path (attach/replace) requires the attach handle. As iommufd is the
> major user of the RID attach/replace with iommu_attach_handle, this also
> makes the iommufd always pass the attach handle for the RID path as well.
> This keeps the RID and PASID path much aligned.
> 

hmm this looks more like a design choice instead of mandatory
requirement, e.g. as Baolu commented you can also pass in the
old domain. though I'm OK with what this patch does...

Reply via email to