From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11021124.outbound.protection.outlook.com [52.101.70.124]) by lore.virtuozzo.com (Postfix) with ESMTPS id 7FE0E8017D for ; Mon, 2 Nov 2026 10:42:49 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OeZyEEdEIsBESrLTPRuKj0HTLlxC3KuMnhTlrNhgiX6XAiAQsWAIgvz+HlDIJ785qlkttzZ1VuhSvR1R9orUW27DvIaGAv+Ktrv1z3nJuCL1cTTggQCVU1JovAmJMnqFpSeUVb3j2DDc7sgQi51Eid0VbQGsIqOkkvMBwTlFzTokq2/qyqptpD6eP+BHsnvHGgSmQmkDNXBgPoPtaKofAxOFdVKW2zlgLmCE1IPZxR9nZ64DMYzyLsd4gAuaV46+HcPDPr5hz6lmempVHTEDTQNfJ44PU+OZ7OrsLIUfY2oB17wRa8QJBmmZpVI3NiaTNf3PyJG92yrteB6BDjHt/A== 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=wNiaxfzBqF+e2CbBO0VSd4clKYIXyW/o/oMDgxayhWU=; b=AWkyd2XHIMsdu0nYrx2ZzryO1zkvhp+9b2KzlpyR2Tvt9asl6dWFJp8ivtxgAb9Z4wXTf+xsrzkfNGkID+IlokBIsL4Yz2ILxBGN0G/5uWNCjp6yfIxrKPjMI7PPELgOJo19jhyODOIf6wURex50pjxZW6bHZO1uE5UgPa8O33qc9eJMaVoIaL0uU7PfP/Hlj+lJaPxrsuED0fy8kEmhzg5eczDM863iAs8H4Cr8OpoNM1xwbcsa6dRB3FgOFMGajeVskTjHj+acbCvnSsTrtkShdNlsfUyHsXVbaRiWOsgecfaVuvt5E3yM/h+V0zFQqpkBKBR0Kk0b7VNHVK4hWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 69.169.224.1) 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=wNiaxfzBqF+e2CbBO0VSd4clKYIXyW/o/oMDgxayhWU=; b=Rj2k7aYXy65sFxzv1Vc7cIbRc10r7lqxpWGUQJHjtQp1S3d87ZK8VZWR94P5QuTc5P1F4frCI2Jdrtt+hB7NAk/PCK8YLag87OyOKr/NXF558YIu74Yeb/n2ufoFhvsSC8hEJpf11ADw/tobO+w8zmaJFQ9VkW/1ud2zIoDo2eU= Received: from LO4P123CA0564.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:33b::17) by DB9PR08MB8673.eurprd08.prod.outlook.com (2603:10a6:10:3d3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.569.12; Mon, 2 Nov 2026 10:42:43 +0000 Received: from MI3PEPF0000855E.eurprd05.prod.outlook.com (2603:10a6:600:33b:cafe::58) by LO4P123CA0564.outlook.office365.com (2603:10a6:600:33b::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.569.9 via Frontend Transport; Mon, 2 Nov 2026 10:42:43 +0000 Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 69.169.224.1) 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.1 as permitted sender) receiver=protection.outlook.com; client-ip=69.169.224.1; helo=b224-1.smtp-out.eu-central-1.amazonses.com; pr=C Received: from b224-1.smtp-out.eu-central-1.amazonses.com (69.169.224.1) by MI3PEPF0000855E.mail.protection.outlook.com (10.167.240.26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.592.5 via Frontend Transport; Mon, 2 Nov 2026 10:42:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1793616162; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=4HN1J9WeYL5R7epLd4gBkmJmX/R9mY/Krqyp32y/VlI=; b=r8ehiPNUaCCeGj79IQTnthX/wM+1cqxgzF3c/5IwXeqFMj4fGh9j2ECSWnr5T8r3 DVMjkYrjog5e+QbWuINC8xsLESfT6KF5hIqm28JED83/55elFK9GMBQx8WbjisZedIR Tu83EhUqjbVtcXMWTkzywrX8BVJJWyTSbDLUiJGlOHKCYjF6tN4PE+SpRaQLxU9PhHL N73Arpkk0Cw5S1McDw7Tt69UYOaNP9dHy8ONDQY0CGz9SavtIAnFIkN3U5w8gWJqJhu oXnQD6js8TP8yETrjvNyLTDvq4r7mnfsXNrP1Zs9J57Qc8ZTQyXkFdxpq6SQ6sUaEvK sFmHy8DB2w== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=qftdzk2dqsatjnlrq4r5brjbihpfcrsh; d=amazonses.com; t=1793616162; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Feedback-ID; bh=4HN1J9WeYL5R7epLd4gBkmJmX/R9mY/Krqyp32y/VlI=; b=MQMsClI00YY1IuENlcqVPn4oRBR+xGVtP3ZhJysR0VwzZdq3rRotUe84uEhx+3UO h0fPbTIZY6ZHJcmsxt3p4GG88o8RZVCMkCMZS4SLmjvxm8BcQrLgzXVFjXF9bGYYG1Q fhL1cT6fGZixULKLv2+utbQymI/vaTLftKA+nw80= Message-ID: <010701a19bdab025-d1d88833-f0d3-43f2-9959-9be6cf8819c9-000000@eu-central-1.amazonses.com> From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH QEMU HCI-8.1 v6 04/34] migration/cpr-exec: require a file or exec migration URI To: Andrey Drobyshev , svt-core@virtuozzo.com In-Reply-To: <20261102-vfio_v1-v6-4-9bc7cabc850d@virtuozzo.com> References: <20261102-vfio_v1-v6-0-9bc7cabc850d@virtuozzo.com> <20261102-vfio_v1-v6-4-9bc7cabc850d@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 2 Nov 2026 10:42:42 +0000 Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.11.02-69.169.224.1 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MI3PEPF0000855E:EE_|DB9PR08MB8673:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 3515086a-bba2-441d-ef30-08df38ce067e X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr X-MS-Exchange-AtpMessageProperties: SA List-Id: svt-core@virtuozzo.com X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|48200799018|376014|32142699015|9140799003|61400799027|261021121427099003|260925021311599003|260925022911599003|260925021911599003|4143699003|5063699009|261009223027099003|261028144727099003|56012099006|261022105027099003|261026121527099003|261022075727099003|261022113327099003|261026140227099003|10067099003|55112099003|18092099006|22082099003|18002099003|16102099003|5113699003|4113699003|3023799007|13003099007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bEMwVUZyUUJsYlkycmZCT2MwYXlkUmFGSTJ0TzBiR0RPcElyS0lCU25mREJL?= =?utf-8?B?cWJUeWF5SFVES25rZlhFVU9ONDBsLzZGUEw4RExwdVV0d1gwaTc3eWx0RC81?= =?utf-8?B?MjR3emFjZERBZU9RbFowT1NzRW12YVpnS04xVkdWV1NNbmZuSXNydTV6c29M?= =?utf-8?B?YmpreGpiQ1BiM1FQak9qcUxRRjR0dTRMTVFuTkxjRVlrbTArSXVXYk1OVEUv?= =?utf-8?B?K2VWMEFlTmthN1ZJZEk5dlZVakZPWnhSOUQrenpoM2FFR0l1eDhza2xEVzhQ?= =?utf-8?B?MTA4aXlLZGZxcFE5aXZKT1h4NWFaZG8wNXoyOFV0L1h0ODU3eUdkQ28zUzZJ?= =?utf-8?B?RGEzaWVHQnYrWmRaNGRyd0Zvc1JNeldOd2x3VTJkbTJiUEJ6ckxINVF5a1BP?= =?utf-8?B?Zk0yamFCd2Y2L0M5S2pxTjZ4YmtGR1dJTjNrQytuNDVwUzNEMkJFNVl0V2RK?= =?utf-8?B?MlcrRzZBN2xLaDdHZ0hrdDAzMXpXc1BpbVZ2Ums0bVlobDB4NVRhZWZvME9l?= =?utf-8?B?UUdTcHVob3BlcmVvcWFJRWM2T29FT3drdmFxdlR6TWx4amo2TFVpb05ZTzlP?= =?utf-8?B?alRRZ2JOWnRvMmgydnlSeXlyd3I5dVR6VWxFZVlxZU9LblhPek5xajViN1Mv?= =?utf-8?B?WWswek9iUTlEZWU1UTF3VFRzMGQ3NDAySEN2MmRjcWt2UjAzb0lBOFRxcS9q?= =?utf-8?B?ZTZFZ1BtUHE5cXJzU3dzaGNaMWE5OWFwUTcwZ3FKeEx0L3RaL0lYYzdOcDd2?= =?utf-8?B?Y2VmdS9oQXowdi8zN2t6NW13cG4zTVZLa0NiR1A4K2x0MmplR1JVQ2tWbk9D?= =?utf-8?B?NlBETEsxNFFSUFBSaWdCSmppOThlSWtXYko1dmc5QXJacEhSQ3FybCtoZnBa?= =?utf-8?B?WVJXVUJkengwcGk0N0llcG1lMTJ4c3hFOEZFZVpFbVJwNzdkNS8weGN2VXg1?= =?utf-8?B?L3Z2ZW5Vd0dDdmJoK1hZanZ2VnhmemhmNHVFMXNUdVpNNGdudEtLZmlqbE9o?= =?utf-8?B?WVZlanRxMStMWjBXT01TSFNyaERvQ2RzL0xlSUc1U2swMlM1a09CRUFoR08v?= =?utf-8?B?L1lvWW92SXZEeVFGVWM5V25RMkRxVS9KKzdBa0NFOW9jVVJnRGl0UytOK3dG?= =?utf-8?B?UExMVjE5SHJ0S1NrdVNPeko4YjlwNnJ2RUR6bEpkMXpraDB2MEQxbkZPamlP?= =?utf-8?B?WjVXdkZOMU5YYmNOVHIwWWpTZUNDbDAvWWVRN0k3clFQcWkweDVQTlFTMzdj?= =?utf-8?B?ZWVaRjBrUTJpTGhPeFlTSFNnUHZpOEQ0OTM2RTJYYmtIRUFNMnIvbWhWWXFE?= =?utf-8?Q?EpE5BI2TGyNFg=3D?= X-Forefront-Antispam-Report: CIP:69.169.224.1;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:b224-1.smtp-out.eu-central-1.amazonses.com;PTR:b224-1.smtp-out.eu-central-1.amazonses.com;CAT:NONE;SFS:(13230040)(48200799018)(376014)(32142699015)(9140799003)(61400799027)(261021121427099003)(260925021311599003)(260925022911599003)(260925021911599003)(4143699003)(5063699009)(261009223027099003)(261028144727099003)(56012099006)(261022105027099003)(261026121527099003)(261022075727099003)(261022113327099003)(261026140227099003)(10067099003)(55112099003)(18092099006)(22082099003)(18002099003)(16102099003)(5113699003)(4113699003)(3023799007)(13003099007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YJVvCsQKTqH67VIAc2hD2uIoFbzmrXMiW05GzMIGRJ83VCwCvY5TM1dcnJjvpoWcHF9GOd+uRw8MZt8/2oOszmIRc37Iodaxf2dlnD6kQEE2y5N9N11vA9XXFjbEs/GbahNMW1mOuEaHyfuKHYYFPIKcO+vkXM9YHhGhKabvlIvlS//o+DChVljcVnwrRgZPE3SNEu5iPUXMJB0YxDGCL9xg8CIeaqSAsSZShhFcxqwWG9KxlIFQd9Lvke/oDsvN8KohnTM+qjXa+JkdmYs6K84rc5tdANaWES0fxcSA21iaZPUYp/sUnYRPWQmurr5brlQB+r6NfKh6cpdPevkRx6yvuKVoyoFLoFJ71NaxR3jxkc0W/ETZUXOWgZoZemur1FZO31oMFRSDdtCGT3r9YancA7K8QrRNtFH490XOTSPzOHPF0HhtP+mPeED8uk42 X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-Auto-Response-Suppress: DR, OOF, AutoReply X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2026 10:42:43.2638 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3515086a-bba2-441d-ef30-08df38ce067e X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: MI3PEPF0000855E.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8673 Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Low] migration: cpr-exec URI check also rejects incoming socket/fd/rdma = URIs, undocumented -- commit 77db773c747012b4f8980124448a08cb0f5cd2ed Author: Andrey Drobyshev migration/cpr-exec: require a file or exec migration URI This commit makes migration_channels_and_transport_compatible() refuse cpr-exec mode unless the migration URI is a file or exec type. It also updates CPR.rst to say that other URI types are refused. > diff --git a/docs/devel/migration/CPR.rst b/docs/devel/migration/CPR.rst > --- a/docs/devel/migration/CPR.rst > +++ b/docs/devel/migration/CPR.rst [ ... ] > @@ -365,10 +365,10 @@ The VM must be started with the ``-machine aux-ram-= share=3Don`` option. > Outgoing: > * Set the migration mode parameter to ``cpr-exec``. > * Set the ``cpr-exec-command`` parameter. > - * Issue the ``migrate`` command. It is recommended that the URI be > - a ``file`` type, but one can use other types such as ``exec``, > - provided the command captures all the data from the outgoing side, > - and provides all the data to the incoming side. > + * Issue the ``migrate`` command. The URI must be a ``file`` type, > + or an ``exec`` type, provided the command captures all the data > + from the outgoing side, and provides all the data to the incoming > + side. Other types are refused. > =20 > Incoming: > * You do not need to explicitly start new QEMU. It is started as [Severity: Low] The restriction is documented only under Outgoing, but the check is also applied on the incoming side. Should the Incoming section mention it as well? > diff --git a/migration/migration.c b/migration/migration.c > --- a/migration/migration.c > +++ b/migration/migration.c [ ... ] > @@ -258,6 +258,14 @@ migration_channels_and_transport_compatible(Migratio= nAddress *addr, > return false; > } > =20 > + if (migrate_mode() =3D=3D MIG_MODE_CPR_EXEC && > + addr->transport !=3D MIGRATION_ADDRESS_TYPE_FILE && > + addr->transport !=3D MIGRATION_ADDRESS_TYPE_EXEC) { > + error_setg(errp, > + "cpr-exec mode requires a file or exec migration URI"= ); > + return false; > + } > + > return true; > } [Severity: Low] Is it intended that this check also applies to incoming migration? The commit message, the CPR.rst text and the error string describe only the outgoing side. migration_channels_and_transport_compatible() is shared with the incoming path: qemu_start_incoming_migration() migration_transport_compatible() migration_channels_and_transport_compatible() qmp_migrate_incoming() reaches the same helper. migrate_mode() returns cpr_get_incoming_mode() first, so in the exec'd QEMU, after cpr_state_load() has set the incoming mode, it returns cpr-exec: MigMode migrate_mode(void) { MigMode mode =3D cpr_get_incoming_mode(); if (mode =3D=3D MIG_MODE_NONE) { mode =3D migrate_get_current()->parameters.mode; } ... } When the mode is cpr-exec, any incoming URI that is not file or exec is now refused. That includes tcp, unix, vsock, rdma and fd:. An fd: URI always parses as MIGRATION_ADDRESS_TYPE_SOCKET, even when the descriptor refers to a regular file. A plain destination with the mode parameter set to cpr-exec is affected as well. Could the commit message and documentation describe the incoming-side behavior? Alternatively, should the check be limited to the outgoing path? --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/20261102-vfio= _v1-v6-0-9bc7cabc850d@virtuozzo.com?part=3D4