From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Halil Pasic <pasic@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/1] virtio-blk: fix race on guest notifiers
Date: Thu, 2 Mar 2017 15:49:35 +0100 [thread overview]
Message-ID: <20170302154935.7b8ec875.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <20170302130422.81380-1-pasic@linux.vnet.ibm.com>
On Thu, 2 Mar 2017 14:04:22 +0100
Halil Pasic <pasic@linux.vnet.ibm.com> wrote:
> diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
> index 5556f0e..13dd14d 100644
> --- a/hw/block/dataplane/virtio-blk.c
> +++ b/hw/block/dataplane/virtio-blk.c
> @@ -258,9 +258,16 @@ void virtio_blk_data_plane_stop(VirtIODevice *vdev)
> virtio_queue_aio_set_host_notifier_handler(vq, s->ctx, NULL);
> }
>
> - /* Drain and switch bs back to the QEMU main loop */
> + /* Drain and switch bs back to the QEMU main loop. After drain, the
> + * device will not submit (nor comple) any requests until dataplane
s/comple/complete/
> + * starts again.
> + */
> blk_set_aio_context(s->conf->conf.blk, qemu_get_aio_context());
>
> + /* Notify guest before the guest notifiers get cleaned up */
> + qemu_bh_cancel(s->bh);
> + notify_guest_bh(s);
> +
Hm... does virtio-scsi dataplane need a similar treatment? Or am I
missing something?
> aio_context_release(s->ctx);
>
> for (i = 0; i < nvqs; i++) {
next prev parent reply other threads:[~2017-03-02 14:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 13:04 [Qemu-devel] [PATCH 1/1] virtio-blk: fix race on guest notifiers Halil Pasic
2017-03-02 14:49 ` Cornelia Huck [this message]
2017-03-02 15:32 ` Paolo Bonzini
2017-03-02 15:55 ` Halil Pasic
2017-03-02 16:21 ` Paolo Bonzini
2017-03-03 19:43 ` Halil Pasic
2017-03-06 14:55 ` Paolo Bonzini
2017-03-06 22:27 ` Halil Pasic
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=20170302154935.7b8ec875.cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=mst@redhat.com \
--cc=pasic@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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 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).