On Wed, 21 Sep 2016 18:57:20 +0200 Greg Kurz <gr...@kaod.org> wrote: > All these errors are caused by a buggy guest: let's switch the device to > the broken state instead of terminating QEMU. > > Signed-off-by: Greg Kurz <gr...@kaod.org> > --- > v2: - added a out_err: label in virtio_blk_handle_vq() > --- > hw/block/virtio-blk.c | 28 ++++++++++++++++++---------- > 1 file changed, 18 insertions(+), 10 deletions(-) >
> @@ -586,13 +589,16 @@ void virtio_blk_handle_vq(VirtIOBlock *s, VirtQueue *vq) > blk_io_plug(s->blk); > > while ((req = virtio_blk_get_request(s, vq))) { > - virtio_blk_handle_request(req, &mrb); > + if (virtio_blk_handle_request(req, &mrb)) { > + goto out_err; > + } > } > > if (mrb.num_reqs) { > virtio_blk_submit_multireq(s->blk, &mrb); > } > > +out_err: I would probably have called that label out_unplug instead, but still Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com> > blk_io_unplug(s->blk); > } >