Re: [Qemu-devel] commit virtio: recalculate vq->inuse after migration might cause last_avail_idx vs. used_idx failure

2016-12-15 Thread Halil Pasic
On 12/15/2016 02:37 PM, Paolo Bonzini wrote: > > > On 15/12/2016 12:32, Halil Pasic wrote: >> 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); >>

Re: [Qemu-devel] commit virtio: recalculate vq->inuse after migration might cause last_avail_idx vs. used_idx failure

2016-12-15 Thread Stefan Hajnoczi
On Thu, Dec 15, 2016 at 11:32 AM, Halil Pasic 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

Re: [Qemu-devel] commit virtio: recalculate vq->inuse after migration might cause last_avail_idx vs. used_idx failure

2016-12-15 Thread Paolo Bonzini
On 15/12/2016 12:32, Halil Pasic wrote: > 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

Re: [Qemu-devel] commit virtio: recalculate vq->inuse after migration might cause last_avail_idx vs. used_idx failure

2016-12-15 Thread Dr. David Alan Gilbert
* Halil Pasic (pa...@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

Re: [Qemu-devel] commit virtio: recalculate vq->inuse after migration might cause last_avail_idx vs. used_idx failure

2016-12-15 Thread Halil Pasic
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 ? > >

Re: [Qemu-devel] commit virtio: recalculate vq->inuse after migration might cause last_avail_idx vs. used_idx failure

2016-12-15 Thread Dr. David Alan Gilbert
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > We have a migration problem, which is in my opinion caused by a > deficiency in how vq->inuse is calculated after the migration (commit > bccdef6b "virtio: recalculate vq->inuse after migration" to > blame). > > > We got a bugreport with this

Re: [Qemu-devel] commit virtio: recalculate vq->inuse after migration might cause last_avail_idx vs. used_idx failure

2016-12-15 Thread Stefan Hajnoczi
On Wed, Dec 14, 2016 at 08:12:17PM +0100, Halil Pasic wrote: > We have a migration problem, which is in my opinion caused by a > deficiency in how vq->inuse is calculated after the migration (commit > bccdef6b "virtio: recalculate vq->inuse after migration" to > blame). > > > We got a bugreport

[Qemu-devel] commit virtio: recalculate vq->inuse after migration might cause last_avail_idx vs. used_idx failure

2016-12-14 Thread Halil Pasic
We have a migration problem, which is in my opinion caused by a deficiency in how vq->inuse is calculated after the migration (commit bccdef6b "virtio: recalculate vq->inuse after migration" to blame). We got a bugreport with this log for a live migration target. 2016-12-13T18:59:03.647309Z