Re: [PATCH v4 6/7] iommu: Introduce iommu_dev_reset_prepare() and iommu_dev_reset_done()

Jason Gunthorpe
2025-09-15T12:54:02Z

On Fri, Sep 12, 2025 at 09:49:13AM +0000, Tian, Kevin wrote:
> > There are two corner cases that won't work:
> > 1. Alias devices that share the same RID
> > Blocking one device also blocks the other alias devices that might not
> > want a reset. Given that it's very rare for an alias device to support
> > ATS, simply skip the blocking routine.
>
> it also applies to the devices in the same iommu group. While one device
> is being reset, all other devices in the group cannot change the domain.
> This needs to be documented in the attach uAPI.

I think we should just exclude multi-device groups for the first
version of this.

We really need to fixup multi-device groups to distinguish between
cases where the group is there for aliases and we must have consistent
domains across the whole group and cases where the group is there just
for representing isolation and different domains are fine.

We are now having workloads where this difference matters, ATS reset
is one case, but I'm interesting in seeing iommufd able to control
domains per-device within a group. We have some HW that wants this.

Jason