Comment 0 for bug 1775777

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

VFIO is currently leaving an edge case that can kill PCI Hotplug.

There are these things in place:
1. if a guest spec has a hostdev it will add
     /dev/vfio/vfio
     /dev/vfio/[0-9]*
   This works fine
2. If a device is hotplugged the custom vfio addr is resolved and added
   to the per-guest profile as per-device entry like
     "/dev/vfio/162" rwk
   This works fine and is even better since at this time it can deternine just the device it needs

But #2 needs /dev/vfio/vfio access before knowing any of that.
That leads to the case that if one has one hostdev, he can plug more and be fine.
But without any hostdev in the initial description the guest will not be allowed to access /dev/vfio/vfio which is needs to determine the indifidual entry.

Due to that it completely fails and it can't be hotplugged.

Per https://www.kernel.org/doc/Documentation/vfio.txt the base /dev/vfio/vfio is safe and is not an attach vector. So we should allow /dev/vfio/vfio in general.