]> xenbits.xensource.com Git - libvirt.git/commit
qemu_driver: validate mem->model on MEMORY_DEVICE_SIZE_CHANGE event
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 1 Aug 2023 10:57:04 +0000 (12:57 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Aug 2023 10:39:21 +0000 (12:39 +0200)
commita03b6cedfd76846ded29b9f06e6299cb473bd14b
tree28223b3d86257fb22e49ee1dc1a395686570f3d1
parent29df55e74d2d2ca91de28a7cf9032149128f7dbd
qemu_driver: validate mem->model on MEMORY_DEVICE_SIZE_CHANGE event

When guest acknowledges change in size of virtio-mem (portion
that's exposed to the guest), QEMU emits
MEMORY_DEVICE_SIZE_CHANGE event. We process it in
processMemoryDeviceSizeChange(). So far, QEMU emits the even only
for virtio-mem (as that's the only memory device model that
allows live changes to its size). Nevertheless, if this ever
changes, validate the memory model upon processing the event as
the rest of the code blindly expects virtio-mem model.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c