mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-15 01:43:40 -06:00
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.
This commit is contained in:
parent
8e3eeb4e1d
commit
4f86613ba1
@ -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)))
|
||||
if (!(priv->pciaddrs = qemuDomainPCIAddressSetCreate(obj->def)) ||
|
||||
qemuAssignDevicePCISlots(obj->def, priv->pciaddrs) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (driver->securityDriver &&
|
||||
driver->securityDriver->domainReserveSecurityLabel &&
|
||||
|
Loading…
Reference in New Issue
Block a user