mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
qemu: Release PCI slot when detaching disk and net devices
This commit is contained in:
parent
4f86613ba1
commit
5afec51730
@ -8671,6 +8671,10 @@ static int qemudDomainDetachPciDiskDevice(struct qemud_driver *driver,
|
||||
}
|
||||
qemuDomainObjExitMonitorWithDriver(driver, vm);
|
||||
|
||||
if ((qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) &&
|
||||
qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0)
|
||||
VIR_WARN("Unable to release PCI address on %s", dev->data.disk->src);
|
||||
|
||||
qemudShrinkDisks(vm->def, i);
|
||||
|
||||
virDomainDiskDefFree(detach);
|
||||
@ -8912,6 +8916,10 @@ qemudDomainDetachNetDevice(struct qemud_driver *driver,
|
||||
}
|
||||
qemuDomainObjExitMonitorWithDriver(driver, vm);
|
||||
|
||||
if ((qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) &&
|
||||
qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0)
|
||||
VIR_WARN0("Unable to release PCI address on NIC");
|
||||
|
||||
virDomainConfNWFilterTeardown(detach);
|
||||
|
||||
#if WITH_MACVTAP
|
||||
|
Loading…
Reference in New Issue
Block a user