On Tue, May 24, 2016 at 06:53:17PM -0400, John Ferlan wrote:
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:
commit 141dea6bc7222107c2357acb68066baea5b26df3
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 commit f5dd58a6088cfc6e8bd354b693d399807a8ec395
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.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu_domain.h | 1 -
src/qemu/qemu_domain_address.c | 5 -----
src/qemu/qemu_process.c | 18 ++++++++----------
3 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index b2669c0..0baa34a 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5754,16 +5754,14 @@ void qemuProcessStop(virQEMUDriverPtr driver,
priv->qemuDevices = NULL;
virDomainDefClearDeviceAliases(vm->def);
- if (!priv->persistentAddrs) {
persistentAddrs is always 1 here, this code can be dropped completely
Jan
- virDomainDefClearPCIAddresses(vm->def);
- virDomainPCIAddressSetFree(priv->pciaddrs);
- priv->pciaddrs = NULL;
- virDomainDefClearCCWAddresses(vm->def);
- virDomainCCWAddressSetFree(priv->ccwaddrs);
- priv->ccwaddrs = NULL;
- virDomainVirtioSerialAddrSetFree(priv->vioserialaddrs);
- priv->vioserialaddrs = NULL;
- }
+ 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);
--
2.5.5
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list