On Wed, Nov 12, 2025 at 9:40 AM Alex Mastro <[email protected]> wrote: > > Hey David, is vfio_pci_driver_test known to be in good shape? Both on the base > commit and after my series, I am seeing below, which results in a KSFT_SKIP. > Invoking other tests in a similar way actually runs things with expected > results (my devices are already bound to vfio-pci before running anything). > > base commit: 0ed3a30fd996cb0cac872432cf25185fda7e5316 > > $ vfio_pci_driver_test -f 0000:05:00.0 > No driver found for device 0000:05:00.0 > > Same thing using the run.sh wrapper > > $ sudo ./run.sh -d 0000:05:00.0 ./vfio_pci_driver_test > + echo "0000:05:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind > + echo "vfio-pci" > /sys/bus/pci/devices/0000:05:00.0/driver_override > + echo "0000:05:00.0" > /sys/bus/pci/drivers/vfio-pci/bind > > No driver found for device 0000:05:00.0 > + echo "0000:05:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind > + echo "" > /sys/bus/pci/devices/0000:05:00.0/driver_override > + echo "0000:05:00.0" > /sys/bus/pci/drivers/vfio-pci/bind > > device = vfio_pci_device_init(device_bdf, default_iommu_mode); > if (!device->driver.ops) { > fprintf(stderr, "No driver found for device %s\n", device_bdf); > return KSFT_SKIP; > } > > Is this meant to be a placeholder for some future testing, or am I holding > things wrong?
What kind of device are you using? This test uses the selftests driver framework, so it requires a driver in tools/testing/selftests/vfio/lib/drivers to function. The driver framework allows tests to trigger real DMA and MSIs from the device in a controlled, generic, way. We currently only have drivers for Intel DSA and Intel CBDMA devices.So if you're not using one of those devices, vfio_pci_driver_test exiting with KSFT_SKIP is entirely expected. I would love to add support for more devices. Jason Gunthrope suggested supporting a driver for mlx5 class hardware, since it's broadly available. I've also had some discussions about adding a simple emulated PCIe device to QEMU for running VFIO selftests within VMs.

