qemu/hw/virtio
zhanghailiang 463756d031 virtio-balloon: Fix balloon not working correctly when hotplug memory
When do memory balloon, it takes the 'ram_size' as the VM's current ram size,
But 'ram_size' is the startup configured ram size, it does not take into
account the hotplugged memory.

As a result, the balloon result will be confused.
Steps to reproduce:
(1)Start VM: qemu -m size=1024,slots=4,maxmem=8G
(2)In VM: #free -m : 1024M
(3)qmp balloon 512M
(4)In VM: #free -m : 512M
(5)hotplug pc-dimm 1G
(6)In VM: #free -m : 1512M
(7)qmp balloon 256M
(8)In VM: #free -m :1256M
We expect the VM's available ram size to be 256M after 'qmp balloon 256M'
command, but VM's real available ram size is 1256M.

For "qmp balloon" is not performance critical code, we use function
'get_current_ram_size' to get VM's current ram size.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2015-03-04 13:00:04 -05:00
..
dataplane dataplane: endianness-aware accesses 2015-02-16 15:07:16 +00:00
Makefile.objs dataplane: endianness-aware accesses 2015-02-16 15:07:16 +00:00
vhost-backend.c virtio: Move extern declaration to header file 2014-08-09 00:06:32 +04:00
vhost-user.c vhost-user: fix mmap offset calculation 2014-11-03 18:32:48 +02:00
vhost.c vhost: Fix vhostfd leak in error branch 2014-12-01 12:29:35 +00:00
virtio-balloon.c virtio-balloon: Fix balloon not working correctly when hotplug memory 2015-03-04 13:00:04 -05:00
virtio-bus.c virtio-bus: avoid breaking build when open DEBUG switch 2014-12-10 11:18:52 +03:00
virtio-mmio.c virtio-mmio: Drop useless bus->allow_hotplug = 0 2014-10-15 05:03:13 +02:00
virtio-pci.c vhost-scsi: add bootindex property 2015-02-11 21:47:51 +01:00
virtio-pci.h virtio-pci: fix migration for pci bus master 2014-11-02 12:03:03 +02:00
virtio-rng.c virtio-rng: fix check for period_ms validity 2015-01-05 14:02:47 +05:30
virtio.c migration: Append JSON description of migration stream 2015-02-05 17:16:14 +01:00