vfio: add multi container support
authorXiao Wang <xiao.w.wang@intel.com>
Tue, 17 Apr 2018 07:06:21 +0000 (15:06 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 14:54:55 +0000 (15:54 +0100)
commitea2dc1066870906fba326837d2efe8a37a99eebe
tree2e42ef50ef6877c60e95a9cb36c313d9c4faa3dc
parent340b7bb8d583661369a9491ade63fe2407e85267
vfio: add multi container support

This patch adds APIs to support container create/destroy and device
bind/unbind with a container. It also provides API for IOMMU programing
on a specified container.

A driver could use "rte_vfio_container_create" helper to create a new
container from eal, use "rte_vfio_container_group_bind" to bind a device
to the newly created container. During rte_vfio_setup_device the container
bound with the device will be used for IOMMU setup.

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/bsdapp/eal/eal.c
lib/librte_eal/common/include/rte_vfio.h
lib/librte_eal/linuxapp/eal/eal_vfio.c
lib/librte_eal/rte_eal_version.map