Re: [Qemu-devel] [RFC 5/7] virtio: handle virtqueue_read_next_desc() errors

2016-03-29 Thread Stefan Hajnoczi
On Fri, Mar 25, 2016 at 03:01:00PM +0800, Fam Zheng wrote: > On Thu, 03/24 17:56, Stefan Hajnoczi wrote: > > @@ -389,7 +395,7 @@ void virtqueue_get_avail_bytes(VirtQueue *vq, unsigned > > int *in_bytes, > > unsigned int max, num_bufs, indirect = 0; > > VRingDesc desc; > >

Re: [Qemu-devel] [RFC 5/7] virtio: handle virtqueue_read_next_desc() errors

2016-03-25 Thread Fam Zheng
On Thu, 03/24 17:56, Stefan Hajnoczi wrote: > Stop processing the vring if an avail ring index is invalid. > > Signed-off-by: Stefan Hajnoczi > --- > hw/virtio/virtio.c | 47 +-- > 1 file changed, 33 insertions(+), 14 deletions(-) > > diff --git a/hw/

[Qemu-devel] [RFC 5/7] virtio: handle virtqueue_read_next_desc() errors

2016-03-24 Thread Stefan Hajnoczi
Stop processing the vring if an avail ring index is invalid. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 4758fe3..f845df2