vfio: check if group fd is already open
authorDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Mon, 17 Sep 2018 13:46:42 +0000 (15:46 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 29 Oct 2018 00:58:31 +0000 (01:58 +0100)
commitdb9d32b8b73e3fc9e16f8a38e5b7f66a5df0e36a
tree328d9319b615312530711b26d045c52a26e02b36
parent630deed612ca382f48a3ef4b65dfc74b7cd09cf9
vfio: check if group fd is already open

Always attempt to find already opened fd for an iommu
group as subsequent attempts to open it will fail.

There's no public API to check if a group was already
bound and has a container, so rte_vfio_container_group_bind()
shouldn't fail in such case.

Fixes: ea2dc1066870 ("vfio: add multi container support")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/linuxapp/eal/eal_vfio.c