* [PATCH] vhost_user: Reset vq enable flag in vu_cleanup()
@ 2026-09-03 11:16 Laurent Vivier
0 siblings, 0 replies; only message in thread
From: Laurent Vivier @ 2026-09-03 11:16 UTC (permalink / raw)
To: passt-dev; +Cc: Laurent Vivier, David Gibson
vu_cleanup() resets most virtqueue state (started, notification,
file descriptors) but does not reset the enable flag. After a
QEMU disconnect and reconnect, the stale enable flag causes
vu_set_vring_enable_exec() to hit its early return check
(vq->enable == enable).
Reset vq->enable to false in vu_cleanup() alongside the other
virtqueue state.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
---
vhost_user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/vhost_user.c b/vhost_user.c
index a1259c2624c0..272295f29db4 100644
--- a/vhost_user.c
+++ b/vhost_user.c
@@ -1081,6 +1081,7 @@ void vu_cleanup(struct vu_dev *vdev)
struct vu_virtq *vq = &vdev->vq[i];
vq->started = false;
+ vq->enable = false;
vq->notification = true;
if (vq->call_fd != -1) {
--
2.55.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-03 11:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-03 11:16 [PATCH] vhost_user: Reset vq enable flag in vu_cleanup() Laurent Vivier
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
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 IMAP folder(s).