> From: Nicolin Chen <nicol...@nvidia.com>
> Sent: Friday, June 24, 2022 4:00 AM
> Un-inline the domain specific logic from the attach/detach_group ops into
> two paired functions vfio_iommu_alloc_attach_domain() and
> vfio_iommu_detach_destroy_domain() that strictly deal with creating and
> destroying struct vfio_domains.
> Add the logic to check for EMEDIUMTYPE return code of
> iommu_attach_group()
> and avoid the extra domain allocations and attach/detach sequences of the
> old code. This allows properly detecting an actual attach error, like
> -ENOMEM, vs treating all attach errors as an incompatible domain.
> Co-developed-by: Jason Gunthorpe <j...@nvidia.com>
> Signed-off-by: Jason Gunthorpe <j...@nvidia.com>
> Signed-off-by: Nicolin Chen <nicol...@nvidia.com>

Reviewed-by: Kevin Tian <kevin.t...@intel.com>
iommu mailing list

Reply via email to