mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
vhost-user: save features if the char dev is closed
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 <[email protected]>
Fixes: 6ab79a20af ("do not call vhost_net_cleanup() on running net from char user event")
Cc: [email protected]
Cc: Michael S. Tsirkin <[email protected]>
Cc: [email protected]
Signed-off-by: Adrian Moreno <[email protected]>
Message-Id: <[email protected]>
Acked-by: Jason Wang <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
This commit is contained in:
1 parent
4f59102571
commit
c6beefd674
1 file changed
+4
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user