From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazon11023077.outbound.protection.outlook.com [52.101.72.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 0D6E780F25 for ; Fri, 30 Oct 2026 14:53:07 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Y1r7HobNCnU3higm6Y/07AkBOTU8MPthofBBVhMu+7drmqxtrXtgmaQJCHx5Rx48P7ioqKB+ghYUx9VpsXWAMUVvAKMIT0oRut5s75K9+q712VeYXrMd3ZnMrBWoJJ1qXJbZwTTV4n6Pun0qBSvgOvHTDNwgi4vxb3I/zU7JNjSKpmcbtfy4WRY7UdVpOltxt0hYYEbgLFkCGH6HdcfGehr+TRs5pCJE9YQXcYcxq+T+SqKyZt3dsiN7Iug1WeBQwqJfUMjmP2uwdJcaaLmQpslJG1GTh+PQVHxDTFmG5L5y7baKRuU9BVNqzXWJHnsUquWwuZBqe+RYGIVksqYG8A== 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=8X84mtcnNaWKxCNbKauqjF4/FRewCejF06T1aJwVRvA=; b=Q3obBXiNn5ALLv3kq/SJrUQWdRgUIjCenG2BU7yTZTaPRRuDCCZMj49eFLF/ke8zGwjAClJeUR0c3ZpOZxhC+FWnFKb+55fziFX30iTIc9YsPX20w5IWakh7I45EBIWTofu5eLiPuP9ceuESNBg1Bu4YkBhwezt5Dl8WqeLe5/WA+khP5KKwaI3Udph34eEFXcEw3kyBhmPuyGTqZrs71bezAiv5ZjOdr7s2wqJbh/eXWCrvo9z8JLsxBCmurX+dZeaFjc2e34UhZHYy3tNxyzMIQ2iUGcARqo0sjOv/ajbOZgqnAew/jnlGbVy+wPlfF324AkqTQb5pRMM6gFpdsg== 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=8X84mtcnNaWKxCNbKauqjF4/FRewCejF06T1aJwVRvA=; b=YNQhHyzDQ99ac2/+dLQHWayJpJ1BfSe6VGVZe8lLQi1zyokcCAcEtqeSvdv9CrrEs6ogYEmCCNfvBZ/wPLrlmpNwCgPO/nEd4I74r+OSY5RDN9uSHVkxVTin/WgXALwPmq1yKtWT3BOa4zrLJoZ9YeMsjTckxOvzk43r9N+wxvk= Received: from DUZPR01CA0250.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b5::6) by VI0PR08MB11625.eurprd08.prod.outlook.com (2603:10a6:800:30b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.569.9; Fri, 30 Oct 2026 14:53:01 +0000 Received: from DB1PEPF000509FD.eurprd03.prod.outlook.com (2603:10a6:10:4b5:cafe::6c) by DUZPR01CA0250.outlook.office365.com (2603:10a6:10:4b5::6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.546.22 via Frontend Transport; Fri, 30 Oct 2026 14:53:01 +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 DB1PEPF000509FD.mail.protection.outlook.com (10.167.242.39) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.546.15 via Frontend Transport; Fri, 30 Oct 2026 14:53:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1793371981; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=StjfGLB9H9mCUAjDfx49EMHy5chBwE4pFbZ3WUi3rVA=; b=k+R3MX/Kd9Iy44UJP3PAhVoK9jaqfIRjuvc2/G1ceeQ1AB67l4ZIvIEQ6rLA+hs2 ZqqACEy+AkqEyy1t8YBkbG2ogkJ9e7dhSr2amSdSYvYTwbwD6lpkaWlc3+8YMRflX2c 9viROiBHbvNjgYAVAr8A+5qA/yCvOix0WNXu75vIi3qEmIIb3NA7LUnicJn0F//ge4M YMSoCW6T0Q8k2jU8OAN8Fi73zwyEa3icgbdz0Nw2g6Juz4qyV4PYMsyeRt7db3vcD+t dbYhn6GIHoXeoEGItYCrjXaPpSw2H4ZA2U7xe1/I6IZEhUTVS5SaOxGVO7eHV43Ar3C cOFP3tC9rg== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=qftdzk2dqsatjnlrq4r5brjbihpfcrsh; d=amazonses.com; t=1793371981; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Feedback-ID; bh=StjfGLB9H9mCUAjDfx49EMHy5chBwE4pFbZ3WUi3rVA=; b=G2nB4At2ApC/kjV5Npcj6ir/TpwbRTAlhmaed3gGFo9ZbXUzd9AtOfXRfcBpsREc 8aFSJEJJp80BipxHiM+rcokNZ5rX9iVUnlsDp7dQz1nYbeRQG5lMPM02+ibPhkHqQPB Sc2VpyEagiK2SlcqIS8m3MKjTc7yf4+i/QL5Q5MI= Message-ID: <010701a18d4cc4fb-fb0e3d6a-96a6-43f8-9cf1-db2c27744619-000000@eu-central-1.amazonses.com> From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH QEMU HCI-8.1 v6 07/34] 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: <20261030-vfio_v1-v6-7-45de246bc92e@virtuozzo.com> References: <20261030-vfio_v1-v6-0-45de246bc92e@virtuozzo.com> <20261030-vfio_v1-v6-7-45de246bc92e@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 30 Oct 2026 14:53:01 +0000 Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.10.30-69.169.224.2 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF000509FD:EE_|VI0PR08MB11625:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: b1a45f2e-83b7-4e1c-b194-08df36957edf 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|376014|61400799027|9140799003|32142699015|48200799018|6133799003|5113699003|4113699003|18002099003|16102099003|22082099003|55112099003|3023799007|13003099007|5023799004|56012099006|5063699009|4143699003|261022105027099003|261021121427099003|10067099003|261009223027099003|261026140227099003|261028144727099003|261026121527099003; X-Microsoft-Antispam-Message-Info: JkfmQblrI/CI1wM/DulDGSsFXbgEo3zcYuhb41I8AcxQbpA/PS4ChznkG5iR7tO3heneD1hhPRxfkt2QMDNAMRTa80jfavFfgOE2NVjFfFbHkKsEV6wC5k8groI5UtXG2OvynpyRGynH4eU6IWV381z5ivsYjO2j2T07zJMzgtdN7r67e0EiuldFbMFvYvyNJeHiC2oppc82mIYWiKHdsbw7F2+7VcGTfLY2V2rhEBSr0RZNObegcytft4hw8fvUTR7QuuV6gNrnp/ZwmGmvMBTaPG4JptmUfTJOPnffDObhomQXHqkeSQog49UYj7lMMqD7cJWti00R+avBG3wRcl5Nct4x3Nsb07rLqZgGzOprHca8WSIu+D1Ck0PoiQYrX9IFQyqN7qw1NoEhDjfVaS00WWoGIhu0x4aU43MvZNLZZw+Twg/bp9b1aJW0rG7WD0I86i8aK0MzRSMwCgR8ZiQMuZMRNTmcBPRMEVzS/2CtLnaOkzG0zxUNNn9vY6B2CrvSwAuC5I3Wo79avLmahiFRk5z3Y9kL8M7UXK7rgw2/MtflRI1WROsOS2/l0SXm8hXuIQngBQM9SJz9NV9naamR5AVAFPyJ3t4dpyLqPqTfGm7Wdr7pKt5+WMTsF/T6ak7gN/VlQR+kvKCSrxcG3oAOspBgznDYsqHjR8XerFa+hmXG2fyqypXivsoSgA+rCjB4pygvLpyG637fc4TCLFv8GmdcZURhfB0jk4sA6ZjADBuO2rLptuuJsYiS0MpiUxJgsYGfq/RyiFrjHsqAxH2Ai15apeFgRZjOawd6PzaCUyXLbS9j7k7h6wh69S4tt3n3Zcr8P7pagI6PC/LRRYTivPFgoRPTWPx0IT/4imUt+N3qsSezitSkOuRRE+Ei 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)(376014)(61400799027)(9140799003)(32142699015)(48200799018)(6133799003)(5113699003)(4113699003)(18002099003)(16102099003)(22082099003)(55112099003)(3023799007)(13003099007)(5023799004)(56012099006)(5063699009)(4143699003)(261022105027099003)(261021121427099003)(10067099003)(261009223027099003)(261026140227099003)(261028144727099003)(261026121527099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2LYimraMx7VhSmMYyP2KH+p22mgsrVgX+k11h1ZbOkI/cUfxXl7Z/yz8k1n38gRz+f9K30dc7WXZZH1I+d72UnlCg85Hn68f5blTnKKDvuBOg7dSS4CW4ZNJ4zC8m6xE4ZphZ/Y4JVbvMCaSgiTKVZku/AsiiwywDpJJtJl7vCo4YLalx8+NfiT8+aoGwoDUYwq2gWCTi3+br/c3e6RdmQwA1E+bGlI54MAHPSFYiGminhfZBjEJZLxJxitfbLNHwxL0KbvpWl0ND4sCdw4p3ZDn9nJWnkt4uJ+d/L7D56E35bFrLDE+KhN6Mvn7gwPHqZXZtqtoa3Ktof5U/fKsGQI6S3LGFEw085oR+APQUux/34O7gh35Zj/w/8hkzOLcSc35EfvA8zpxHwTaeRqxDdhhxRYCNMzPLB0xdY05cd8oN69Ct6RtSiulv2umqpL+ X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-Auto-Response-Suppress: DR, OOF, AutoReply X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2026 14:53:01.5583 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b1a45f2e-83b7-4e1c-b194-08df36957edf X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF000509FD.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR08MB11625 Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Medium] migration: is_busy() infers running migration mode from mutable = 'mode' parameter -- commit ca7bc71682fcf146e1458cce3427172d31f7e39e 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 if the blocker covers the running migration's mode. Snapshots (RUN_STATE_SAVE_VM) are still checked as before. The mode of the running migration is taken from migrate_mode(). > diff --git a/migration/migration.c b/migration/migration.c > index 7c2fd704890e3..d5a21da3129a0 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: Medium] Does migrate_mode() reliably give the mode of the migration that migration_is_running() is reporting on? migrate_mode() in migration/options.c returns the incoming CPR mode if one is set, and otherwise the current value of the mode parameter: MigMode mode =3D cpr_get_incoming_mode(); if (mode =3D=3D MIG_MODE_NONE) { mode =3D migrate_get_current()->parameters.mode; } It does not return a mode recorded when the running migration started. MigrationState doesn't seem to save one in migrate_init(). The mode parameter can also change while a migration is running. qmp_migrate_set_parameters() ends up in migrate_params_apply(), which does the following with no migration_is_running() check: if (params->has_mode) { s->parameters.mode =3D params->mode; } qmp_migrate_set_capabilities() refuses to run while a migration is running, but this path doesn't. For example, suppose a normal migration is running and the user then sets mode=3Dcpr-transfer. A blocker for the normal mode only is then accepted, although the running migration is a normal one. Before this patch, every running migration refused it. The reverse also seems possible. A blocker for cpr-transfer only can be refused with -EBUSY while the running migration is a normal one. The same applies when an incoming CPR mode is set on a host that also has an outgoing migration. The series doesn't appear to change is_busy(), migrate_mode() or the mode-change path. The cpr_is_in_progress() patch has a comment saying the mode parameter alone means nothing on the source because it may just have been set. Would it make sense to record the mode in MigrationState when the migration starts, and use that in is_busy()? Alternatively, the mode parameter could be rejected while a migration is running. > [ ... ] --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/20261030-vfio= _v1-v6-0-45de246bc92e@virtuozzo.com?part=3D7