The cached pci address set is not required anymore, because the set
is now being recalculated from the domain definition on demand,
so the cache can be deleted.
---
src/qemu/qemu_domain.c | 1 -
src/qemu/qemu_domain.h | 2 --
src/qemu/qemu_domain_address.c | 16 +++-------------
3 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 5054ffe..e51584e 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1298,7 +1298,6 @@ qemuDomainObjPrivateFree(void *data)
virObjectUnref(priv->qemuCaps);
virCgroupFree(&priv->cgroup);
- virDomainPCIAddressSetFree(priv->pciaddrs);
virDomainChrSourceDefFree(priv->monConfig);
qemuDomainObjFreeJob(priv);
VIR_FREE(priv->lockState);
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index fdabbf9..bf96ad3 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -184,8 +184,6 @@ struct _qemuDomainObjPrivate {
bool beingDestroyed;
char *pidfile;
- virDomainPCIAddressSetPtr pciaddrs;
-
virQEMUCapsPtr qemuCaps;
char *lockState;
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index a5add50..df36349 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -1466,12 +1466,10 @@ qemuDomainPCIAddrSetCreateFromDomain(virDomainDefPtr def,
static int
qemuDomainAssignPCIAddresses(virDomainDefPtr def,
- virQEMUCapsPtr qemuCaps,
- virDomainObjPtr obj)
+ virQEMUCapsPtr qemuCaps)
{
int ret = -1;
virDomainPCIAddressSetPtr addrs = NULL;
- qemuDomainObjPrivatePtr priv = NULL;
int max_idx = -1;
int nbuses = 0;
size_t i;
@@ -1625,14 +1623,6 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
}
}
- if (obj && obj->privateData) {
- priv = obj->privateData;
- /* if this is the live domain object, we persist the PCI addresses */
- virDomainPCIAddressSetFree(priv->pciaddrs);
- priv->pciaddrs = addrs;
- addrs = NULL;
- }
-
ret = 0;
cleanup:
@@ -1645,7 +1635,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
int
qemuDomainAssignAddresses(virDomainDefPtr def,
virQEMUCapsPtr qemuCaps,
- virDomainObjPtr obj,
+ virDomainObjPtr obj ATTRIBUTE_UNUSED,
bool newDomain ATTRIBUTE_UNUSED)
{
if (qemuDomainAssignVirtioSerialAddresses(def) < 0)
@@ -1659,7 +1649,7 @@ qemuDomainAssignAddresses(virDomainDefPtr def,
qemuDomainAssignARMVirtioMMIOAddresses(def, qemuCaps);
- if (qemuDomainAssignPCIAddresses(def, qemuCaps, obj) < 0)
+ if (qemuDomainAssignPCIAddresses(def, qemuCaps) < 0)
return -1;
return 0;
--
2.7.4 (Apple Git-66)