On Fri, Sep 09, 2022 at 08:49:40AM -0400, Matthew Rosato wrote: > On 9/8/22 2:44 PM, Jason Gunthorpe wrote: > > The basic issue is that the iommu_group is being used by VFIO after all > > the device drivers have been removed. > > > > In part this is caused by bad logic inside the iommu core that doesn't > > sequence removing the device from the group properly, and in another part > > this is bad logic in VFIO continuing to use device->iommu_group after all > > VFIO device drivers have been removed. > > > > Fix both situations. Either fix alone should fix the bug reported, but > > both together bring a nice robust design to this area. > > > > This is a followup from this thread: > > > > https://lore.kernel.org/kvm/20220831201236.77595-1-mjrosato@xxxxxxxxxxxxx/ > > > > Matthew confirmed an earlier version of the series solved the issue, it > > would be best if he would test this as well to confirm the various changes > > are still OK. > > FYI I've been running this series (+ the incremental to patch 4 you > mentioned) against my original repro scenario in a loop overnight, > looks good. Thanks Matthew, looks like we need some more time on the last patch but I think the VFIO ones are OK if Alex wants to pick them before LPC is over. Jason