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