From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R1KUS1K3; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 249465A0265 for ; Thu, 03 Sep 2026 13:16:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1788434168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6NH4TKb7mJLu9dRKHF8sFnV3q4JKD6aN0E+XtXdX/Q=; b=R1KUS1K3tCN0Ubujq83U9p2d1/UTTkeBzrl9kwlNLPeu4wUSzhNvBd/9Y+vVAIsAuZzDP5 37ABj/qoP33XVndRvxJLMwpJelFwnjRtOtdCl4HhSRFMIa0nAY74d1NFdfbV9aCMiSF/jK YLhI8D54epGXlIJdBRm4RT1WWhjT2Cw= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-5-J_CeuUGSMMWgj93NmOlqqg-1; Thu, 03 Sep 2026 07:16:04 -0400 X-MC-Unique: J_CeuUGSMMWgj93NmOlqqg-1 X-Mimecast-MFC-AGG-ID: J_CeuUGSMMWgj93NmOlqqg_1788434164 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C785A1944DEA; Thu, 3 Sep 2026 11:16:03 +0000 (UTC) Received: from lenovo-t14s.redhat.corp (headnet05.pony-001.prod.iad2.dc.redhat.com [10.2.32.117]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 05BC51800346; Thu, 3 Sep 2026 11:16:01 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH] vhost_user: Reset vq enable flag in vu_cleanup() Date: Thu, 3 Sep 2026 13:16:00 +0200 Message-ID: <20260903111600.3837753-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 3JCpUQnVwQ0cFUThf60FmKL5p9e-XRxtCzlee1D-R90_1788434164 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: VC6LGLLMGL2JIX6QU45SXI2YYUMITPKD X-Message-ID-Hash: VC6LGLLMGL2JIX6QU45SXI2YYUMITPKD X-MailFrom: lvivier@redhat.com 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: Laurent Vivier , David Gibson 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: 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 --- 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