vfio: extend data structure for multi container
authorXiao Wang <xiao.w.wang@intel.com>
Tue, 17 Apr 2018 07:06:20 +0000 (15:06 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 14:54:55 +0000 (15:54 +0100)
commit340b7bb8d583661369a9491ade63fe2407e85267
tree67313a2efe896d0e2439fb307c6778612fde9c22
parentc0e3f8ed6cfa444fddef6242cabc2b9d83daed41
vfio: extend data structure for multi container

Currently eal vfio framework binds vfio group fd to the default
container fd during rte_vfio_setup_device, while in some cases,
e.g. vDPA (vhost data path acceleration), we want to put vfio group
to a separate container and program IOMMU via this container.

This patch extends the vfio_config structure to contain per-container
user_mem_maps and defines an array of vfio_config. The next patch will
base on this to add container API.

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>
config/common_base
config/rte_config.h
lib/librte_eal/linuxapp/eal/eal_vfio.c
lib/librte_eal/linuxapp/eal/eal_vfio.h