vfio: fix device unplug when several devices per group
authorAlejandro Lucero <alejandro.lucero@netronome.com>
Wed, 26 Apr 2017 10:49:47 +0000 (11:49 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 30 Apr 2017 17:28:13 +0000 (19:28 +0200)
commita9c349e3a100a9f9995a3d71cbd26b4f789ddef5
tree904281b25191a445daf6aa059d66f86172df916e
parent1123f89f6a86dd31bd19c68ec1f10f90b107ac91
vfio: fix device unplug when several devices per group

VFIO allows a secure way of assigning devices to user space and those
devices which can not be isolated from other ones are set in same VFIO
group. Releasing or unplugging a device should be aware of remaining
devices is the same group for avoiding to close such a group.

Fixes: 94c0776b1bad ("vfio: support hotplug")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/linuxapp/eal/eal_vfio.c
lib/librte_eal/linuxapp/eal/eal_vfio.h