qemuDomainObjPrivate caches three lists of device addresses:
virDomainPCIAddressSetPtr pciaddrs;
virDomainCCWAddressSetPtr ccwaddrs;
virDomainVirtioSerialAddrSetPtr vioserialaddrs;
Yet I can't quite tell what issue they fix... they are only used
at hotplug time for checking for address collisions, however it
appears that we can generate those lists on demand from the runtime
XML, which contains all the info we need.
In truth I only looked deeply at the vioserialaddrs list... perhaps
PCI has more to it. But at least for virtio serial it looks like
this caching can be dropped. CCing jtomko who originally added it
If this is acceptable, dropping all the caching will be a step
towards unifying all uses of qemuDomainAssignAddresses, rather
than sprinkling around a dozen call sites throughout the code.
Also (again if this is acceptable), there's more cleanup to do
here, dropping some now unused code in domain_addr
Cole Robinson (3):
domain: Add virDomainVirtioSerialAddrSetCreateFromDomain
qemu: hotplug: generate vioserial address list on demand
qemu: remove vioserialaddr cache
src/conf/domain_addr.c | 35 ++++++++++++++++++++++++++++++++---
src/conf/domain_addr.h | 7 ++-----
src/libvirt_private.syms | 3 +--
src/qemu/qemu_domain.c | 1 -
src/qemu/qemu_domain.h | 1 -
src/qemu/qemu_domain_address.c | 28 +++-------------------------
src/qemu/qemu_hotplug.c | 37 +++++++++++++++++++++++++------------
src/qemu/qemu_process.c | 2 --
8 files changed, 63 insertions(+), 51 deletions(-)
--
2.7.4