提交 55946f23 编写于 作者: W Wolfgang Mauerer 提交者: Daniel Veillard

Fix PCI address handling when controllers are deleted

* src/qemu/qemu_driver.c: in qemudDomainDetachPciControllerDevice()
  when a controller is not present in the system anymore, the PCI
  address must be deleted from libvirt's hashtable because it can
  be re-used for other purposes.
上级 24cc058e
...@@ -6280,6 +6280,11 @@ static int qemudDomainDetachPciControllerDevice(struct qemud_driver *driver, ...@@ -6280,6 +6280,11 @@ static int qemudDomainDetachPciControllerDevice(struct qemud_driver *driver,
VIR_FREE(vm->def->controllers); VIR_FREE(vm->def->controllers);
vm->def->ncontrollers = 0; vm->def->ncontrollers = 0;
} }
if (qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0) {
VIR_WARN0("Unable to release PCI address on controller");
}
virDomainControllerDefFree(detach); virDomainControllerDefFree(detach);
ret = 0; ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册