[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] balloon: Fix failure of updating guest memor
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v3] balloon: Fix failure of updating guest memory status |
Date: |
Mon, 15 Aug 2016 13:09:18 +0100 |
User-agent: |
Mutt/1.6.2 (2016-07-01) |
On Fri, Aug 05, 2016 at 01:36:32PM +0200, Ladi Prosek wrote:
> diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
> index 5af429a..65457e9 100644
> --- a/hw/virtio/virtio-balloon.c
> +++ b/hw/virtio/virtio-balloon.c
> @@ -423,6 +423,26 @@ static int virtio_balloon_load_device(VirtIODevice
> *vdev, QEMUFile *f,
> return 0;
> }
>
> +static void virtio_balloon_vmstate_cb(void *opaque, int running,
> + RunState state)
> +{
> + VirtIOBalloon *s = opaque;
> +
> + if (!running) {
> + /* put the stats element back if the VM is not running */
> + if (s->stats_vq_elem != NULL) {
> + virtqueue_discard(s->svq, s->stats_vq_elem, s->stats_vq_offset);
The third argument should be 0 because we did not write anything into
in_sg[].
Stefan
signature.asc
Description: PGP signature