]> git.proxmox.com Git - qemu-server.git/commit
fix #3258: block vm start when pci device is already in use
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 7 Oct 2021 13:45:31 +0000 (15:45 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 15 Oct 2021 17:58:16 +0000 (19:58 +0200)
commit1fb1822ec94000e66cbea247d4cae9f77f867cc7
treeedb24d4abe32fe53ce448076600c6002e1ac5857
parenta01593676cf8e5da206008f1e104ab9dec231750
fix #3258: block vm start when pci device is already in use

on vm start, we reserve all pciids that we use, and
remove the reservation again in vm_stop_cleanup

first with only a time-based reservation but after the vm is started,
we reserve again but with the pid.

for this, we have to move the start_timeout calculation above the
hostpci handling.

also moved the pci initialization out of the conf parsing loop
so that we can reserve all ids before we actually touch any of them

while touching the lines, fix the indentation

this way, when a vm starts with a pci device that is already configured
for a different running vm, will not be started and the user gets
the error that the device is already in use

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