Re: [Qemu-devel] [PATCH] balloon: Fix failure of updating guest memory status

2016-07-01 Thread Li, Liang Z
> > +if (s->stats_vq_elem == NULL) { > > +virtqueue_push(s->svq, , 0); > > +virtio_notify(vdev, s->svq); > > +return; > > +} > > virtqueue_push(s->svq, s->stats_vq_elem, s->stats_vq_offset); > > virtio_notify(vdev, s->svq); > >

Re: [Qemu-devel] [PATCH] balloon: Fix failure of updating guest memory status

2016-06-30 Thread Li, Liang Z
> > +if (s->stats_vq_elem == NULL) { > > +virtqueue_push(s->svq, , 0); > > +virtio_notify(vdev, s->svq); > > +return; > > +} > > virtqueue_push(s->svq, s->stats_vq_elem, s->stats_vq_offset); > > virtio_notify(vdev, s->svq); > >

Re: [Qemu-devel] [PATCH] balloon: Fix failure of updating guest memory status

2016-06-30 Thread Li, Liang Z
> >> What if we are not in the just-after-live-migration situation though? > >> If the guest simply didn't add a buffer to the queue for some reason, > >> wouldn't this newly added push/notify break the balloon protocol? > >> > > Could you elaborate how it happens? > > The added code only works

Re: [Qemu-devel] [PATCH] balloon: Fix failure of updating guest memory status

2016-06-30 Thread Paolo Bonzini
On 30/06/2016 09:31, Liang Li wrote: > After live migration, 'guest-stats' can't get the expected memory > status in the guest. This issue is caused by commit 4eae2a657d. > The value of 's->stats_vq_elem' will be NULL after live migration, > and the check in the function

Re: [Qemu-devel] [PATCH] balloon: Fix failure of updating guest memory status

2016-06-30 Thread Ladi Prosek
On Thu, Jun 30, 2016 at 10:39 AM, Li, Liang Z wrote: >> On Thu, Jun 30, 2016 at 9:31 AM, Liang Li wrote: >> > After live migration, 'guest-stats' can't get the expected memory >> > status in the guest. This issue is caused by commit 4eae2a657d. >> >

Re: [Qemu-devel] [PATCH] balloon: Fix failure of updating guest memory status

2016-06-30 Thread Li, Liang Z
> On Thu, Jun 30, 2016 at 9:31 AM, Liang Li wrote: > > After live migration, 'guest-stats' can't get the expected memory > > status in the guest. This issue is caused by commit 4eae2a657d. > > The value of 's->stats_vq_elem' will be NULL after live migration, and > > the

Re: [Qemu-devel] [PATCH] balloon: Fix failure of updating guest memory status

2016-06-30 Thread Ladi Prosek
On Thu, Jun 30, 2016 at 9:31 AM, Liang Li wrote: > After live migration, 'guest-stats' can't get the expected memory > status in the guest. This issue is caused by commit 4eae2a657d. > The value of 's->stats_vq_elem' will be NULL after live migration, > and the check in the