All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Halil Pasic <pasic@linux.vnet.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] commit virtio: recalculate vq->inuse after migration might cause last_avail_idx vs. used_idx failure
Date: Thu, 15 Dec 2016 11:38:40 +0000	[thread overview]
Message-ID: <20161215113840.GF2509@work-vm> (raw)
In-Reply-To: <b2ad9903-95b4-bf08-f314-c2b250cebb0a@linux.vnet.ibm.com>

* Halil Pasic (pasic@linux.vnet.ibm.com) wrote:
> 
> 
> On 12/15/2016 11:52 AM, Dr. David Alan Gilbert wrote:
> >> We got a bugreport with this log for a live migration target. 
> >>
> >> 2016-12-13T18:59:03.647309Z qemu-system-s390x: VQ 1 size 0x100 < last_avail_idx 0x2f76 - used_idx 0x762f
> > Is this actually an endian problem - 2f76 vs 762f ?
> > 
> > Dave
> > 
> 
> Thanks! It seems you are right:
> 
> static inline uint16_t vring_avail_idx(VirtQueue *vq)
> {
>     hwaddr pa;
>     pa = vq->vring.avail + offsetof(VRingAvail, idx);
>     vq->shadow_avail_idx = virtio_lduw_phys(vq->vdev, pa);
> 
> we should have an endiannes handling here before assigning shadow_avail_idx I guess
> 
>     return vq->shadow_avail_idx;
> } 
> 
> I will meditate a bit more on this and probably create a patch to fix it.
> 
> What make me wonder is that according to the reports live migration usually
> works (ca 1% fails)...

> Can I credit you as reporter in case I end up making a fix?

Sure if you want.

Dave

> Halil
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2016-12-15 11:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 19:12 [Qemu-devel] commit virtio: recalculate vq->inuse after migration might cause last_avail_idx vs. used_idx failure Halil Pasic
2016-12-15  8:24 ` Stefan Hajnoczi
2016-12-15 10:52 ` Dr. David Alan Gilbert
2016-12-15 11:32   ` Halil Pasic
2016-12-15 11:38     ` Dr. David Alan Gilbert [this message]
2016-12-15 13:37     ` Paolo Bonzini
2016-12-15 16:16       ` Halil Pasic
2016-12-15 14:06     ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161215113840.GF2509@work-vm \
    --to=dgilbert@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.