From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazon11023092.outbound.protection.outlook.com [52.101.72.92]) by lore.virtuozzo.com (Postfix) with ESMTPS id 3372D8017D for ; Tue, 13 Oct 2026 15:41:22 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YOLq3Kwbqzv8XyFa6LENh+4RIE6J1saGm4Iwe8rn5BGHVxPB9NmmsTawMhl5ooeMxXmlczpcocCWqXTLjV+DlZrtYiAY5LBuazNQ+zWHIynq9rEDLMV4M2vJ4lOp3Ha8dmLWGL+5MRfpvYx0bvl1faMln4s0l7LsmUR4pcxEPTMWqLib8oKVDA2hCkxW7KMHIK3dg8dfU1zgunJ5/PoldMY7MY2no2pNb+6P0BGLow9MwLp7rKmOaBDCrUq/0g4DhN7G9xgsoToV1erKM2ORP+cbltJqjFKCqlgiaHX9F+o5F9OmKNf+2wAi2qJb5FybwQGwoBQksr/NZQIhNEmqsg== 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=/AZ25obvYLGuyCu1yXqY+TlYvs+a0skLdSci69/f5H0=; b=q7HFQ0mqOX5cNXR92GMg5mXWqfC9p1MFVXHQDqD58i2F/u+FfsCCclE16QCtKCtsQPb/ZsugmfJucH6DkZP3/unN66rqTd/6Ue8zDXclbo+7gk0T98Z+lo5H/pWDwZIqXAnzVUpWUIMKkhJbpNTPBOtLZWekybSqplaLeag8BpsuEc/L50JPcWFm0AGtNctGlJciZflWaLDbZATiSfWzpqMctTVqYT2gThREDghfeeTXeiYMlA1GjY14starIO9UHAmOUnwby3OjjAnHnvgS4zwcRaZI5CExJdMHAbzjRjjB5WpS6PCRHlGrLhiehXd9+WXMdOfFjlr4dabdxmR++g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 69.169.224.5) 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=/AZ25obvYLGuyCu1yXqY+TlYvs+a0skLdSci69/f5H0=; b=MN2n4EavzoeQl8steomGA9kq5UYII/IqgHdIyL8krORf3ob97M4oHTwm0Sm168JD5+SsE5smHg0vcbWjwTKphknNaFT+IVtVAXMlXPR6x5KnU50TFpLloSPBLQM7WkV8hGrdz1dyyT7fC1tTbbi8QHEI5MKfcsrFn4o+vySE8EI= Received: from DB8PR06CA0045.eurprd06.prod.outlook.com (2603:10a6:10:120::19) by GV4PR08MB870280.eurprd08.prod.outlook.com (2603:10a6:150:403::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.522.10; Tue, 13 Oct 2026 15:41:16 +0000 Received: from DU2PEPF00028D07.eurprd03.prod.outlook.com (2603:10a6:10:120:cafe::72) by DB8PR06CA0045.outlook.office365.com (2603:10a6:10:120::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.496.5 via Frontend Transport; Tue, 13 Oct 2026 15:41:16 +0000 Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 69.169.224.5) 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.5 as permitted sender) receiver=protection.outlook.com; client-ip=69.169.224.5; helo=b224-5.smtp-out.eu-central-1.amazonses.com; pr=C Received: from b224-5.smtp-out.eu-central-1.amazonses.com (69.169.224.5) by DU2PEPF00028D07.mail.protection.outlook.com (10.167.242.167) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.522.6 via Frontend Transport; Tue, 13 Oct 2026 15:41:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1791906076; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=cjQ3t2joSFySbBBNFu6/XSRp7GfRoOTUQ5yKK/jtxWs=; b=iydbhqIt6c1Vihfch4RwRKN4HKYj9W5ccHN+W5Z+EmQnFSRg8StGHJSTFz/mMQh5 KkdP0rqCE+m/f0WHfeXfyPlpdlkwek6dIz/7FVPRwm+UUUCzBOh2jbBsRPLtStMtxPx Be87YnyIKvtOXPpjNvG8XL1oU8hgoOhJJZkpwWbOlDky8GSSDdMqrX/yj2KeTT13qRu MixltSE5J/yvC3sNoQznddaIgWXvWogiGfcZzdxWFXXQknxyDk3wrORlNAi0QN2A7i3 g8kyZP/ueAWBoH/VXyu9r9kNPJjj2m7WMgTNhQr9ghQpCmLLwP7OQgGztLluRuimzV+ OL2oqfJReA== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=qftdzk2dqsatjnlrq4r5brjbihpfcrsh; d=amazonses.com; t=1791906076; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Feedback-ID; bh=cjQ3t2joSFySbBBNFu6/XSRp7GfRoOTUQ5yKK/jtxWs=; b=DNCKdkZOzAO1Xw27RQ4y3SyYumWbcfHell26W241mfyz2BwAx7rqg79+ybOfB1TN WyLmPOqg6lsn3Ebt1OXSOeyKEWcie273ebSm/0e5XUKvAjIrVZzHeYsPKCzwXi3yP0m WQERs2pw2zm6N5ve8E/QO4HKOunaCalwXjP94mH0= Message-ID: <010701a135ecd4aa-4782be4f-46b7-4202-b7b4-a30b7e5aab87-000000@eu-central-1.amazonses.com> From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH QEMU HCI-8.1 v2 11/24] migration: yank: Move register instance earlier To: svt-core@virtuozzo.com, Andrey Drobyshev Cc: andrey.drobyshev@virtuozzo.com In-Reply-To: <20261013-vfio_v1-v2-11-433455c0a294@virtuozzo.com> References: <20261013-vfio_v1-v2-0-433455c0a294@virtuozzo.com> <20261013-vfio_v1-v2-11-433455c0a294@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 13 Oct 2026 15:41:15 +0000 Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.10.13-69.169.224.5 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D07:EE_|GV4PR08MB870280:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 2498bd1b-e638-4438-2574-08df29406b4a 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|704162111799003|704161411799003|48200799018|376014|32142699015|61400799027|9140799003|5113699003|55112099003|4113699003|22082099003|18002099003|16102099003|10067099003|4143699003|5023799004|261009223027099003|56012099006|5063699009; X-Microsoft-Antispam-Message-Info: 82SeG7ac6nFwLH/aEwU+q941hrZwuukFIUCy1Qr3OLv5EmxlDSs7d+wZwC/MBcjjtkEgZdquikJnMEQs8qptxuma4HND0AKyZxOlBGqet2Kr9zcwEF6snTkWug99XjJaLnleAI2Idm6RPGGCoJnNNJRgmHO/9uKLIE7FkMfeJh12XPmyZj+djJCHx+yq5//gdSs3SqpMS+imSZ//OYmIS3ETEaCoorZY13q1eW4rnEiY1/pR+Ne1J6HbdP9cqIGaV+W3EBzNNXYnDtY0vGWdk9zvbmBcgV5iZSV9PNQy+fzg3WhvwxQcBdzea6UluZU6ge6W8cJZ+UwK/beuIdNynQ0+3eOJVWeIYB9McfEY/BAs4yu9/KHm4ah4obC0JdhatUkqzy2nU2FumoN16JRLHFYqIYixVSF/j5M8UqpqTE3RFsJkpkUmJ97wDKrEgxsDd5ZCWORAsG4vOYMtAemlz78EU8L7eHhKmICVc4hl0wVkaMqmt4vEXExyvYXEopLx5SF+KR87QzmnvxP2Wk7VXZHDv6fKgb29fGVfCYLkw8bxzWW7YseU2gtZhAdyHrPCQWkWQWzNMtXyovbkfUoL8233N0YQGiPSgKWhc6xea4TzBR5jncwXPgvqls7i8z/hzcmnKG8hrqdVcJElGcY7edX5ckZNgZGW1XRAQAOxfo6Lll7I6I1b3+RCIhwnaYmdXhTi1wNMYPVAXpuna7ZRV/P3ShttaPd0A+DL61QirAvWZ/NfMwEEpRt8qB3n/mtlfoc6r4Z8ZQmfG8Ka500WIjwndnpFoup4AfR0NQx+TslHjvWJBY3dG3rAe6qcHB5TCYGlS9Z6I47eO8+vB73nNzKNvqJHZdYYrgRhkZnmyTFo6JQtVH14aoxebRbqN2dv X-Forefront-Antispam-Report: CIP:69.169.224.5;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:b224-5.smtp-out.eu-central-1.amazonses.com;PTR:b224-5.smtp-out.eu-central-1.amazonses.com;CAT:NONE;SFS:(13230040)(704162111799003)(704161411799003)(48200799018)(376014)(32142699015)(61400799027)(9140799003)(5113699003)(55112099003)(4113699003)(22082099003)(18002099003)(16102099003)(10067099003)(4143699003)(5023799004)(261009223027099003)(56012099006)(5063699009);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ev0U28eCw9tRh4D7tbb9+EaM7u++XSjEkLFVvo3dhgE8jC7rGwx7UmPmrkJa236s1M454dsIGnjXDa/QJUH79CSvHzc8E/2XJeTkQKVc/Be40P8xv8CzolhOay9jtH8erGGNdmrHyl5rfATZPFRZlG5qQ2VtUQCfA5ZhsA2Ougdn7wivA/31eBqWhlx4GRIVW7D5bIza7l8LPGCD2Wqp9CS3PW+vzsXstFpAUPhqDTNGisfO/pAgOdO6Hv0WjE+tLirqq+5Y77TVq+zn80IsoNKKvwWhLpvRuKN9pdu1uRbM/wn5vkynwTBD1Ekjstes7oI2WtUe6ukNBeMT9v73SIxC27KgdxwonbVIuTa12P69cfBzcqSs3XMOLsR8SGOVKWibrYW3uW0fYbJM5enpUAHwzYhNW0tIEDiQLIG4zfqHqR+e4YBC7CWDPBH4poGT X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-Auto-Response-Suppress: DR, OOF, AutoReply X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2026 15:41:16.3678 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2498bd1b-e638-4438-2574-08df29406b4a X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D07.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV4PR08MB870280 Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Medium] migration: yank: migrate_prepare() aborts QEMU on duplicate yank= instance -- commit d6ce8a94f0289aba78580f9f74c0003c88eebd49 Author: Fabiano Rosas migration: yank: Move register instance earlier This patch moves yank_register_instance() from qmp_migrate_finish() into migrate_prepare(), so that it pairs with the unregister in migration_cleanup(). The resume case is now detected from the migration state instead of a resume_requested argument. Link: https://lore.kernel.org/qemu-devel/20260123141656.6765-11-farosas@sus= e.de > diff --git a/migration/migration.c b/migration/migration.c > index 2f8ef20c0369..fb83e8bc695d 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -2235,11 +2235,12 @@ static bool migrate_prepare(MigrationState *s, bo= ol resume, Error **errp) > return false; > } > =20 > + yank_register_instance(MIGRATION_YANK_INSTANCE, &error_abort); > + > return true; > } [Severity: Medium] Can this abort QEMU when a yank instance is already registered? Before this patch, a duplicate registration was reported through errp from qmp_migrate_finish() as "duplicate yank instance". Now migrate_prepare() passes &error_abort, so the duplicate check in yank_register_instance() ends in abort(): util/yank.c:yank_register_instance() { if (yank_find_entry(instance)) { error_setg(errp, "duplicate yank instance"); return false; } } The incoming side registers the same global MIGRATION_YANK_INSTANCE in qmp_migrate_incoming(), and it keeps it until migration_incoming_state_destroy(): migration/migration.c:migration_incoming_state_destroy() { ... cpr_set_incoming_mode(MIG_MODE_NONE); yank_unregister_instance(MIGRATION_YANK_INSTANCE); } For postcopy, that destroy happens at the end of postcopy from the listen thread. If the incoming side is in POSTCOPY_PAUSED, it can wait indefinitely. By then the guest is running, so the runstate is no longer RUN_STATE_INMIGRATE. The guards earlier in migrate_prepare() are migration_is_running(), which only looks at the outgoing current_migration, RUN_STATE_INMIGRATE, and RUN_STATE_POSTMIGRATE. None of them looks at incoming state. A QMP migrate issued in that window would pass all of them, run migrate_init(), and then hit yank_register_instance() with &error_abort. This needs a nested or chained migration setup and a privileged QMP command, so it should be rare. The upstream commit 7e714392437c has the same &error_abort. I did not find a guard against the overlap, and nothing later in this series adds one. The final series state still has &error_abort in migrate_prepare(), while qmp_migrate_incoming() and load_snapshot() still pass errp. Could the registration here report the failure through errp instead, with migrate_prepare() returning false? Alternatively, could the incoming state be checked before registering? The commit message also does not mention that a duplicate registration changes from a recoverable error into an abort. [ ... ] --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/20261013-vfio= _v1-v2-0-433455c0a294@virtuozzo.com?part=3D11