From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96DFE606A33C for ; Tue, 3 Nov 2026 14:24:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=kdfbgDc8 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xOFQl-0005ww-Ao; Tue, 03 Nov 2026 09:24:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOFQk-0005wd-FT for qemu-devel@nongnu.org; Tue, 03 Nov 2026 09:24:06 -0500 Received: from out-227.mta0.migadu.com ([2001:41d0:1004:224b::e3] helo=mta0.migadu.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xOFQj-0003ap-1k for qemu-devel@nongnu.org; Tue, 03 Nov 2026 09:24:06 -0500 X-Envelope-To: qemu-devel@nongnu.org DKIM-Signature: a=rsa-sha256; bh=uxAVAj5I4ZNhE9FDm1hcjjRGig4oSJWX7ANkweiZjow=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1793715843; v=1; x=1794320643; b=kdfbgDc8j5bL3MlHRDhlp49E5inOEdfwt8mNyHiSmdI5cCjoZG07J6YXwAvK8EkPXtQLC9sv 2uxLnI/pamFlQXoy/C/8ZC4OXIiB/01dpoqL097a5P5BLqrJH4nQApNHiO2QRijsQSpfx+UWpv4 6c94CMtMxR5No8L0X2d4ct98= X-Envelope-To: qemu-devel@nongnu.org Received: by smtp.migadu.com with ESMTPS id 49fd60f0c25b3ce4; Tue, 03 Nov 2026 14:24:02 +0000 X-Mizu-Trace-ID: 49fd60f0c25b3ce4 X-Migadu-Flow: FLOW_OUT From: Junjie Cao To: jamin_lin@aspeedtech.com Cc: kraxel@redhat.com, marcandre.lureau@redhat.com, clg@kaod.org, pierrick.bouvier@oss.qualcomm.com, peter.maydell@linaro.org, kane_chen@aspeedtech.com, philmd@oss.qualcomm.com, kfting@nuvoton.com, wuhaotsh@google.com, zhao1.liu@intel.com, richard.henderson@linaro.org, deller@gmx.de, sstabellini@kernel.org, anthony@xenproject.org, edgar.iglesias@gmail.com, troy_lee@aspeedtech.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org, xen-devel@lists.xenproject.org, junjie.cao@linux.dev Subject: Re: [PATCH v8 12/18] hw/usb/redirect-server: Connect usbredirparser to a chardev Date: Tue, 3 Nov 2026 08:23:24 -0600 Message-ID: <20261103142327.1348025-6-junjie.cao@linux.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261102092201.1729245-13-jamin_lin@aspeedtech.com> References: <20261102092201.1729245-1-jamin_lin@aspeedtech.com> <20261102092201.1729245-13-jamin_lin@aspeedtech.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2001:41d0:1004:224b::e3; envelope-from=junjie.cao@linux.dev; helo=mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Mon, Nov 02, 2026 at 09:22:20AM +0000, Jamin Lin wrote: > The chardev handling follows hw/usb/redirect.c: take no data before the > parser exists, do not write to a closed backend, do not re-enter the > writer, and let a close that is still queued finish before a new > connection opens. Exercised the close/reopen path with usb-storage exported: three usb-redir clients in a row on one server each get hello and device_connect. Killing a client with SIGKILL during a direct-I/O dd loop leaves the server running (ASan build), and a fresh client gets sda back and reads what it wrote. Reviewed-by: Junjie Cao Tested-by: Junjie Cao