Re: [PATCH v1 5/8] iommu/amd: Use iommu_attach/detach_device()
From: Jason Gunthorpe
Date: Mon Feb 14 2022 - 10:01:19 EST
On Mon, Feb 14, 2022 at 03:23:07PM +0100, Joerg Roedel wrote:
> Device drivers calling into iommu_attach_device() is seldom a good
> idea. In this case the sound device has some generic hardware
> interface so that an existing sound driver can be re-used. Making this
> driver call iommu-specific functions for some devices is something hard
> to justify.
Er, so this is transparent to the generic sound device? I guess
something fixed up the dma_api on that device to keep working?
But, then, the requirement is that nobody is using the dma API when we
make this change?
> With sub-groups on the other hand it would be a no-brainer, because the
> sound device would be in a separate sub-group. Basically any device in
> the same group as the GPU would be in a separate sub-group.
I don't think it matters how big/small the group is, only that when we
change the domain we know everything flowing through the domain is
still happy.
Jason