From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org
Subject: [Qemu-devel] [PULL for-1.6 4/4] vhost: clear signalled_used_valid on vhost stop
Date: Mon, 12 Aug 2013 15:02:46 +0300 [thread overview]
Message-ID: <1376308831-19978-5-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1376308831-19978-1-git-send-email-mst@redhat.com>
When vhost device stops, its implementation synchronizes kernel state
back to virtio.c so we can continue emulating the device
in userspace.
This patch ensures that virtio.c's signalled_used_valid flag is reset so
that userspace does not suppress guest notifications due to stale
signalled_used values.
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/vhost.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 8f6ab13..9e336ad 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -762,6 +762,7 @@ static void vhost_virtqueue_stop(struct vhost_dev *dev,
fflush(stderr);
}
virtio_queue_set_last_avail_idx(vdev, idx, state.num);
+ virtio_queue_invalidate_signalled_used(vdev, idx);
assert (r >= 0);
cpu_physical_memory_unmap(vq->ring, virtio_queue_get_ring_size(vdev, idx),
0, virtio_queue_get_ring_size(vdev, idx));
--
MST
prev parent reply other threads:[~2013-08-12 12:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 12:02 [Qemu-devel] [PULL for-1.6 0/4] pci,virtio fixes for 1.6 Michael S. Tsirkin
2013-08-12 12:02 ` [Qemu-devel] [PULL for-1.6 1/4] pc: disable pci-info " Michael S. Tsirkin
2013-08-12 12:02 ` [Qemu-devel] [PULL for-1.6 2/4] i82801b11: Fix i82801b11 PCI host bridge config space Michael S. Tsirkin
2013-08-12 12:02 ` [Qemu-devel] [PULL for-1.6 3/4] virtio: clear signalled_used_valid when switching from dataplane Michael S. Tsirkin
2013-08-13 14:26 ` Michael Roth
2013-08-13 14:41 ` Michael S. Tsirkin
2013-08-12 12:02 ` Michael S. Tsirkin [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=1376308831-19978-5-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).