Re: [RFC 13/20] iommu: Extend iommu_at[de]tach_device() for multiple devices group

From: Jason Gunthorpe
Date: Mon Oct 25 2021 - 19:36:11 EST


On Tue, Oct 26, 2021 at 12:16:43AM +1100, David Gibson wrote:
> If you attach devices A and B (both in group X) to IOAS 1, then detach
> device A, what happens? Do you detach both devices? Or do you have a
> counter so you have to detach as many time as you attached?

I would refcount it since that is the only thing that makes semantic
sense with the device centric model.

Jason