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=CSHGx6xO; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 227095A026D for ; Fri, 31 Jul 2026 18:46:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785516394; 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: in-reply-to:in-reply-to:references:references; bh=onZN5o81lzgdAjugtdG+9YJFWit5t6jlN5JVCEW8bN8=; b=CSHGx6xOrS4hcE7uCxkhBQkI3tWd8ftoSg6WFh8bBFRsYfO0pddOaNscQvy2lxmpoIi91I PY/nQz3KwWxknm9XdtSQRZJxP09p30QubDRxp2m9mRR4ZEf618iA554sGyDbJz/tSbpQbL aMU8MuNILg4wp8AmJ6mf6fGV3pd63mQ= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-p8lhAvMJOGKh55vvvZEvlg-1; Fri, 31 Jul 2026 12:46:32 -0400 X-MC-Unique: p8lhAvMJOGKh55vvvZEvlg-1 X-Mimecast-MFC-AGG-ID: p8lhAvMJOGKh55vvvZEvlg_1785516391 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AFB8718002C5 for ; Fri, 31 Jul 2026 16:46:31 +0000 (UTC) Received: from lenovo-t14s.redhat.corp (headnet05.pony-001.prod.iad2.dc.redhat.com [10.2.32.117]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E61CE41C; Fri, 31 Jul 2026 16:46:30 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH 1/7] vhost_user: Reset vq enable flag in vu_cleanup() Date: Fri, 31 Jul 2026 18:46:22 +0200 Message-ID: <20260731164628.3556997-2-lvivier@redhat.com> In-Reply-To: <20260731164628.3556997-1-lvivier@redhat.com> References: <20260731164628.3556997-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: XDDJd1Gluv5auUSJr7stHUIxmTKOz6i45mUHJKHiq8w_1785516391 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: 6FBMVVN5HDDFODHKIIVYSQM6CXBDQTHW X-Message-ID-Hash: 6FBMVVN5HDDFODHKIIVYSQM6CXBDQTHW 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 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), 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 --- 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