From: Adrian Moreno <amorenoz@redhat.com>
To: qemu-devel@nongnu.org
Cc: ddstreet@canonical.com, Adrian Moreno <amorenoz@redhat.com>,
Pei Zhang <pezhang@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH v2] vhost-user: save features if the char dev is closed
Date: Wed, 18 Sep 2019 10:48:34 +0200 [thread overview]
Message-ID: <20190918084834.9729-1-amorenoz@redhat.com> (raw)
That way the state can be correctly restored when the device is opened
again. This might happen if the backend is restarted.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1738768
Reported-by: Pei Zhang <pezhang@redhat.com>
Fixes: 6ab79a20af3a (do not call vhost_net_cleanup() on running net from char user event)
Cc: ddstreet@canonical.com
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
---
net/vhost-user.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 51921de443..014199d600 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -235,6 +235,10 @@ static void chr_closed_bh(void *opaque)
s = DO_UPCAST(NetVhostUserState, nc, ncs[0]);
+ if (s->vhost_net) {
+ s->acked_features = vhost_net_get_acked_features(s->vhost_net);
+ }
+
qmp_set_link(name, false, &err);
qemu_chr_fe_set_handlers(&s->chr, NULL, NULL, net_vhost_user_event,
--
2.21.0
next reply other threads:[~2019-09-18 8:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 8:48 Adrian Moreno [this message]
2019-09-18 17:10 ` [Qemu-devel] [PATCH v2] vhost-user: save features if the char dev is closed no-reply
2019-09-24 15:56 ` asan: false positive? (Was Re: [Qemu-devel] [PATCH v2] vhost-user: save features if the char dev is closed) Michael S. Tsirkin
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=20190918084834.9729-1-amorenoz@redhat.com \
--to=amorenoz@redhat.com \
--cc=ddstreet@canonical.com \
--cc=mst@redhat.com \
--cc=pezhang@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).