[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] commit virtio: recalculate vq->inuse after migration mi
From: |
Dr. David Alan Gilbert |
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 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
* Halil Pasic (address@hidden) 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 / address@hidden / Manchester, UK