[libvirt] [PATCH 0/2] Add mem cold/hot plug supported check to virDomainDefCompatibleDevice

John Ferlan jferlan at redhat.com
Fri Dec 7 17:27:02 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1624336

Details are in patch2, but essentially the issue is the check
for whether cold/hot plug of memory is supported occurs during 
qemuDomainDefValidateMemoryHotplug; however, that is called
after virDomainDefCompatibleDevice, but is not called during
the qemuDomainAttachDeviceConfig processing.

Another solution would be to modify virDomainDefCompatibleDevice
to add a "if (def->mem.max_memory > 0 &&" check before the check
for whether the size fits and virDomainDefHasMemoryHotplug could
be called from qemuDomainAttachDeviceConfig, but that seems a bit
strange. The additional call is to avoid the equally strange message
that would appear "no free memory device slot available" because
nmems == mem.memory_slots == 0. If this solution is preferred I'm
fine with that, but figured I needed to start somewhere.

John Ferlan (2):
  conf: Add the size of failed max_memory in error
  conf: Add check/error for domain supports cold/hotplug

 src/conf/domain_conf.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

-- 
2.17.2




More information about the libvir-list mailing list