numam-dpdk/drivers/bus/fslmc
Romain Delhomel 36c3c4df13 bus/fslmc: fix VFIO setup
At device probe, the fslmc bus driver calls rte_vfio_get_group_fd() to
get a fd associated to a vfio group. This function first checks if the
group is already opened, else it opens /dev/vfio/%u, and increases the
number of active groups in default_vfio_cfg (which references the
default vfio container).

When adding the first group to a vfio_cfg, the caller is supposed to
pick an IOMMU type and set up DMA mappings for container, as it's done
by pci bus, but it is not done here. Instead, a new container is created
and used.

This prevents the pci bus driver, which uses the default_vfio_cfg
container, to configure the container because
default_vfio_cfg->active_group > 1.

This patch fixes the issue by always creating a new container (and its
associated vfio_cfg) and binding the group to it.

Fixes: a69f793002 ("bus/fslmc: support multi VFIO group")
Cc: stable@dpdk.org

Signed-off-by: Romain Delhomel <romain.delhomel@6wind.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2022-06-07 20:49:20 +02:00
..
mc net/dpaa2: update management complex to 10.32 2022-05-10 15:43:08 +02:00
portal crypto/dpaa2_sec: create fle pool per queue pair 2022-04-29 11:27:35 +02:00
qbman bus/fslmc: use DMB OSHST for synchronization before I/O 2022-01-20 16:24:08 +01:00
fslmc_bus.c remove unnecessary null checks 2022-02-12 12:07:48 +01:00
fslmc_logs.h bus/fslmc: remove unused debug macro 2021-05-10 15:31:42 +02:00
fslmc_vfio.c bus/fslmc: fix VFIO setup 2022-06-07 20:49:20 +02:00
fslmc_vfio.h bus/fslmc: promote experimental VFIO API to stable 2021-09-24 18:43:38 +02:00
meson.build bus/fslmc: add and scan DPRC devices 2022-01-20 16:24:09 +01:00
rte_fslmc.h dma/dpaa2: introduce driver skeleton 2022-06-01 08:58:27 +02:00
version.map bus/fslmc: move experimental function to internal 2021-09-24 18:44:00 +02:00