From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <010701a110d3ccb6-1c6e8051-7e87-4777-a73a-9a33d05d6856-000000@eu-central-1.amazonses.com> Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11021118.outbound.protection.outlook.com [52.101.65.118]) by lore.virtuozzo.com (Postfix) with ESMTPS id B22C2802A5 for ; Tue, 6 Oct 2026 10:48:08 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GAjUM+O5xiDcmu17iSse9wJUakZixliUayFvx4/1w/N0lwYRhSLAOfrmkNNE70xuVoJ3pGjpWFNocWtcKO0OmM2j//HseFJhNi8pdYJX+03KTH4odxOEtSMWpz7JexelFUaIv+Saa3JIvpqWofqJroU14Jm22KX/FA+KJ9aYCzwzdlUIA3QezzFgMLL1+AmcP0dEHoJhYwjbjalXJ34qfO71BQ5Ja+p1aaBW1sSJ9Ju0OFhTGWq60D7tfCHIIDEExE39IVLkF6SquFBUE9kz6q3fdzrinMsSqlRg+D7Aq8iJUt4aGGfF6aFtPKgf0UA74UnmxTefZQvuDO2TxCLd7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZYApBRYjG3yZS95vZDNK4ObN0ePakoiEJj88Pb35f/k=; b=dcUxMmQm7JZj/4qwE0M3rDX2UzlJWpff7X+Ah9Lltxx66yUvLArt1B91i67aDt4EpxoxiIjTfUNtgPPaKnOaxhxadA5U7Y24wtcW1bLqMqC0TRB4kQYGEWS0BqqG6V4Pny9iSeIDphc0dTDUmBDRNI7B2kLH+pYMSswd08f9WuFWH3Xxr7qs3rzPgR52IPHcdnbDCzB17PssRv9ltdy8jYeHptTgiXW6P4YLQeD7GRZqf45ghua2cJfYmqze6i/PcNs5SZqbUmrPMkQMV+k+6sRLhh/u5zhYcPGEtZNcedDbUlQs/wGMfaHm9AcuoKeZOnBe/u3DM9k5v6h0SLljIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 69.169.224.2) smtp.rcpttodomain=virtuozzo.com smtp.mailfrom=eu-central-1.amazonses.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=sashiko.virtuozzo.com; dkim=pass (signature was verified) header.d=sashiko.virtuozzo.com; dkim=pass (signature was verified) header.d=amazonses.com; arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.onmicrosoft.com; s=selector2-virtuozzo-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZYApBRYjG3yZS95vZDNK4ObN0ePakoiEJj88Pb35f/k=; b=bDWjb7CA05XozuBgNECtpP0+/3pNWagQ7QLBdwbI+OOvOwQVOlHVrMhJ9fvWW0Fuc2Vhkfs6Y8cx/S/I0i/v13BypSESOSQ2hph4QHo0cbfrb3NvHIy5EcTa8Dth50H1yIpqV11WREnY/edFVVd5wDh7AQ9eMgNa8IuDHt5aI54= Received: from OS6P279CA0120.NORP279.PROD.OUTLOOK.COM (2603:10a6:e10:3c::19) by GV2PR08MB9302.eurprd08.prod.outlook.com (2603:10a6:150:d4::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.472.15; Tue, 6 Oct 2026 10:48:01 +0000 Received: from CPH1EPF00000529.eurprd05.prod.outlook.com (2603:10a6:e10:3c:cafe::9) by OS6P279CA0120.outlook.office365.com (2603:10a6:e10:3c::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.472.20 via Frontend Transport; Tue, 6 Oct 2026 10:47:59 +0000 Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 69.169.224.2) smtp.mailfrom=eu-central-1.amazonses.com; dkim=pass (signature was verified) header.d=sashiko.virtuozzo.com;dkim=pass (signature was verified) header.d=amazonses.com;dmarc=pass action=none header.from=sashiko.virtuozzo.com; Received-SPF: Pass (protection.outlook.com: domain of eu-central-1.amazonses.com designates 69.169.224.2 as permitted sender) receiver=protection.outlook.com; client-ip=69.169.224.2; helo=b224-2.smtp-out.eu-central-1.amazonses.com; pr=C Received: from b224-2.smtp-out.eu-central-1.amazonses.com (69.169.224.2) by CPH1EPF00000529.mail.protection.outlook.com (10.167.241.164) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.496.14 via Frontend Transport; Tue, 6 Oct 2026 10:47:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1791283678; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Message-ID; bh=mTGrgFP3hRMeoQhEqd161YvSjOpM+zZq1aOFpYASI5E=; b=iIqAeByTfuA8lFl2OfLbCakLgZqryuaybxDMPfVnzevQ2O8CTedu125biEox64b4 1N6Yv0U+ipWTarvaQvfgLGr0aYduvXVRCPFwLblQ41yhmU6IZzaafo3gutYlTZpZvvS o+vxGQC8tgDJEoQdzgSFIBVoTz8JkyooZTRwIWor+sKuVtm/AJdzukOkrnsqxpAayxP mm1qqHTDfzw/TawimSZj/jT25hgIvF9YPPyibJ0V+EeTJWdKQo12/NfkunmM9Bg/wHa pPQfVyF34MUcY0GIBOkGXxR/0fvpz+UOaXSwBdwiJecap6eOkkkeumz0XAdzZgX78CH 2cB2CGe2EA== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=sokbgaaqhfgd6qjht2wmdajpuuanpimv; d=amazonses.com; t=1791283678; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Message-ID:Feedback-ID; bh=mTGrgFP3hRMeoQhEqd161YvSjOpM+zZq1aOFpYASI5E=; b=G8TKAFEatoAEm3YRudWOW587RsK2p6Lgc+fXDmDACcLlBceuPFK6sas4cfCcZNJf LaPQUXMC34Zt8dSkahW20G1eJnMvrbVgZaHiNBTjffx7TyGITOLe6PIgi+TAhrK4OVb flGYYPopkq/i+jrTa9G6mZ6RriKjEfhawybtliyY= From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH QEMU HCI-8.0 v6 07/12] usb-host: skip product-string read on CPR incoming #VSTOR-137800 To: Andrey Drobyshev , svt-core@virtuozzo.com Cc: den@openvz.org, andrey.drobyshev@virtuozzo.com In-Reply-To: <20261006-usb-host_v3-v6-7-8688ec9576d1@virtuozzo.com> References: <20261006-usb-host_v3-v6-0-8688ec9576d1@virtuozzo.com> <20261006-usb-host_v3-v6-7-8688ec9576d1@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 6 Oct 2026 10:47:58 +0000 Message-ID: <010701a110d3ccb6-1c6e8051-7e87-4777-a73a-9a33d05d6856-000000@eu-central-1.amazonses.com> Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.10.06-69.169.224.2 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CPH1EPF00000529:EE_|GV2PR08MB9302:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 0c236bc2-eff5-42fe-d7de-08df23974976 X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr X-MS-Exchange-AtpMessageProperties: SA List-Id: svt-core@virtuozzo.com X-MS-Exchange-Transport-Rules-Loop: 1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|704161411799003|9140799003|32142699015|61400799027|376014|48200799018|4113699003|4143699003|10067099003|5113699003|5063699009|56012099006|16102099003|22082099003|55112099003|18002099003; X-Microsoft-Antispam-Message-Info: ZPV3jFDbteu613Angpnk0EvhCO/q48jhYx4Bq0PyZlyWnRklTMui3+s06FwcJmKg3EKQYEdashAT3JvCQh84zaOj4gojdg0ZdPLsKTgDi7AzP+IJaIASnrMQ3Sr0WDJxS2FxgShQ/MZvqlqJxEKJgCSsfq7Q78hTBFf1CB0Y2tvvNa/tATBXN6hZN1SrioQJpt4+61Zun9RruOhxioL8t1eDOZzaWpNbtFSn90SXowHy3SwkLcwc10vhl+0bZ6Ydh5wuc+9p7zAbWWF7TnejLsRYHiWVlj9P4W8qfajsk2DfRAHV+Tq78GCVolqySiXu7nG6c5UoZLPEe6zz2romY48SJffcylnrbQsV8y0mcFngiE/OuEqyovZOGwWRX5QdjiWqNJ4S3oRM6+Be9OIk6/lHl3bIx9z0+C9u4rKsfEGcNp1cp5sEaKet6O9820HHnEXzf1xKM9GVi7qnqB5W+2AykjdwuhvCc5F9KH4Pczp6Ypd1Kn6ldLgBqvDKtymvuZ4l2z3WNWEQmoSdm6+3AONiKAsjf7r/LAAxRPbzY/9Evsi7jlm/lr8qzw0RzbN628rnC7VcXZbhBuzHkdXcj+lyvpLO4e/Ak06fhVZr/H2zywxYVAp3m2B/rz/4cRT0tG+9PPz0QvxSjm0y//nVbYSs0gIbdmeVHjGsrXV1AJHk19uNFeh9uck8yI34Kv8gayDZNsw3WD43hJM0/UZkHozkt1KCPD2EbZrw3OW1jFYwgVYRZUAYMMF91Mt8cmOyCvLKKyPkjQvucCcRkz7I9u9sxtf2WZKXIu4p3vTJ9oBliy3H7GYaGcaISpin830/e3Gvoj4QH9Wqek/w770UjSmb1JmkaL3ZmsnizK9q0TI= X-Forefront-Antispam-Report: CIP:69.169.224.2;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:b224-2.smtp-out.eu-central-1.amazonses.com;PTR:b224-2.smtp-out.eu-central-1.amazonses.com;CAT:NONE;SFS:(13230040)(704161411799003)(9140799003)(32142699015)(61400799027)(376014)(48200799018)(4113699003)(4143699003)(10067099003)(5113699003)(5063699009)(56012099006)(16102099003)(22082099003)(55112099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: i8LqZtPwdp62popoII666X9xsoPs1ONMTxD4ICrNEHMbMqZgYbXu9HndpeRUVhKbqDX1hllAIlSCGH6sLwazpyzDA7HkFhJ0Ds0izRVpAL6Zqb3OZp3ycOQshXF6xDjd8ssDJyLpHF9U1uGa64q3qqhS40l2LbBKX/AfnN85QFJslezWhhvOqEmeqNIVVqR0oi/kNskiJSjp1YB2r439H66JFAh1qO1JnsENxVqaGV87RwAhgg6ZHlpuGTiNSBVx5W6lM3TAI7HO9zZJueHu/9yc0KINPfMTAcKWA9xwHabmJmeTvQArBEqEz3DojW0JxYV4ixVxL6gZ2EKyCBY/3YB1hZY0V72ExCPfUY8nyO2dhgrIJofnrc+rPl3bFuHAJa84i3EMTSxwjswStPkMus3UKLqby2/ApYJkH75M52zd7j16m6bsxYFj+wieMuFA X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2026 10:47:58.8594 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c236bc2-eff5-42fe-d7de-08df23974976 X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: CPH1EPF00000529.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB9302 Thank you for your contribution! Sashiko AI review found 2 potential issue(= s) to consider: - [Low] usb-host: cpr_is_incoming() guard in usb_host_open() skips product = string for all opens - [Low] usb-host: CPR product-string skip is an uncommented workaround for = an unexplained hang -- commit b936df5f0185ffcfa3c56baf845d05beba3ac351 Author: Andrey Drobyshev usb-host: skip product-string read on CPR incoming #VSTOR-137800 This patch skips the synchronous libusb product string read in usb_host_open() when the process is the CPR target. In that case it uses the synthetic "host:bus.addr" name for product_desc instead. > diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c > index 85509dc2d83e..020a685aa419 100644 > --- a/hw/usb/host-libusb.c > +++ b/hw/usb/host-libusb.c [ ... ] > @@ -1106,7 +1106,7 @@ static int usb_host_open(USBHostDevice *s, libusb_d= evice *dev, int hostfd) > udev->speed =3D speed_map[libusb_speed]; > usb_host_speed_compat(s); > =20 > - if (s->ddesc.iProduct) { > + if (s->ddesc.iProduct && !cpr_is_incoming()) { [Severity: Low] Is this guard broader than the CPR hostfd hand-over it is meant to cover? cpr_is_incoming() returns incoming_mode !=3D MIG_MODE_NONE, which is a process-wide flag that stays set for the whole incoming migration. It is not a per-device indicator. Any usb_host_open() call in that window therefore takes the synthetic name branch. That includes the autoscan path: usb_host_auto_check() usb_host_open(s, devs[i], 0) It also includes the explicit bus/addr realize path. Neither of these is the hostfd hand-over described in the commit message. Since product_desc is only written in usb_host_open(), would those devices keep the "host:bus.addr" name after migration completes? Could the check be narrowed to the device that was actually handed over by CPR, for example by keying off hostfd? [Severity: Low] This isn't a functional problem, but could a comment be added here explaining why the product string read is skipped on the CPR target? The commit message says only that the transfer "can block". The cause is not recorded in the code, and other cpr_is_incoming() checks in this file carry comments. It is also unclear whether the other libusb calls that still run in usb_host_open() before usb_device_attach() can block in the same way: libusb_wrap_sys_device() usb_host_detach_kernel() usb_host_ep_update() usb_host_speed_compat() > libusb_get_string_descriptor_ascii(s->dh, s->ddesc.iProduct, > (unsigned char *)udev->produc= t_desc, > sizeof(udev->product_desc)); --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/20261006-usb-= host_v3-v6-0-8688ec9576d1@virtuozzo.com?part=3D7