Dropping the caching of ccw address set.
The cached 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 | 1 -
src/qemu/qemu_domain_address.c | 21 ++-------------------
3 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 543f21a..5054ffe 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1299,7 +1299,6 @@ qemuDomainObjPrivateFree(void *data)
virCgroupFree(&priv->cgroup);
virDomainPCIAddressSetFree(priv->pciaddrs);
- virDomainCCWAddressSetFree(priv->ccwaddrs);
virDomainChrSourceDefFree(priv->monConfig);
qemuDomainObjFreeJob(priv);
VIR_FREE(priv->lockState);
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index cbdbdfc..fdabbf9 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -185,7 +185,6 @@ struct _qemuDomainObjPrivate {
char *pidfile;
virDomainPCIAddressSetPtr pciaddrs;
- virDomainCCWAddressSetPtr ccwaddrs;
virQEMUCapsPtr qemuCaps;
char *lockState;
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 5cc6d29..8434124 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -351,12 +351,10 @@ qemuDomainCCWAddrSetCreateFromDomain(virDomainDefPtr def)
*/
static int
qemuDomainAssignS390Addresses(virDomainDefPtr def,
- virQEMUCapsPtr qemuCaps,
- virDomainObjPtr obj)
+ virQEMUCapsPtr qemuCaps)
{
int ret = -1;
virDomainCCWAddressSetPtr addrs = NULL;
- qemuDomainObjPrivatePtr priv = NULL;
if (qemuDomainMachineIsS390CCW(def) &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_CCW)) {
@@ -372,15 +370,6 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def,
def, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390);
}
- if (obj && obj->privateData) {
- priv = obj->privateData;
- if (addrs) {
- /* if this is the live domain object, we persist the CCW addresses*/
- virDomainCCWAddressSetFree(priv->ccwaddrs);
- priv->ccwaddrs = addrs;
- addrs = NULL;
- }
- }
ret = 0;
cleanup:
@@ -1633,7 +1622,7 @@ qemuDomainAssignAddresses(virDomainDefPtr def,
if (qemuDomainAssignSpaprVIOAddresses(def, qemuCaps) < 0)
return -1;
- if (qemuDomainAssignS390Addresses(def, qemuCaps, obj) < 0)
+ if (qemuDomainAssignS390Addresses(def, qemuCaps) < 0)
return -1;
qemuDomainAssignARMVirtioMMIOAddresses(def, qemuCaps);
@@ -1655,12 +1644,6 @@ qemuDomainReleaseDeviceAddress(virDomainObjPtr vm,
if (!devstr)
devstr = info->alias;
- if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW &&
- qemuDomainMachineIsS390CCW(vm->def) &&
- virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW) &&
- virDomainCCWAddressReleaseAddr(priv->ccwaddrs, info) < 0)
- VIR_WARN("Unable to release CCW address on %s",
- NULLSTR(devstr));
else if (virDeviceInfoPCIAddressPresent(info) &&
virDomainPCIAddressReleaseSlot(priv->pciaddrs,
&info->addr.pci) < 0)
--
2.7.4 (Apple Git-66)