From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <010701a11217023e-1c1e2553-5e8f-429a-9cde-4360c73d8e12-000000@eu-central-1.amazonses.com> Received: from OSPPR02CU001.outbound.protection.outlook.com (mail-norwayeastazon11023137.outbound.protection.outlook.com [40.107.159.137]) by lore.virtuozzo.com (Postfix) with ESMTPS id 2D5808017D for ; Tue, 6 Oct 2026 16:41:04 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=B9KPz1lhn4cNRjYuvmbtGa2AbHDMeVDgHNRGRd5ZkmStnyB9D7WBLwrEZk+AyAjZsj4Lm6ui4m451QdY5nEtYOXnZcW3mqLDJmd2ieWw0RstoQyjyQYG3Rs0HJPU8cSo0anGdeIXcy4Fg7+Z184c9tqeH9m3IaRf+mdjRzBp1jqu0sN9FWMqRuqx/L+zu2YBNecD4zeMiQRi67CpzfsRnEmi0a2SIAp9gqQaEmqqtaa7rCPtSLWCsVIovPJzD7wKuzurpj8Q9VennKo1Zj2zKkR7OWw0aZp6rObcnQjTIRy+JuR9XEuhUPvsKlenqDjzVtqzMLp4LCPF4yuY5h+Csg== 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=o27dMJGsQsRTqZ4el57R+gjKx01KFNV2vOU++TmQHZs=; b=P7lLaPEljM4S9wzjOJ66j9CFaaU4bnHJU5Jr2Laj/4WfOh8eaPNVVsWYDLczwVL1vS69BQzi6qvD6otXDyXsqF/W8B08UPIo2EME7DEFW8lcawkYj/FgG+s1YTJcV9/+KKhw3XBXbjMYefq+a0K69y6UiaZ7v+vAe3rfBxt6ns31tAkC4/kdiYcdGtw6utJfQsctrHq4z14YfjdxksZH1IxWVvsy/pAZmL9TjYYbU5Qbi7UZXk8/lkCcbS/PD7l9t0pCy7GDKRkrGo5PaHTTcS4nlrGMpB+bFz0a7m0SHP7yGXRyQwLFeqITKwNdnZxyKl14Dm7u0bQJ4q1vamuPsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 69.169.224.6) 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=o27dMJGsQsRTqZ4el57R+gjKx01KFNV2vOU++TmQHZs=; b=TaclGMIWX48ATSK78BcTPlao/4P6YzAD4vjp+Z46ARSqACZfZ3g/1ioZimn4UXWM4l9BP+QVdZREGP2HK+ud4Bl8v3sUPgYMKY0tzQLuH+Wai4575YleyC+gJxYYPtUgjWWsa7vp7qPLkDXZ2mtNZ0V/gOkjV1RQGy3CmNtr5WU= Received: from DU2PR04CA0269.eurprd04.prod.outlook.com (2603:10a6:10:28e::34) by AM9PR08MB5922.eurprd08.prod.outlook.com (2603:10a6:20b:2dd::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.472.18; Tue, 6 Oct 2026 16:41:01 +0000 Received: from DB3PEPF00008860.eurprd02.prod.outlook.com (2603:10a6:10:28e:cafe::90) by DU2PR04CA0269.outlook.office365.com (2603:10a6:10:28e::34) 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 16:41:01 +0000 Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 69.169.224.6) 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.6 as permitted sender) receiver=protection.outlook.com; client-ip=69.169.224.6; helo=b224-6.smtp-out.eu-central-1.amazonses.com; pr=C Received: from b224-6.smtp-out.eu-central-1.amazonses.com (69.169.224.6) by DB3PEPF00008860.mail.protection.outlook.com (10.167.242.11) 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 16:41:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1791304860; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Message-ID; bh=k7WpwukGzq2pbOehB2B8mnk3ZDBQITvlW/3ooLZ+eo8=; b=I0CgOfwpD+2hlgAT3MQAmH5GcECsmVk3sOM9+BcyWKpKyEPGAV/OfqQM7BlSYfhd guSkHYkbjc40K+l0g5/E9lEfiOqIHVMeuGgaX4HVmRt4ioxxiyqvUkdMMzb2L/+n/TU QTOieB19I89IEqMx3KmXV4JQSZxd+G1vXmAKByHCZ5lt1RusUIxvgZIYomgrhH/qof6 RD9Yf9CVvE2LaYMYiREZzhUo99HWc0QlUA10ZFMVu1CBmN9uFTZ07w8cirUA+nTYDCg qurW3+jjQh3EhiSydZd3thVZwY5ihKuUzCFL4vf0EmnU8BS3itNbylnxt6Q/OVLR69C hrjPUreGpQ== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=sokbgaaqhfgd6qjht2wmdajpuuanpimv; d=amazonses.com; t=1791304860; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Message-ID:Feedback-ID; bh=k7WpwukGzq2pbOehB2B8mnk3ZDBQITvlW/3ooLZ+eo8=; b=FKvBAElycF+m1gY+lvxULTnonB735/ayKxskDPO5gbYyNaG/sIOtc0mHv1Tl4rRs eSwTo9L5FVwOr1w/lW7tGXrIIgiRChB/fiXLijOS5SIOikhk95ns0l6R43fEtE86ATZ JFGXK+BJfo3Sbg/LkoHGc7zvenEWWiMKBCw2G+C8= From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH QEMU HCI-8.0 v8 08/14] usb-host: skip product-string read on CPR incoming #VSTOR-137800 To: svt-core@virtuozzo.com, Andrey Drobyshev Cc: den@openvz.org, andrey.drobyshev@virtuozzo.com In-Reply-To: <20261006-usb-host_v3-v8-8-72ae4fb8977b@virtuozzo.com> References: <20261006-usb-host_v3-v8-0-72ae4fb8977b@virtuozzo.com> <20261006-usb-host_v3-v8-8-72ae4fb8977b@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 6 Oct 2026 16:41:00 +0000 Message-ID: <010701a11217023e-1c1e2553-5e8f-429a-9cde-4360c73d8e12-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.6 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB3PEPF00008860:EE_|AM9PR08MB5922:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 366d8075-99e2-4ffd-9f1a-08df23c89ae3 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|48200799018|32142699015|9140799003|376014|61400799027|56012099006|5023799004|5063699009|4143699003|55112099003|22082099003|18002099003|10067099003|16102099003|5113699003|4113699003|13003099007; X-Microsoft-Antispam-Message-Info: tVPoZKa6g3POBT8g1lOAKlFtRCzCGQHU789n8PPx1+kUw14xT69Fo1GbJdAdMLq3KfCiq+Tg5uhSXWEjW1CA1ZawrAXMPxnVTIJQDLnJElhx9FVrD2iZzTEnebSSNa+UY8rB3TFxjxG4t4AbG2uhxbPaD2kB5/NbCVa2CRSsrHz/hoMnt7/ktRTZpqJpFaE00hCGnSNuoSLWtSpsN5nLoOYTdvm5R2zgU0TCIqGpKRO7I+LrbJghOVyUoPFoDJX1bxODAXVPPNLH41iKrRtj5EufFz0nDFZox8pXl6HEXr0lTmRURTjwII0/sy7GmktsLrUdAaozAvW3oPFADSKB0L85KiC7OKCOoe+grNo3eVgRz4LOAKTdxJoYZiyWKFyv4OG8IZ0grPgLjIK2IDcStF4O/1Jm00d+xnEvQTN4q119VvYaySy8xL4cvsrcMRETWraO22rNFu1Q6kUArJIs3eXGDUZjzLpwUJUdY6H5adn16VNBs0Kai6fkmRFMZhnotqM1bKL7r/7T6rFX/5KnyvzaqxQvW2K/WYa5RAZwgBduWxNiImkzi16CqRCyY+/WvK7rXCJnawRK1FWbHed8HADT4vFrUJbCC6VweDON9pjZoHO6sHuk+aJqEFOX4B6SfanDUs6Bkx+C1Y7hM/4gaHTFI3sjswqhS/Of4rzLoDq5FOSek+zknKZDdu4R6pAHiN87jTpTsyKs8XdVQiMyjymGR8t7St5/dj451fHigAWfpiPxs2WnQgN4JvpU/iu03dn8iF9hqvRLPhDcUkSlk9LkEHVx9nHRK/bDH04ajYvvpHjx/DmcilT1z17jLBTMwNksdMy6w+s0aQHym8gfVxSDGsoeLt+MUBBnnDjBzW+eQE0KHY8tUHbyZhCqTiJSQ7jguLgw7jtJaw8rhyETkQ== X-Forefront-Antispam-Report: CIP:69.169.224.6;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:b224-6.smtp-out.eu-central-1.amazonses.com;PTR:b224-6.smtp-out.eu-central-1.amazonses.com;CAT:NONE;SFS:(13230040)(48200799018)(32142699015)(9140799003)(376014)(61400799027)(56012099006)(5023799004)(5063699009)(4143699003)(55112099003)(22082099003)(18002099003)(10067099003)(16102099003)(5113699003)(4113699003)(13003099007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hWh032+N90QaWw7fTZHOtWLu0NYNDw4heEKNlLmNEZrdc7CJfFN2LEJDdYKRfqkC7HiYlZxwy0XlEgdljqzQGYtzXstJbhuuwLwpTV8HIbLbrPke5uaQlbzHSaC5XZHsbhz7yaoJKJiPNEtCAPjLQYZjJbNLUEP6Ky0LSYFWdcgx578JwueZO+Hhg5j9wC6VeNE8ykRQJNaOSvqkOyMEKy5U3ka/hmWes+3g2dxoREEnCYXrdY1X87HxmAypabNPc+7ATbHpcYFzXNMs9Zrzt4PXHJkCvuo4qn+GHl76111Y0xty+kb3+oj71bXT5WYxBoyv5PHf0RNu3mnllkqDdng0kDYJZK/QjvkFWRhCGw7lQUp06HNmq2CniFLPS4mEunSp1rHHVhfgPYA60k3JWIFg8K92lK2vvQwuR4ALWp/gRcKyfRLaSGlbUHDURWK+ X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2026 16:41:00.8054 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 366d8075-99e2-4ffd-9f1a-08df23c89ae3 X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: DB3PEPF00008860.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB5922 Thank you for your contribution! Sashiko AI review found 2 potential issue(= s) to consider: - [Low] usb-host: CPR-incoming workaround skips only one blocking call, wit= h no root cause - [Low] usb-host: cpr_is_incoming() is a global check, so unrelated opens l= ose product name -- commit 49b39041283392e4d6c44ac4bd1c34c893215179 Author: Andrey Drobyshev usb-host: skip product-string read on CPR incoming #VSTOR-137800 This patch skips the libusb_get_string_descriptor_ascii() call in usb_host_open() when cpr_is_incoming() is true. In that case product_desc falls back to the synthetic "host:bus.addr" name. The stated reason is that the synchronous control transfer can block during CPR handover and hang the incoming migration. > diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c > index 9cc7d72aa63a..6c00ce528b1e 100644 > --- a/hw/usb/host-libusb.c > +++ b/hw/usb/host-libusb.c > @@ -1123,7 +1123,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()) { > libusb_get_string_descriptor_ascii(s->dh, s->ddesc.iProduct, > (unsigned char *)udev->produc= t_desc, > sizeof(udev->product_desc)); [Severity: Low] Is skipping only this one transfer enough to avoid the hang? The commit message says the transfer "can block there, hanging the incoming migration", but no root cause is given. If the cause is the device handover state, other calls in usb_host_open() during CPR incoming could block in the same way: usb_host_open() libusb_wrap_sys_device() / libusb_open() usb_host_detach_kernel() libusb_get_device_descriptor() usb_host_speed_compat() libusb_get_config_descriptor() ioctl(hostfd, USBDEVFS_GET_SPEED, NULL) usb_device_attach() Could the root cause be described, and a comment added at this guard explaining why only the product string read is skipped? Also, nothing appears to re-read the real product string after CPR completes. Does product_desc then stay as "host:bus.addr" where the source showed the real name? [Severity: Low] This isn't a functional bug, but cpr_is_incoming() is a process-global check (incoming_mode !=3D MIG_MODE_NONE), not a per-device indicator that the dev= ice was inherited via CPR. incoming_mode is cleared only by cpr_set_incoming_mode(MIG_MODE_NONE) in migration_incoming_state_destroy(). So the window is wider than the device handover. Can this also affect other opens during that window? For example, usb_host_open() reached from usb_host_auto_check() or from the realize paths would skip the product read for a device that was not handed over by CPR. Such a device would get the synthetic "host:bus.addr" product_desc, which is visible in info usb, in log messages and in traces. The commit message does not mention this wider effect. Would a per-device condition be more appropriate? --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/20261006-usb-= host_v3-v8-0-72ae4fb8977b@virtuozzo.com?part=3D8