mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-01 00:45:50 +00:00
![]() Since kernel 6.8, NVIDIAs vGPU driver does not use the generic mdev interface anymore, since they relied on a feature there which is not available anymore. IIUC the kernel [0] recommends drivers to implement their own device specific features since putting all in the generic one does not make sense. They now have an 'nvidia' folder in the device sysfs path, which contains the files `creatable_vgpu_types`/`current_vgpu_type` to control the virtual functions model, and then the whole virtual function has to be passed through (although without resetting and changing to the vfio-pci driver). This patch implements changes so that from a config perspective, it still is an mediated device, and we map the functionality iff the device has no mediated devices but the new NVIDIAs sysfsapi and the model name is 'nvidia-<..>' It behaves a bit different than mdevs and normal pci passthrough, as we have to choose the correct device immediately since it's bound to the pciid, but we must not bind the device to vfio-pci as the NVIDIA driver implements this functionality itself. When cleaning up, we iterate over all reserved devices (since for a mapping we can't know at this point which was chosen besides looking at the reservations) and reset the vgpu model to '0', so it frees up the reservation from NVIDIAs side. (We also do that in a loop, since it's not always immediately ready after QEMU closes) A general problem (but that was previously also the case) is that a showcmd (for a not running guest) reserves the pciids, which might block an execution of a different real vm. This is now a bit more problematic as we (temporarily) set the vgpu type then. 0: https://docs.kernel.org/driver-api/vfio-pci-device-specific-driver-acceptance.html Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Tested-by: Christoph Heiss <c.heiss@proxmox.com> Reviewed-by: Christoph Heiss <c.heiss@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> |
||
---|---|---|
.. | ||
cfg2cmd | ||
MigrationTest | ||
ovf_manifests | ||
restore-config-expected | ||
restore-config-input | ||
snapshot-expected | ||
snapshot-input | ||
Makefile | ||
run_config2command_tests.pl | ||
run_ovf_tests.pl | ||
run_pci_addr_checks.pl | ||
run_qemu_img_convert_tests.pl | ||
run_qemu_migrate_tests.pl | ||
run_qemu_restore_config_tests.pl | ||
run_snapshot_tests.pl | ||
snapshot-test.pm | ||
test_get_replicatable_volumes.pl | ||
test.vmdk |