github
Update vfio-manage to choose best VFIO driver when binding devices Rather than always binding GPUs to the vfio-pci driver, this commit introduces logic to see if the running kernel has a VFIO variant driver available that is a better match for the device. This is required on Grace-based systems where the nvgrace_gpu_vfio_pci module is required to be used in favor of the vfio-pci module. We read the mod.alias file for a given device, then we look through /lib/modules/${kernel_version}/modules.alias for the vfio_pci alias that matches with the least number of wildcard ('*') fields. The code introduced in this commit is inspired by: https://gitlab.com/libvirt/libvirt/-/commit/82e2fac29 Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
90 of 221 new or added lines in 4 files covered. (40.72%)
3 existing lines in 1 file now uncovered.90 of 1303 relevant lines covered (6.91%)
0.07 hits per line