From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 1/7] vhost_user: Reset vq enable flag in vu_cleanup()
Date: Wed, 12 Aug 2026 14:15:24 +1000 [thread overview]
Message-ID: <anvzW8an6rDexo9O@zatzit> (raw)
In-Reply-To: <20260731164628.3556997-2-lvivier@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]
On Fri, Jul 31, 2026 at 06:46:22PM +0200, Laurent Vivier wrote:
> 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), skipping the threading_start_thread() call
> and leaving the worker thread stopped.
>
> 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>
AFAICT it would make sense to apply this fix immediately, independent
of the rest of the series.
> ---
> vhost_user.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/vhost_user.c b/vhost_user.c
> index 9e382c21f963..8ba3949e4e9d 100644
> --- a/vhost_user.c
> +++ b/vhost_user.c
> @@ -1083,6 +1083,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.54.0
>
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-08-12 4:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 16:46 [PATCH 0/7] multithreading: Add worker threads for queue pair processing Laurent Vivier
2026-07-31 16:46 ` [PATCH 1/7] vhost_user: Reset vq enable flag in vu_cleanup() Laurent Vivier
2026-08-12 4:15 ` David Gibson [this message]
2026-07-31 16:46 ` [PATCH 2/7] threading: Add basic threading infrastructure Laurent Vivier
2026-07-31 16:46 ` [PATCH 3/7] passt: Integrate main event loop with " Laurent Vivier
2026-07-31 16:46 ` [PATCH 4/7] flow: Delegate epoll file descriptor management to threading subsystem Laurent Vivier
2026-07-31 16:46 ` [PATCH 5/7] ctx: Remove epollfd from context structure Laurent Vivier
2026-07-31 16:46 ` [PATCH 6/7] vhost-user: Add per-qpair worker threads Laurent Vivier
2026-07-31 16:46 ` [PATCH 7/7] virtio: Prevent crash on virtqueue exhaustion with temporary workaround Laurent Vivier
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=anvzW8an6rDexo9O@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/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.
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).