qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 4/9] virtio-blk: handle virtio_blk_handle_req


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v3 4/9] virtio-blk: handle virtio_blk_handle_request() errors
Date: Mon, 26 Sep 2016 17:24:47 +0100
User-agent: Mutt/1.7.0 (2016-08-17)

On Mon, Sep 26, 2016 at 10:34:24AM +0200, Greg Kurz wrote:
> All these errors are caused by a buggy guest: QEMU should not exit.
> 
> With this patch, if virtio_blk_handle_request() detects a buggy request, it
> marks the device as broken and returns an error to the caller so it takes
> appropriate action.
> 
> In the case of virtio_blk_handle_vq(), we detach the request from the
> virtqueue, free its allocated memory and stop popping new requests.
> We don't need to bother about multireq since virtio_blk_handle_request()
> errors out early and mrb.num_reqs == 0.
> 
> In the case of virtio_blk_dma_restart_bh(), we need to detach and free all
> queued requests as well.
> 
> Signed-off-by: Greg Kurz <address@hidden>
> ---
> v3: - turned goto out_err to break in virtio_blk_handle_vq()
>     - detach and free request in virtio_blk_handle_vq()
>     - detach and free all queued requests in virtio_blk_dma_restart_bh()
>     - updated changelog
> ---
>  hw/block/virtio-blk.c |   38 ++++++++++++++++++++++++++++----------
>  1 file changed, 28 insertions(+), 10 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]