]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: Don't overreact to DEL_DEVICE
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 10 Jun 2013 22:40:56 +0000 (16:40 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 24 Jul 2013 22:36:00 +0000 (16:36 -0600)
commite9fcfd0b838fc39e443ba40b99d3229175f59a30
tree7ad1108d39c1a7dbed91db60c2a63321d19da3c3
parenta3079e9139cd68a2ce172277272f72e0aa13bdb1
vfio: Don't overreact to DEL_DEVICE

BUS_NOTIFY_DEL_DEVICE triggers IOMMU drivers to remove devices from
their iommu group, but there's really nothing we can do about it at
this point.  If the device is in use, then the vfio sub-driver will
block the device_del from completing until it's released.  If the
device is not in use or not owned by a vfio sub-driver, then we
really don't care that it's being removed.

The current code can be triggered just by unloading an sr-iov driver
(ex. igb) while the VFs are attached to vfio-pci because it makes an
incorrect assumption about the ordering of driver remove callbacks
vs the DEL_DEVICE notification.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c