From de8b085b3bb18ebfbb2fd2409fece8fe2d8af5e1 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 3 Sep 2026 13:16:00 +0200 Subject: vhost_user: Reset vq enable flag in vu_cleanup() 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 Reviewed-by: David Gibson Signed-off-by: Stefano Brivio --- vhost_user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vhost_user.c b/vhost_user.c index a1259c2..272295f 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) { -- cgit v1.2.3