Re: [Qemu-devel] [PATCH] virtio: fix vring->inuse recalc after migr

2016-12-19 Thread Stefan Hajnoczi
On Fri, Dec 16, 2016 at 05:43:29PM +0100, Halil Pasic wrote: > > > On 12/16/2016 05:12 PM, Stefan Hajnoczi wrote: > >> You are not the first one complaining, so the sentence is definitively > >> bad. What disturbs me regarding your formulation is that we do not use > >> uint16_t to represent neit

Re: [Qemu-devel] [PATCH] virtio: fix vring->inuse recalc after migr

2016-12-16 Thread Michael S. Tsirkin
On Fri, Dec 16, 2016 at 04:12:24PM +, Stefan Hajnoczi wrote: > On Fri, Dec 16, 2016 at 3:41 PM, Halil Pasic wrote: > > On 12/16/2016 11:25 AM, Stefan Hajnoczi wrote: > >> On Thu, Dec 15, 2016 at 04:43:30PM +0100, Halil Pasic wrote: > >>> Correct recalculation of vring->inuse after migration fo

Re: [Qemu-devel] [PATCH] virtio: fix vring->inuse recalc after migr

2016-12-16 Thread Halil Pasic
On 12/16/2016 05:12 PM, Stefan Hajnoczi wrote: >> You are not the first one complaining, so the sentence is definitively >> bad. What disturbs me regarding your formulation is that we do not use >> uint16_t to represent neither the ring size nor inuse. >> >> How about "Since max ring size < UINT1

Re: [Qemu-devel] [PATCH] virtio: fix vring->inuse recalc after migr

2016-12-16 Thread Stefan Hajnoczi
On Fri, Dec 16, 2016 at 3:41 PM, Halil Pasic wrote: > On 12/16/2016 11:25 AM, Stefan Hajnoczi wrote: >> On Thu, Dec 15, 2016 at 04:43:30PM +0100, Halil Pasic wrote: >>> Correct recalculation of vring->inuse after migration for >>> the corner case where the avail_idx has already wrapped >>> but use

Re: [Qemu-devel] [PATCH] virtio: fix vring->inuse recalc after migr

2016-12-16 Thread Halil Pasic
On 12/16/2016 11:25 AM, Stefan Hajnoczi wrote: > On Thu, Dec 15, 2016 at 04:43:30PM +0100, Halil Pasic wrote: >> Correct recalculation of vring->inuse after migration for >> the corner case where the avail_idx has already wrapped >> but used_idx not yet. >> >> Signed-off-by: Halil Pasic >> Fixes

Re: [Qemu-devel] [PATCH] virtio: fix vring->inuse recalc after migr

2016-12-16 Thread Stefan Hajnoczi
On Thu, Dec 15, 2016 at 04:43:30PM +0100, Halil Pasic wrote: > Correct recalculation of vring->inuse after migration for > the corner case where the avail_idx has already wrapped > but used_idx not yet. > > Signed-off-by: Halil Pasic > Fixes: bccdef6b ("virtio: recalculate vq->inuse after migrati

[Qemu-devel] [PATCH] virtio: fix vring->inuse recalc after migr

2016-12-15 Thread Halil Pasic
Correct recalculation of vring->inuse after migration for the corner case where the avail_idx has already wrapped but used_idx not yet. Signed-off-by: Halil Pasic Fixes: bccdef6b ("virtio: recalculate vq->inuse after migration") CC: qemu-sta...@nongnu.org --- I think we could also change the typ