]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Don't always recalculate initial memory size from NUMA size totals
authorPeter Krempa <pkrempa@redhat.com>
Fri, 18 Sep 2015 15:24:32 +0000 (17:24 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 22 Sep 2015 14:09:28 +0000 (16:09 +0200)
commit0fed5a7bc79865fe00fd5a328a2e520934c52ff7
tree6e9eaeac5869935ed3ccb5ffb62058fb3f4173a9
parent403e86067d5cb3a6fd8583cb5b08121151bd4d9f
conf: Don't always recalculate initial memory size from NUMA size totals

When implementing memory hotplug I've opted to recalculate the initial
memory size (contents of the <memory> element) as a sum of the sizes of
NUMA nodes when NUMA was enabled. This was based on an assumption that
qemu did not allow starting when the NUMA node size total didn't equal
to the initial memory size. Unfortunately the check was introduced to
qemu just lately.

This patch uses the new XML parser flag to decide whether it's safe to
update the memory size total from the NUMA cell sizes or not.

As an additional improvement we now report an error in case when the
size of hotplug memory would exceed the total memory size.

The rest of the changes assures that the function is called with correct
flags.
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_command.c