]> git.proxmox.com Git - qemu-server.git/commit - PVE/QemuServer.pm
vm start/stop: cleanup passed-through pci devices in more situations
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 20 Sep 2022 12:50:16 +0000 (14:50 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 9 Nov 2022 07:49:45 +0000 (08:49 +0100)
commit1b189121fc4e7ed6e461691013db47cff74706e6
tree7f43e685e50d66295cd08fcb7668d5db80365f2e
parent76b29aafd7ea942f4c1eccc2486e3b1cf0530893
vm start/stop: cleanup passed-through pci devices in more situations

if the preparing of PCI devices or the start of the VM fails, we need
to cleanup the PCI devices (reservations *and* mdevs), or else it
might happen that there are leftovers which must be manually removed.

to include also mdevs now, refactor the cleanup code from
'vm_stop_cleanup' into it's own function, and call that instead of
only 'remove_pci_reservation'

also simplifies the code, such that it now removes all PCI ids
reserved for that VMID, since we cannot have multiple VMs with the
same VMID anyway

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer.pm
PVE/QemuServer/PCI.pm