From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202608 header.b=rr+sQaDE; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 87FB55A0269 for ; Wed, 12 Aug 2026 06:18:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202608; t=1786508306; bh=Qj6tMDVpSu5xz0GJTUb9vMG7QMnQKFowjz646f/+v2M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rr+sQaDESTYMAsH+Jw5RbqxyX7cdm0F+U98oBonQu9j/YfNvekmPPosHpqvNhHa9b Taked2mu3+CoLJta2y4nglKUcyObDlgXsVuFK27YXiX1Yk94YEePX5Sd2jqmlFEjVO fWE1VDrVc5DGMfS6SnrPRg2vxijzRWlBJYPIm9XBOddjV9qbaNK1oxVg3GhFJYFSMk sFo9Xw/gJ7PAFB8cA36KwuX1kkzLUfJ/Hihml19/8CwPfWnzoTW9YIuzx6Vn8M5gNA Ty/rB6gPXSXAn+mYPtFStx02r0FCMXd2UnRTY5yf5e7utzgMHSbafGmKblLVxT1O34 muTDytyoi+n9A== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4hKZwy2fx9z4wCX; Wed, 12 Aug 2026 14:18:26 +1000 (AEST) Date: Wed, 12 Aug 2026 14:15:24 +1000 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH 1/7] vhost_user: Reset vq enable flag in vu_cleanup() Message-ID: References: <20260731164628.3556997-1-lvivier@redhat.com> <20260731164628.3556997-2-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Ru0Guo/MaqkQ6EPH" Content-Disposition: inline In-Reply-To: <20260731164628.3556997-2-lvivier@redhat.com> Message-ID-Hash: YSDPV3UUYSMV65HJRCP34IYIZMC3YOC2 X-Message-ID-Hash: YSDPV3UUYSMV65HJRCP34IYIZMC3YOC2 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --Ru0Guo/MaqkQ6EPH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D=3D enable), skipping the threading_start_thread() call > and leaving the worker thread stopped. >=20 > Reset vq->enable to false in vu_cleanup() alongside the other > virtqueue state. >=20 > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson 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(+) >=20 > 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 =3D &vdev->vq[i]; > =20 > vq->started =3D false; > + vq->enable =3D false; > vq->notification =3D true; > =20 > if (vq->call_fd !=3D -1) { > --=20 > 2.54.0 >=20 --=20 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 --Ru0Guo/MaqkQ6EPH Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmp781sACgkQzQJF27ox 2Ge89RAAk535HnFRYOjepxPJDD7LSBe8vKZwzcWvMa8JnzP9UXMRFzcBMetNnzSm ElsDHXqnsdbHTBQfwYXZdIkWCQaMQ10agzTUJy4MdIunxsgxOPz0hYLKstt3/FTh GGjgpzjDO/A4z0c/d6e1h/04TqKhUVN+rkOJNoim/8grU9yIQjYBtIiPkLvHelNj oQ4RDF2KXv69y/7RUAWI5hGEgxS58/HIjMFYcK3vN/KIknzjp9G15buUfhBX2kWO F+TRHsid5ybcaw7cushJ1eMT4oQ08JTfSYRW9KGCr38MVmWjTCurmXyRdzJjuGfZ tztGK++8QJBfwuP9UhRp3/prjsjJj3+9SKqaFqMTcKaq1EQ5GcoLViF24RkefW+b neL8ICiQRjZc6Td8dzQzTloVWVqDnpdYXdQbiUKiGl+BLdFTYQjfUZ6QDcLWZnA2 RF7eoGi54fKnwHELT5DTf8WnE2R3uy4Hds0O3TWfV73OrBGmMoMQXhwj8RjV8ADE Ci/FQUKNVqxejwfKyGVxfu5LBL60liw3NQNm3TnwikrGBBpOXvjLJx+uBxpW6x/h YWgjpjExRY8aBfUabqO5h7ty0QHRouJX6OgIGXZ7EKjZj1xW4Hfl7LeprvegRdKG iAcA4ItqAnOkaA0ITTGvs5i0WjVR2BPXF/e/JYVvtW+PTZx2O9o= =xVrn -----END PGP SIGNATURE----- --Ru0Guo/MaqkQ6EPH--