From: Gonglei <arei.gonglei@huawei.com>
To: Greg Kurz <groug@kaod.org>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>, Max Reitz <mreitz@redhat.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/7] virtio: avoid inappropriate QEMU termination
Date: Thu, 22 Sep 2016 09:19:49 +0800 [thread overview]
Message-ID: <57E331B5.1080308@huawei.com> (raw)
In-Reply-To: <147446363181.4880.18104448248886932114.stgit@bahia>
On 2016/9/21 21:13, Greg Kurz wrote:
> This series is a follow up to Stefan's work to eradicate most calls to
> exit() we currently have in the virtio code.
>
> It addresses all exit() call sites in the blk, net and scsi device code,
> where the error is about a missing or malformed in/out header sent by
> the guest. They are converted to use virtio_error() and stop any processing,
> instead of exiting.
>
Actually if you just stop procesing when encounter a missing in/out header but
send a interrupt to the guest, the guest maybe be stuck. virtio_net_handle_ctrl()
is an example, the guest frontend driver infinite loop to wait the interrupt's coming.
The guest can't work anymore though you don't exit the Qemu process .
Regards,
-Gonglei
> The remaining call sites are related to a host misconfiguration or a
> migration stream issue.
>
> The 9P code currently calls assert() instead of exit(), but it also about
> malformed or missing headers, so it gets converted the same way.
>
> Next work will be to check all assert() call sites in the device code, in
> case some of them actually refer to a bug in the guest, and should be
> converted to use virtio_error() as well.
>
> ---
>
> Greg Kurz (7):
> virtio-9p: handle handle_9p_output() error
> virtio-blk: handle virtio_blk_handle_request() errors
> virtio-net: handle virtio_net_handle_ctrl() error
> virtio-net: handle virtio_net_receive() errors
> virtio-net: handle virtio_net_flush_tx() errors
> virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error()
> virtio-scsi: handle virtio_scsi_set_config() error
>
>
> hw/9pfs/virtio-9p-device.c | 14 ++++++++++--
> hw/block/virtio-blk.c | 27 +++++++++++++++--------
> hw/net/virtio-net.c | 51 +++++++++++++++++++++++++-------------------
> hw/scsi/virtio-scsi.c | 21 ++++++++++--------
> 4 files changed, 70 insertions(+), 43 deletions(-)
>
> --
> Greg
>
>
>
>
next prev parent reply other threads:[~2016-09-22 1:20 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 13:13 [Qemu-devel] [PATCH 0/7] virtio: avoid inappropriate QEMU termination Greg Kurz
2016-09-21 13:14 ` [Qemu-devel] [PATCH 1/7] virtio-9p: handle handle_9p_output() error Greg Kurz
2016-09-21 14:16 ` Cornelia Huck
2016-09-21 14:38 ` Greg Kurz
2016-09-21 14:43 ` Cornelia Huck
2016-09-21 14:42 ` Greg Kurz
2016-09-21 13:14 ` [Qemu-devel] [PATCH 2/7] virtio-blk: handle virtio_blk_handle_request() errors Greg Kurz
2016-09-21 14:28 ` Cornelia Huck
2016-09-21 15:01 ` Greg Kurz
2016-09-21 13:14 ` [Qemu-devel] [PATCH 3/7] virtio-net: handle virtio_net_handle_ctrl() error Greg Kurz
2016-09-21 14:30 ` Cornelia Huck
2016-09-21 15:03 ` Greg Kurz
2016-09-21 13:14 ` [Qemu-devel] [PATCH 4/7] virtio-net: handle virtio_net_receive() errors Greg Kurz
2016-09-21 14:38 ` Cornelia Huck
2016-09-21 13:14 ` [Qemu-devel] [PATCH 5/7] virtio-net: handle virtio_net_flush_tx() errors Greg Kurz
2016-09-21 13:14 ` [Qemu-devel] [PATCH 6/7] virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error() Greg Kurz
2016-09-21 13:14 ` [Qemu-devel] [PATCH 7/7] virtio-scsi: handle virtio_scsi_set_config() error Greg Kurz
2016-09-21 13:35 ` [Qemu-devel] [PATCH 0/7] virtio: avoid inappropriate QEMU termination no-reply
2016-09-21 13:44 ` Greg Kurz
2016-09-21 14:01 ` Fam Zheng
2016-09-21 14:29 ` Eric Blake
2016-09-22 5:39 ` Fam Zheng
2016-09-21 14:34 ` Greg Kurz
2016-09-21 17:38 ` Michael S. Tsirkin
2016-09-21 17:35 ` Michael S. Tsirkin
2016-09-21 18:12 ` Greg Kurz
2016-09-22 1:19 ` Gonglei [this message]
2016-09-22 6:43 ` Greg Kurz
2016-09-22 6:55 ` Gonglei (Arei)
2016-09-22 7:21 ` Greg Kurz
2016-09-22 7:30 ` Gonglei (Arei)
2016-09-22 7:38 ` Gonglei (Arei)
2016-09-22 8:14 ` Greg Kurz
2016-09-22 8:28 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57E331B5.1080308@huawei.com \
--to=arei.gonglei@huawei.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=groug@kaod.org \
--cc=jasowang@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.