vfio: fix device hotplug when several devices per group
authorAnatoly Burakov <anatoly.burakov@intel.com>
Tue, 10 Apr 2018 10:23:30 +0000 (11:23 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 12 Apr 2018 23:17:55 +0000 (01:17 +0200)
commit08a20b3d37e4e648e1b57b6df2dd05558a987965
tree9f62d86d7cd248be65575f2efcab96e45ebbc761
parent964b2f3bfb07ae95fcf4570269a6bc0e1c0affec
vfio: fix device hotplug when several devices per group

We only need to perform DMA mapping for first device in first group.
At the time of mapping, we haven't yet added the device into the group,
so the count is expected to be zero.

Fixes: 810bfa64c673 ("vfio: fix index for tracking devices in a group")
Fixes: a9c349e3a100 ("vfio: fix device unplug when several devices per group")
Fixes: 94c0776b1bad ("vfio: support hotplug")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/linuxapp/eal/eal_vfio.c