]> git.proxmox.com Git - qemu-server.git/commit - PVE/QemuServer.pm
pci: workaround nvidia driver issue on mdev cleanup
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 24 Feb 2023 13:04:31 +0000 (14:04 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 16 Mar 2023 08:08:34 +0000 (09:08 +0100)
commit49c51a60db7f12d7fe2073b755d18b4d9b628fbd
tree781ad8e4d85d2e88107388ba4986afa7034e46ee
parentc8bd54e9a8367c4926a7029b209fded16f46c040
pci: workaround nvidia driver issue on mdev cleanup

in some nvidia grid drivers (e.g. 14.4 and 15.x), their kernel module
tries to clean up the mdev device when the vm is shutdown and if it
cannot do that (e.g. becaues we already cleaned it up), their removal
process cancels with an error such that the vgpu does still exist inside
their book-keeping, but can't be used/recreated/freed until a reboot.

since there seems no obvious way to detect if thats the case besides
either parsing dmesg (which is racy), or the nvidia kernel module
version(which i'd rather not do), we simply test the pci device vendor
for nvidia and add a 10s sleep. that should give the driver enough time
to clean up and we will not find the path anymore and skip the cleanup.

This way, it works with both the newer and older versions of the driver
(some of the older drivers are LTS releases, so they're still
supported).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/QemuServer.pm