[PATCH v3 08/14] qemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event

Peter Krempa pkrempa at redhat.com
Mon May 3 13:17:35 UTC 2021


On Fri, Apr 23, 2021 at 15:24:30 +0200, Michal Privoznik wrote:
> As advertised in previous commit, this event is delivered to us
> when virtio-mem module changes the allocation inside the guest.
> It comes with one attribute - size - which holds the new size of
> the virtio-mem (well, allocated size), in bytes.
> Mind you, this is not necessarily the same number as 'requested
> size'. It almost certainly will be when sizing the memory up, but
> it might not be when sizing the memory down - the guest kernel
> might be unable to free some blocks.
> 
> This actual size is reported in the domain XML as an output
> element only.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  docs/formatdomain.rst               |  7 +++
>  docs/schemas/domaincommon.rng       |  5 ++
>  examples/c/misc/event-test.c        | 17 ++++++
>  include/libvirt/libvirt-domain.h    | 23 ++++++++
>  src/conf/domain_conf.c              | 26 ++++++++-
>  src/conf/domain_conf.h              |  8 +++
>  src/conf/domain_event.c             | 84 +++++++++++++++++++++++++++++
>  src/conf/domain_event.h             | 10 ++++
>  src/libvirt_private.syms            |  3 ++
>  src/qemu/qemu_domain.c              |  3 ++
>  src/qemu/qemu_domain.h              |  1 +
>  src/qemu/qemu_driver.c              | 37 +++++++++++++
>  src/qemu/qemu_monitor.c             | 24 +++++++++
>  src/qemu/qemu_monitor.h             | 20 +++++++
>  src/qemu/qemu_monitor_json.c        | 24 +++++++++
>  src/qemu/qemu_process.c             | 42 +++++++++++++++
>  src/remote/remote_daemon_dispatch.c | 30 +++++++++++
>  src/remote/remote_driver.c          | 32 +++++++++++
>  src/remote/remote_protocol.x        | 14 ++++-
>  src/remote_protocol-structs         |  7 +++
>  tools/virsh-domain.c                | 20 +++++++
>  21 files changed, 434 insertions(+), 3 deletions(-)

Mixing public API changes, wit XML and qemu changes is NOT acceptable.
This commit is also too chaotic. I'll review it once you split it
appropriately.




More information about the libvir-list mailing list