On Wed, Apr 26, 2017 at 9:58 AM, Burakov, Anatoly <anatoly.bura...@intel.com > wrote:
> Hi Alejandro, > > > I was counting on first submitted patch being accepted. > > OK, that's on me then. > > > There is another thing to solve which is to unplug ports when there are > more than one (already plugged) in an IOMMU group. I have a patch for this > but I can not test it for that scenario, just for the "normal" one with one > port/device per IOMMU group. > I'm working on having a way for testing the > first case. > > Have you tried older kernel versions yet? Those seem to work for me. > > I'm trying that one but run in some problems. Likely that is the quickest way although I'm thinking on adding some option to the kernel for people with such a hardware being able to test that option. > > The only problem is after that, none else device hotplug can happen. I > know that is not a good thing because it requires to restart the app, but > better than breaking the app with a crash. > > Presumably, you're only talking about VFIO hotplug, and not hotplug in > general? Is there anything that can be done to fix this issue in the long > run? > > Yes, just talking about VFIO. I think that patch I have should solve the issue. It is just a matter of tracking how many devices are in use on a vfio group, so just adding a new field to struct vfio_group and checking number of devices when unplugging should be enough. Just when is the only device plugged should close the vfio group. > Thanks, > Anatoly > >