mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
qapi event: convert BALLOON_CHANGE
Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
5f41fbba90
commit
aef9d3115f
6 changed files with 18 additions and 36 deletions
|
@ -24,6 +24,7 @@
|
|||
#include "sysemu/kvm.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qapi-event.h"
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <sys/mman.h>
|
||||
|
@ -289,8 +290,9 @@ static void virtio_balloon_set_config(VirtIODevice *vdev,
|
|||
memcpy(&config, config_data, sizeof(struct virtio_balloon_config));
|
||||
dev->actual = le32_to_cpu(config.actual);
|
||||
if (dev->actual != oldactual) {
|
||||
qemu_balloon_changed(ram_size -
|
||||
((ram_addr_t) dev->actual << VIRTIO_BALLOON_PFN_SHIFT));
|
||||
qapi_event_send_balloon_change(ram_size -
|
||||
((ram_addr_t) dev->actual << VIRTIO_BALLOON_PFN_SHIFT),
|
||||
&error_abort);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue