From: Alon Levy <alevy@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: qemu list <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] virtio-serial: Check if virtio queue is ready before consuming data
Date: Wed, 14 Jul 2010 10:39:51 -0400 (EDT) [thread overview]
Message-ID: <173617073.334541279118391364.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> (raw)
In-Reply-To: <1c5b20f693ebc3882d01d8f2f9e807878251cd42.1277976486.git.amit.shah@redhat.com>
----- "Amit Shah" <amit.shah@redhat.com> wrote:
> If a virtio-serial port is removed before the guest comes up and
> initialises the virtqueues, qemu exits with the message
>
> Guest moved used index from 0 to 61440
>
> This happens because we try to clear any pending buffers from the
> virtqueue.
>
> Ensure the virtqueue is initialised before calling any virtqueue
> operations.
>
> Signed-off-by: Amit Shah <amit.shah@redhat.com>
> ---
> hw/virtio-serial-bus.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
> index 7f9d28f..b89daa6 100644
> --- a/hw/virtio-serial-bus.c
> +++ b/hw/virtio-serial-bus.c
> @@ -139,6 +139,9 @@ static void flush_queued_data(VirtIOSerialPort
> *port, bool discard)
> {
> assert(port);
>
> + if (!virtio_queue_ready(port->ovq)) {
> + return;
> + }
> do_flush_queued_data(port, port->ovq, &port->vser->vdev,
> discard);
> }
>
> --
> 1.7.0.1
ACK series
prev parent reply other threads:[~2010-07-14 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-01 9:28 [Qemu-devel] [PATCH 1/2] virtio-serial: Check if virtio queue is ready before consuming data Amit Shah
2010-07-01 9:28 ` [Qemu-devel] [PATCH 2/2] virtio-serial: Assert for virtio queue ready before virtqueue operations Amit Shah
2010-07-14 13:23 ` [Qemu-devel] [PATCH 1/2] virtio-serial: Check if virtio queue is ready before consuming data Amit Shah
2010-07-14 14:39 ` Alon Levy [this message]
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=173617073.334541279118391364.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com \
--to=alevy@redhat.com \
--cc=amit.shah@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).