[PATCH] bus/fslmc: fix invalid use of default VFIO config

Thomas Monjalon thomas at monjalon.net
Tue Jun 7 17:41:52 CEST 2022


03/06/2022 17:18, Romain Delhomel:
> 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: a69f79300262 ("bus/fslmc: support multi VFIO group")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Romain Delhomel <romain.delhomel at 6wind.com>
> Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>

Applied, thanks.





More information about the stable mailing list