mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu: remove ccwaddrs caching
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.
This commit is contained in:
parent
be396d955d
commit
1aa5e66cf3
@ -1328,7 +1328,6 @@ qemuDomainObjPrivateFree(void *data)
|
||||
|
||||
virCgroupFree(&priv->cgroup);
|
||||
virDomainPCIAddressSetFree(priv->pciaddrs);
|
||||
virDomainCCWAddressSetFree(priv->ccwaddrs);
|
||||
virDomainUSBAddressSetFree(priv->usbaddrs);
|
||||
virDomainChrSourceDefFree(priv->monConfig);
|
||||
qemuDomainObjFreeJob(priv);
|
||||
|
@ -185,7 +185,6 @@ struct _qemuDomainObjPrivate {
|
||||
char *pidfile;
|
||||
|
||||
virDomainPCIAddressSetPtr pciaddrs;
|
||||
virDomainCCWAddressSetPtr ccwaddrs;
|
||||
virDomainUSBAddressSetPtr usbaddrs;
|
||||
|
||||
virQEMUCapsPtr qemuCaps;
|
||||
|
@ -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:
|
||||
@ -1779,7 +1768,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);
|
||||
@ -1804,15 +1793,9 @@ 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)
|
||||
if (virDeviceInfoPCIAddressPresent(info) &&
|
||||
virDomainPCIAddressReleaseSlot(priv->pciaddrs,
|
||||
&info->addr.pci) < 0)
|
||||
VIR_WARN("Unable to release PCI address on %s",
|
||||
NULLSTR(devstr));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user