[PATCH v1 1/1] vfio: fix device lookup with no-IOMMU mode enabled

David Marchand david.marchand at redhat.com
Thu Oct 15 18:15:41 CEST 2026


On Thu, 15 Oct 2026 at 17:44, Anatoly Burakov <anatoly.burakov at intel.com> wrote:
>
> Currently, when the `enable_unsafe_noiommu_mode` VFIO module parameter is
> set, VFIO selects PA IOVA mode and then only looks for no-IOMMU device
> nodes: `/dev/vfio/noiommu-N` in group mode, and `noiommu-vfioN` in cdev
> mode.
>
> However, the parameter does not make every VFIO device a no-IOMMU
> device. The kernel only creates a no-IOMMU group for a device that has no
> IOMMU group of its own; devices behind a real IOMMU still get a regular
> `/dev/vfio/N` group and `vfioN` cdev. On such systems, devices bound
> to `vfio-pci` are therefore reported as not managed by VFIO and fail
> to probe.
>
> Fix it by trying the regular node name first and falling back to the
> no-IOMMU one, in both group and cdev modes.
>
> Fixes: 6cb38a7f56e0 ("vfio: introduce VFIO mode")
> Fixes: d129414711aa ("vfio: introduce cdev mode")
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>

Acked-by: David Marchand <david.marchand at redhat.com>


-- 
David Marchand



More information about the dev mailing list