[PATCH] iommu: Remove functions that support private domain

Joerg Roedel joro at 8bytes.org
Thu May 14 19:56:15 UTC 2020


On Thu, May 14, 2020 at 06:44:16PM +0000, Prakhya, Sai Praneeth wrote:
> Could you please explain why we shouldn't change default-domain for an
> iommu group that has multiple devices?

Because you can't be sure that a device is bound to a driver while the
default domain of the group is changed. As long as this race condition
exists we can't change the default domains of groups with multiple
devices at runtime.

> I am asking this particularly because the patch set I am working on
> allows to change default-domain for an iommu group that has multiple
> devices. The pre-requisite being that all the devices in the group
> should already be unbounded from the device driver and the
> default-domain preferences of all the devices in the group shouldn't
> have conflicting types i.e. some devices cannot say they *only* need
> identity domain while other devices in the same group say that they
> *only* need to be in DMA domain. In this case, we will not be able to
> decide upon a default-domain for the iommu group.

Yeah, but as I wrote above, this is racy and there is currently no way
to fix that. So we can't support it.


Regards,

	Joerg


More information about the iommu mailing list