提交 4f86613b 编写于 作者: J Jiri Denemark

qemu: Re-reserve all PCI addresses on libvirtd restart

When reconnecting to existing VMs, we re-reserved only those PCI
addresses which were explicitly mentioned in domain XML. Since some
addresses are always reserved (e.g., 0:0:0 and 0:0:1), we need to handle
those too.

Also all this should only be done if device flag is supported by qemu.
上级 8e3eeb4e
......@@ -1464,11 +1464,13 @@ qemuReconnectDomain(void *payload, const char *name ATTRIBUTE_UNUSED, void *opaq
if (qemudExtractVersionInfo(obj->def->emulator,
NULL,
&qemuCmdFlags) >= 0 &&
(qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE))
(qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE)) {
priv->persistentAddrs = 1;
if (!(priv->pciaddrs = qemuDomainPCIAddressSetCreate(obj->def)))
goto error;
if (!(priv->pciaddrs = qemuDomainPCIAddressSetCreate(obj->def)) ||
qemuAssignDevicePCISlots(obj->def, priv->pciaddrs) < 0)
goto error;
}
if (driver->securityDriver &&
driver->securityDriver->domainReserveSecurityLabel &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册