RE: [PATCH 01/11] iommu: Add device dma ownership set/release interfaces
From: Tian, Kevin
Date: Fri Nov 19 2021 - 00:44:41 EST
> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Sent: Thursday, November 18, 2021 9:33 PM
>
> > In concept a singleton group is different from a
> > multi-devices group which has only one device bound to driver...
>
> Really? Why? I don't see it that way..
>
> A singleton group is just a multi-device group that hasn't been
> hotplugged yet.
>
> We don't seem to have the concept of a "true" singleton group which is
> permanently single due to HW features.
>
> > This series aims to avoid conflict having both user and kernel drivers
> > mixed in a multi-devices group.
Well, the difference is just in literal. I don't know the background
why the existing iommu_attach_device() users want to do it this
way. But given the condition in iommu_attach_device() it could
in theory imply some unknown hardware-level side effect which
may break the desired functionality once the group size grows
beyond singleton. Is it a real case? I don't know...
You are now redefining that condition from singleton group to
multi-devices group with single driver bound. As long as no object
from existing driver users, I'm fine with it. But still want to raise
awareness as it does change the existing semantics (though might
be considered as an imperfect way).
Thanks
Kevin