]> xenbits.xensource.com Git - libvirt.git/commit
conf: Add check/error for domain supports cold/hotplug
authorJohn Ferlan <jferlan@redhat.com>
Fri, 7 Dec 2018 14:46:48 +0000 (09:46 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 12 Dec 2018 19:34:20 +0000 (14:34 -0500)
commit3972a25f1d4f9c75d73faaac9106fc16037de645
tree73880bac54b58a227e7e1080e0f4fd580de88978
parent4f0854e7dfdd4f7206008439f3a8d15bd373a776
conf: Add check/error for domain supports cold/hotplug

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

Add a check during virDomainDefCompatibleDevice whether the
domain supports cold/hotplug of a memory module even though
this duplicates the qemuDomainDefValidateMemoryHotplug check.

Without this check, the cold/hot plug would fail on the
subsequent mem_memory check (since it's 0). Adding a check
for max_memory > 0 would allow the subsequent hotplug check
to fail, but would cause coldplug to fail with the somewhat
opaque message "no free memory device slot available".

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c