Greg Kurz 20ea686a0c virtio-blk: handle virtio_blk_handle_request() errors
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 <groug@kaod.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-10-10 01:16:59 +03:00
..
2016-10-04 13:28:07 +01:00
2016-09-13 18:12:34 +03:00
2016-10-04 13:28:09 +01:00
2016-06-17 16:33:48 +10:00
2016-09-22 18:13:08 +01:00
2016-09-29 12:07:51 +01:00
2016-06-14 15:59:13 +01:00
2016-10-04 14:25:08 +01:00
2016-10-04 13:28:08 +01:00
2016-05-18 15:04:27 +03:00
2016-09-23 11:42:52 +08:00
2016-09-08 18:05:21 +04:00
2016-09-23 11:42:52 +08:00
2016-07-29 00:07:09 +03:00
2016-01-29 15:07:25 +00:00
2016-09-22 18:13:08 +01:00
2016-09-15 15:32:22 +03:00
2016-09-29 11:43:22 +08:00
2016-10-04 13:28:07 +01:00
2016-09-15 15:32:22 +03:00
2016-10-04 13:28:07 +01:00