mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00:00
qemu: Remove unused persistentAddrs
Based on some digital archaeology performed by jtomko, it's been determined that the persistentAddrs variable is no longer necessary... The variable was added by: commit141dea6bc7
CommitDate: 2010-02-12 17:25:52 +0000 Add persistence of PCI addresses to QEMU Where it was set to 0 on domain startup if qemu did not support the QEMUD_CMD_FLAG_DEVICE capability, to clear the addresses at shutdown, because QEMU might make up different ones next time. As of commitf5dd58a608
CommitDate: 2012-07-11 11:19:05 +0200 qemu: Extended qemuDomainAssignAddresses to be callable from everywhere. this was broken, when the persistentAddrs = 0 assignment was moved inside qemuDomainAssignPCIAddresses and while it pretends to check for !QEMU_CAPS_DEVICE, its parent qemuDomainAssignAddresses is only called if QEMU_CAPS_DEVICE is present.
This commit is contained in:
parent
f30672d5ee
commit
fb06350021
@ -190,7 +190,6 @@ struct _qemuDomainObjPrivate {
|
||||
virDomainPCIAddressSetPtr pciaddrs;
|
||||
virDomainCCWAddressSetPtr ccwaddrs;
|
||||
virDomainVirtioSerialAddrSetPtr vioserialaddrs;
|
||||
int persistentAddrs;
|
||||
|
||||
virQEMUCapsPtr qemuCaps;
|
||||
char *lockState;
|
||||
|
@ -149,7 +149,6 @@ qemuDomainAssignVirtioSerialAddresses(virDomainDefPtr def,
|
||||
priv = obj->privateData;
|
||||
/* if this is the live domain object, we persist the addresses */
|
||||
virDomainVirtioSerialAddrSetFree(priv->vioserialaddrs);
|
||||
priv->persistentAddrs = 1;
|
||||
priv->vioserialaddrs = addrs;
|
||||
addrs = NULL;
|
||||
}
|
||||
@ -382,11 +381,8 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def,
|
||||
if (addrs) {
|
||||
/* if this is the live domain object, we persist the CCW addresses*/
|
||||
virDomainCCWAddressSetFree(priv->ccwaddrs);
|
||||
priv->persistentAddrs = 1;
|
||||
priv->ccwaddrs = addrs;
|
||||
addrs = NULL;
|
||||
} else {
|
||||
priv->persistentAddrs = 0;
|
||||
}
|
||||
}
|
||||
ret = 0;
|
||||
@ -1616,7 +1612,6 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
|
||||
priv = obj->privateData;
|
||||
/* if this is the live domain object, we persist the PCI addresses */
|
||||
virDomainPCIAddressSetFree(priv->pciaddrs);
|
||||
priv->persistentAddrs = 1;
|
||||
priv->pciaddrs = addrs;
|
||||
addrs = NULL;
|
||||
}
|
||||
|
@ -5754,16 +5754,6 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
||||
priv->qemuDevices = NULL;
|
||||
|
||||
virDomainDefClearDeviceAliases(vm->def);
|
||||
if (!priv->persistentAddrs) {
|
||||
virDomainDefClearPCIAddresses(vm->def);
|
||||
virDomainPCIAddressSetFree(priv->pciaddrs);
|
||||
priv->pciaddrs = NULL;
|
||||
virDomainDefClearCCWAddresses(vm->def);
|
||||
virDomainCCWAddressSetFree(priv->ccwaddrs);
|
||||
priv->ccwaddrs = NULL;
|
||||
virDomainVirtioSerialAddrSetFree(priv->vioserialaddrs);
|
||||
priv->vioserialaddrs = NULL;
|
||||
}
|
||||
|
||||
qemuHostdevReAttachDomainDevices(driver, vm->def);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user