qemuDomainSetMemoryFlags: Take virtio-mem into consideration
qemuDomainSetMemoryFlags: Take virtio-mem into consideration

The qemuDomainSetMemoryFlags() allows for memballoon
(<currentMemory/>) changes for both active and inactive guests.
And just before doing any change, we have to make sure that the
new size is not greater than the total memory (<memory/>).

However, the total memory includes not only the regular guest
memory, but also sum of maximum sizes of all virtio-mems (in fact
all memory devices for that matter). But virtio-mem devices are
modified differently (via virDomainUpdateDevice()) and thus the
upper limit for new balloon size has to be lowered.

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>
Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>

nertpinx/libvirt,crobinso/libvirt,olafhering/libvirt,zippy2/libvirt,jfehlig/libvirt,nertpinx/libvirt,libvirt/libvirt,jfehlig/libvirt,libvirt/libvirt,crobinso/libvirt,zippy2/libvirt,zippy2/libvirt,olafhering/libvirt,nertpinx/libvirt,libvirt/libvirt,crobinso/libvirt,nertpinx/libvirt,crobinso/libvirt,libvirt/libvirt,nertpinx/libvirt,olafhering/libvirt,zippy2/libvirt,olafhering/libvirt,jfehlig/libvirt,jfehlig/libvirt