From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <010701a1a1ba7515-7ce3a177-e1e6-496f-91f8-ee8c12fa253f-000000@eu-central-1.amazonses.com> Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11021115.outbound.protection.outlook.com [52.101.70.115]) by lore.virtuozzo.com (Postfix) with ESMTPS id 98B998017D for ; Tue, 3 Nov 2026 14:05:16 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=zUFROxiQ0TDSJrqdh8j9zq0zNaN/BcFqwsPVRQXLiQWRqqaFQtjz25SMPYT/4gVdMHGJTLiq04fG39ywpk/6/4cRr7K4Iw397ryW3o+SIL0cKOioxx0m9RnYRzoz2mg9cMSotS9TxpXZGsKnamBw5+vQyobVf8wGfAh8jHbwZZYiRbsSxPte1f/Ph6sqrVTBkKzfG1mEzwABbBRsVFFJZ0JHzANUkb4lpxUV/PgsOmNbDw4M0Qwf++O2D/HZudcU9NSWKX5V24yEXn5bQASqurkJDq7Mn358p/eDvH1ILz3bLn6o2PKutn8qeOKq1xyH1fo6daX2Fcc014uZYTQ6pw== 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=2bjoj0t9ZESo8LdA4DQwBJNaA4OloYN2GY9fTV3VP7E=; b=ojix7QY9bO0ywuoDGeO0naAuZPkNh53BRxgAdtsHhfffPgLLLz9DcPxbRc5qtkDXdnMjQb6AkyDJprzIN4DaU0sVw4gOqbs514RLLieaChkEZRDLYOapMRFgPyQh/5lg7/T78ydoHlkhSy2iQdILVHAXC6U4ewQlbgwd7Ij36s6cOE0v0D3BpVZHAotvuQpgUGBeDTbGlyPaw+1gk3Vds8EkJ0x/zaGiGx4NytcNa7GmFQKNCfZ9vzvuYHvd325a8hzp42dSRqWNjXTQZtzRgb+vfRXhYsN6wZExJG0DUpG0e2sYgZW/sr73VeOzL57/I3hlc+kIF8TpQq9jGitBDg== 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=2bjoj0t9ZESo8LdA4DQwBJNaA4OloYN2GY9fTV3VP7E=; b=jRHnbCwI0HF+iDvCZ75oD/jWG1YyxcqNgYYbAHHhiQeAleJ5XhKDmf/1eT92YCCB8XKLGSvYZRaFm7SXk8n8bkI+Jqdnv+75WFubYiaCaVtmeBHYZjy/tfLKAz9kE02qpQrguVwiXEAqZhXAupILctptcfh+sc4SuAbjtcwCDxY= Received: from AS4P192CA0040.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:658::16) by PAWPR08MB11300.eurprd08.prod.outlook.com (2603:10a6:102:511::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.592.8; Tue, 3 Nov 2026 14:05:14 +0000 Received: from CPH1EPF0000052E.eurprd05.prod.outlook.com (2603:10a6:20b:658:cafe::76) by AS4P192CA0040.outlook.office365.com (2603:10a6:20b:658::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.569.9 via Frontend Transport; Tue, 3 Nov 2026 14:05:14 +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 CPH1EPF0000052E.mail.protection.outlook.com (10.167.241.169) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.592.5 via Frontend Transport; Tue, 3 Nov 2026 14:05:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1793714714; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=mb8WGdhz/HG9TqV2PmKZt8PlhGwZbFh4NK10ei7bwCc=; b=DnUdHjw9EPTXa2511Ipviacl46H1HqMNH2CG+/9iXHylJlALWTOSYhKz6RwgIE5p qfGYXSM+JR3Zy2PrnnsA5XJv98mfnWLl35z4mxCPlM4vDJco2HDtqsYchubSvn1HvMb 8h6JxDgTyHKhpTHSf5eLEnX78C3fSVPTsRcIy509vtkGuI1cqHTKzIdz/CeAfFG9Gfd PMxApTj/ef7QYmdUwk/tPCM8Yhi3rGmCbOqNddpIRgcoUbyauCu6svPQw4zHFIRTtIj UoG12YfeXZuti5AQzeM3PvJRwc8C7V23Gum4bPUMSM3V+BJY4q/UsDnCTPcFW1yS4w1 PO1HRuelvQ== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=qftdzk2dqsatjnlrq4r5brjbihpfcrsh; d=amazonses.com; t=1793714714; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Feedback-ID; bh=mb8WGdhz/HG9TqV2PmKZt8PlhGwZbFh4NK10ei7bwCc=; b=JwiOV0zAe8+Mk1yIqemqdPfU+9iQPyr8kPwyseJjiIgT6IjaMrNMlYdRD2WLBnpq GSrH82WflicdvYF4TlgrjCeLqEb/X5niK3NQpUI4fUfAq+8FbH8UE8YqRSiRcOwiDwg /glt6Q9ja6JMtMjvFqJ2JLuN8fKU5gl6Xglq77Tc= Message-ID: <010701a1a1ba7515-7ce3a177-e1e6-496f-91f8-ee8c12fa253f-000000@eu-central-1.amazonses.com> From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH QEMU HCI-8.1 v7 08/35] migration: don't refuse a blocker over a migration of another mode To: Andrey Drobyshev , svt-core@virtuozzo.com Cc: andrey.drobyshev@virtuozzo.com In-Reply-To: <20261103-vfio_v1-v7-8-4467fdccbbe6@virtuozzo.com> References: <20261103-vfio_v1-v7-0-4467fdccbbe6@virtuozzo.com> <20261103-vfio_v1-v7-8-4467fdccbbe6@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 3 Nov 2026 14:05:13 +0000 Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.11.03-69.169.224.1 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CPH1EPF0000052E:EE_|PAWPR08MB11300:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 45cfb49c-d1a5-4c53-ccfd-08df39b37b87 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|32142699015|48200799018|376014|61400799027|9140799003|5113699003|4113699003|6133799003|10067099003|22082099003|18002099003|16102099003|55112099003|3023799007|56012099006|5063699009|4143699003|261021121427099003|261102123227099003|261022105027099003|261028144727099003|261026140227099003|261026121527099003|261009223027099003; X-Microsoft-Antispam-Message-Info: GGwE/ZByoJjai4HHBsapyEKv2yYABr5a3bKCHjuMsKaqX+jnabrGZY4HLPnIwLxPiJorWBzDfeCS6jCumPnNWjiOE8sCfemVmQ6CiiLFSIVGISE7gK7sICqzg8Bq7EeJGVmMvVy5nVJh884j92xR7GV9qNHnZ4MRX6YbtCQvjAW/d6j8Qu+xOGCHtXCJDOqg1uV90I10pUzJRdbGTYMZ3ggciwsKjHT4pIDJl0PFcgQNJN6A1f1CljxRiFMyFWK5JmP34UNqlDEjDjjEcEmYBrnLwwc/VETIgnfMBfYbF9qbDKKV0jEpx6+DM02Wg5Q+s9+y/nkYL/mIBoMKSfPM00Z2lPH/LloKZ2hpzZ2rKMoi3lf3xaASD/20+HOKF2HJC8jLI6TmFleWR4q5ZdWK2iWg0o63j878PJfmWKNkWN/DIibCfFY0iUZy5udpamaf2XIHxW/ty5QZU77hVS2LHT5klARz/zymcv41T+rkQU+8JXVia08wSVHtFdsGNbY95EtkKc97FrRIY2WTiZVbBCcSV0+zeoNWwcFt4i1NMYQO9lt7vmv2KIC8+vGNESCOm8gJQcSWMU/WKztivKSjYssBEq+yE6IGDawdIgwM8sUKtdELgbQoOIMOAmDDUffiaQEnALRSAuD+7zJfRanwhyBLL48gYZmj9Q57C7iHbu9AGOfBBBADM4vyJ7WOFCKsbZHs/y2qyzw3UawwfhhrtYDhsgCttlzbWxCiHGUiKOkiZPhj9LELv5Y4/jFD5tiv7RwG0zyceHFq7dUe+hPHrKRzfvvdGQmisoSqQ7Pfys1u3Vo75j2RSyhDGEmHMT3TbzKq94jaPpwsbQMbfTWpF4hhIOFL4P+ISRlBC2zW+AgbpOqzloNaTC2moInMng85wlK3AY4VyqeqY14VxxVn+YC0T+1kcHRxRUJn2PmWjrrUHKvj8nQaxf72Jdylg32H 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)(704161411799003)(32142699015)(48200799018)(376014)(61400799027)(9140799003)(5113699003)(4113699003)(6133799003)(10067099003)(22082099003)(18002099003)(16102099003)(55112099003)(3023799007)(56012099006)(5063699009)(4143699003)(261021121427099003)(261102123227099003)(261022105027099003)(261028144727099003)(261026140227099003)(261026121527099003)(261009223027099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UN72T0TuTxHIzFFa1K6mFIVSPxBYYQqGUGC0GXNoFFJeqs4cEBoBlfCmL0GQw3YrRa/LZ/arc2L2dEavmoL/jpH/sBMrwbLVCrmoTz8E6rSMtVKlSPxddzehr54BfsennYsS2DFtLelgVLqnZYnQ9zayd46XeIUgKJ4A94NC6hfBn03GdxwVCu1PqWAB272XH1Q/5d9g8xl4LKqgO72ZOGv/jGENv3MsXfJ/fwoVZkWORDfyM7IQ+Jw3rry6J3HPMao07ho4RbPekI4sdLvpZkXY6ZW7GWtgdVwGGWes10mRC29TJ2Y6YVlYu08ZxThw0ti3fVhISb0F282S5342W6ITuOZRr9ghtChTaQnCxtES3KhYXVzGaUD1D3GOADeGVEDn/i304O2gI7jfE5Jpqo+cLUKicYZb7Rmr4yCLbCfJGsDnO6O0NEw0MPAaw+bn X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2026 14:05:14.3307 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45cfb49c-d1a5-4c53-ccfd-08df39b37b87 X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: CPH1EPF0000052E.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB11300 Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Low] migration: is_busy() keys off the runtime-mutable migrate_mode() pa= rameter -- commit 0bf28cc9f7ab6b39aca902a416aa850e785856d5 Author: Andrey Drobyshev migration: don't refuse a blocker over a migration of another mode This patch changes is_busy() so that a running migration only causes a migration blocker to be refused when the blocker covers the mode of that migration. Snapshots (RUN_STATE_SAVE_VM) are still checked as before. > diff --git a/migration/migration.c b/migration/migration.c > index 7c2fd704890e..d5a21da3129a 100644 > --- a/migration/migration.c > +++ b/migration/migration.c [ ... ] > -static bool is_busy(Error **reasonp, Error **errp) > +static bool is_busy(Error **reasonp, Error **errp, int modes) > { > ERRP_GUARD(); > =20 > - /* Snapshots are similar to migrations, so check RUN_STATE_SAVE_VM t= oo. */ > - if (runstate_check(RUN_STATE_SAVE_VM) || migration_is_running()) { > + /* > + * Snapshots are similar to migrations, so check RUN_STATE_SAVE_VM t= oo. > + * A running migration only matters if the blocker applies to its mo= de. > + */ > + if (runstate_check(RUN_STATE_SAVE_VM) || > + (migration_is_running() && (modes & BIT(migrate_mode())))) { [Severity: Low] Can this check be fooled by a mode change while a migration is running? is_busy() now takes the mode from migrate_mode(), which returns migrate_get_current()->parameters.mode unless cpr_get_incoming_mode() is set. That is the current user-settable parameter. It is not necessarily the mode the running migration was started with. migrate_params_apply() in migration/options.c copies the mode whenever has_mode is set: if (params->has_mode) { s->parameters.mode =3D params->mode; } Unlike the capabilities path, this has no migration_is_running() guard. Suppose a migration of mode X is running and migrate-set-parameters then changes the mode to Y. A caller of migrate_add_blocker_modes() whose modes mask contains X but not Y gets (modes & BIT(Y)) =3D=3D 0. is_busy() then re= turns false, and add_blockers() installs the blocker even though a migration of mode X is in flight. Before this patch, any running migration caused -EBUSY. Should the check use a mode recorded when the migration was started, rather than the mutable parameter? > error_propagate_prepend(errp, *reasonp, > "disallowing migration blocker " > "(migration/snapshot in progress) for: "= ); [ ... ] --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/20261103-vfio= _v1-v7-0-4467fdccbbe6@virtuozzo.com?part=3D8