On Fri, Mar 19, 2021 at 04:25:40PM -0600, Alex Williamson wrote: > I've been trying to figure out how, but I think not. A user can have > multiple devices, each with entirely separate IOMMU contexts. For each > device, the user can create an mmap of memory to that device and add it > to every other IOMMU context. That enables peer to peer DMA between > all the devices, across all the IOMMU contexts. But each individual > device has no direct reference to any IOMMU context other than its own. > A callback on the IOMMU can't reach those other contexts either, there's > no guarantee those other contexts are necessarily managed via the same > vfio IOMMU backend driver. A notifier is the best I can come up with, > please suggest if you have other ideas. Thanks, Indeed, reviewing the set again it seems like we need the notifier here.