aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-06-18 10:35:13 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-06-18 10:35:13 -0500
commit664535c31c41d8dcd7756b579674a4a6f9eb6cd9 (patch)
tree654ffde68f284ef4d595920f5da646bfb92b20f4 /hw
parent0b0cb9d310edfe2b2d108f18be4f013a1e552cfd (diff)
parent0cd23fcc0afe0a847e2e68797b64b297b20121f9 (diff)
Merge remote-tracking branch 'qmp/queue/qmp' into staging
* qmp/queue/qmp: build: install qmp-commands.txt Add rate limiting of RTC_CHANGE, BALLOON_CHANGE & WATCHDOG events Add event notification for guest balloon changes Fix some more license versions (GPL2+ instead of GPL2) monitor: Fix memory leak with readline completion qmp: do not include monitor.h from qapi-types-core.h qmp: include monitor.h when needed kvm: add missing include files
Diffstat (limited to 'hw')
-rw-r--r--hw/virtio-balloon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c
index 075ed87e37..d048cef50f 100644
--- a/hw/virtio-balloon.c
+++ b/hw/virtio-balloon.c
@@ -146,8 +146,13 @@ static void virtio_balloon_set_config(VirtIODevice *vdev,
{
VirtIOBalloon *dev = to_virtio_balloon(vdev);
struct virtio_balloon_config config;
+ uint32_t oldactual = dev->actual;
memcpy(&config, config_data, 8);
dev->actual = le32_to_cpu(config.actual);
+ if (dev->actual != oldactual) {
+ qemu_balloon_changed(ram_size -
+ (dev->actual << VIRTIO_BALLOON_PFN_SHIFT));
+ }
}
static uint32_t virtio_balloon_get_features(VirtIODevice *vdev, uint32_t f)