qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Shesha Sreenivasamurthy <shesha@cisco.com>
To: qemu-devel@nongnu.org
Cc: shesha@cisco.com, mst@redhat.com
Subject: [Qemu-devel] [PATCH] vhost-user: Slave crashes as Master unmaps vrings during guest reboot
Date: Fri, 15 Jan 2016 12:12:44 -0800	[thread overview]
Message-ID: <1452888764-60880-2-git-send-email-shesha@cisco.com> (raw)
In-Reply-To: <1452888764-60880-1-git-send-email-shesha@cisco.com>

Send VHOST_USER_RESET_OWNER when the device is stopped.

Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
---
 hw/virtio/vhost.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index de29968..808184f 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1256,6 +1256,11 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev)
                              hdev->vq_index + i);
     }
 
+    if (hdev->vhost_ops->vhost_reset_device(hdev) < 0) {
+        fprintf(stderr, "vhost reset device %s failed\n", vdev->name);
+        fflush(stderr);
+    }
+
     vhost_log_put(hdev, true);
     hdev->started = false;
     hdev->log = NULL;
-- 
1.9.5 (Apple Git-50.3)

  reply	other threads:[~2016-01-15 20:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 20:12 [Qemu-devel] [PATCH] vhost-user: Slave crashes as Master unmaps vrings during guest reboot Shesha Sreenivasamurthy
2016-01-15 20:12 ` Shesha Sreenivasamurthy [this message]
2016-01-17 11:30   ` Michael S. Tsirkin
2016-01-17 11:23 ` Michael S. Tsirkin
2016-01-18 21:40   ` shesha Sreenivasamurthy (shesha)
  -- strict thread matches above, loose matches on Subject: below --
2016-01-15 20:23 Shesha Sreenivasamurthy
2016-01-15 20:23 ` Shesha Sreenivasamurthy

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=1452888764-60880-2-git-send-email-shesha@cisco.com \
    --to=shesha@cisco.com \
    --cc=mst@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).