提交 5afec517 编写于 作者: J Jiri Denemark

qemu: Release PCI slot when detaching disk and net devices

上级 4f86613b
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册