qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/1] virtio: fix vq->inuse recalc after migr


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 1/1] virtio: fix vq->inuse recalc after migr
Date: Tue, 20 Dec 2016 09:42:15 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

On Mon, Dec 19, 2016 at 04:44:44PM +0100, Halil Pasic wrote:
> Correct recalculation of vq->inuse after migration for the corner case
> where the avail_idx has already wrapped but used_idx not yet.
> 
> Also change the type of the VirtQueue.inuse to unsigned int. This is
> done to be consistent with other members representing sizes (VRing.num),
> and because C99 guarantees max ring size < UINT_MAX but does not
> guarantee max ring size < INT_MAX.
> 
> Signed-off-by: Halil Pasic <address@hidden>
> Fixes: bccdef6b ("virtio: recalculate vq->inuse after migration")
> CC: address@hidden
> ---
> v1 -> v2:
> * Reworded comment explaining the cast. (thanks Stefan)
> * Changed type of vq->inuse from signed to unsigned
> * Fixed misnomer %s/vring->inuse/vq->inuse/
> ---
>  hw/virtio/virtio.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]