From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <010701a1213e95d6-a3365dfd-b8a7-4a6d-a7ea-770b1bce1c64-000000@eu-central-1.amazonses.com> Received: from MRWPR03CU001.outbound.protection.outlook.com (mail-francesouthazon11021131.outbound.protection.outlook.com [40.107.130.131]) by lore.virtuozzo.com (Postfix) with ESMTPS id CBCF980726 for ; Fri, 9 Oct 2026 15:18:36 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IhdsB1kJNZDxAdVg9UpJGy4St/lsGD47EfUHeVL/rRGuUeKB83hj4YxGFtwrSrQyoint2K6wczdv4WGAw0ljd21qyl3sJlgRzHgoLwPDgW1Mc0ZTUE8J3GFTkLRuj4B0WtFLC5TFVwiW6KyUBVLxieL8JOA1U2LF4y46axSTeCJqTJkRJEza6y+pkv0QpAVW4gnejaiLSQiYkZufxfiEINJ/wPNVVbYUb7PkXvkgQNnJwffr2Q5ePAKFfdbVEnPKQQfH5pxckvW0dRy7JniC4gTrmUtPJ0AKIaHRDjFOKIf+EYknFQv3YK+OXPrOtNMXHPaPpMXMw8gCtXkctkrZdQ== 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=iS6GTFmkxu0jIYxfjyVGuC5Q6n+1hnthp3T4HyuPnsk=; b=kymRD9Y3wgIrOM+wE1676ZBGFVdsUCtpX/iaaxQSt/47/VNW074ZWXxog2J4AeTcpr6eTKYJy28eRdGyhV6D2tQSA0tH7hNDgh7rPGfTXeLDMvl250nmiHnHxnN6q1CnMrE5KAIPZuvAQaf6OH7EmjczvFhg5BNa0sdj/idhnYZGXcdDvM0MuZdA8EJVi0u9Ttq/9OCw+wZVvFZICn8MnaYJrX+YoqD/CfMLJNlpF+Al2lnsIUKnfbRxSYSlVi+eTJu2tWjG/v644xdygOZnICuk95JIeUQJBX381G0VIhVlEc9fjhNkXXxryviYIVqhER5QgOzyrNor4q8BbFLZzg== 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=iS6GTFmkxu0jIYxfjyVGuC5Q6n+1hnthp3T4HyuPnsk=; b=JwUmj+KYCVHYJClBubhKTMxMYvaD9+63mVJF0CDo6KsZXQU8r4y/6lB4mMmNDomvYMOoB9xKhWOmoocdVNXYVxq3pLaQRQcsrhmO4QhMTgtNwccmK+Jx75QyvtNRBK3aS/IJvKZGnxVwn6DLtudryo1Kjp4j3Opk3mqCWQ6gPkY= Received: from AS4P250CA0004.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:5df::12) by GVUPR08MB11890.eurprd08.prod.outlook.com (2603:10a6:150:347::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.522.5; Fri, 9 Oct 2026 15:18:33 +0000 Received: from DB3PEPF0000885A.eurprd02.prod.outlook.com (2603:10a6:20b:5df:cafe::75) by AS4P250CA0004.outlook.office365.com (2603:10a6:20b:5df::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.472.20 via Frontend Transport; Fri, 9 Oct 2026 15:18:32 +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 DB3PEPF0000885A.mail.protection.outlook.com (10.167.242.5) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.522.6 via Frontend Transport; Fri, 9 Oct 2026 15:18:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1791559112; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=LxZBKjOVHIjrHKlIdcOW7NTluhzU5wBV9sRQSWxcsNY=; b=tIyfLalKBu9PdPeVn/JEIpb75Muu213Dr2GZ3w3idX0uAsb+C28NtCn5Dm/k9h9k 3g1FiWpPsXDgMwWVHMdYFNBN6sgk5ypysR54jvgCq6P9P/3F+b6MihYKfjmkncd0WHi uLF/5dIOorrqQaqlMKdoi9UVPL9oieXov/F5Qg+VV1wFq6yeszhaXso4dU4AREdAqzA zHI2bmvLXQHQXo5yx3JiJ7lnPPzPOvTE96Ex4K8vsr3Td06UJBQRbwDwx4NDXD3TwHG TLp25D7iH4es2eI+LV6t/UBqukaOX7//0IfRMPNxCLzuyBVASwYOpUAWPiVIJ9MgeeD N5nEmcKJvg== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=qftdzk2dqsatjnlrq4r5brjbihpfcrsh; d=amazonses.com; t=1791559112; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Feedback-ID; bh=LxZBKjOVHIjrHKlIdcOW7NTluhzU5wBV9sRQSWxcsNY=; b=NM3AgtfOGWxFrI1e5ZFK54LySP3moxQWFdfi8WHlapFyNThdP7OqH1OzJWFBAZ2Z KAADryVEwQalK6zup/+sWWBoc0m03d8KI5hv1F8JKzLrCXzCnQly9dEFo72VuTJ01N0 DHr9z3M4EkYJWnupKf2QCl5JonEZVTssPI4G7Hc4= Message-ID: <010701a1213e95d6-a3365dfd-b8a7-4a6d-a7ea-770b1bce1c64-000000@eu-central-1.amazonses.com> From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH QEMU HCI-8.1 12/21] migration: Move CPR HUP watch to cpr-transfer.c To: Andrey Drobyshev , svt-core@virtuozzo.com In-Reply-To: <20261009-vfio_v1-v1-12-2ae91d5b8048@virtuozzo.com> References: <20261009-vfio_v1-v1-0-2ae91d5b8048@virtuozzo.com> <20261009-vfio_v1-v1-12-2ae91d5b8048@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 9 Oct 2026 15:18:32 +0000 Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.10.09-69.169.224.5 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB3PEPF0000885A:EE_|GVUPR08MB11890:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 30d6c22b-7550-469c-88d6-08df261894cc 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|704162111799003|48200799018|61400799027|376014|32142699015|9140799003|260925021311599003|55112099003|260925022911599003|56012099006|5063699009|4143699003|260925021911599003|16102099003|10067099003|18002099003|22082099003|5113699003|4113699003|3023799007|13003099007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?WDN2ckRBMUpLdmdrN2grblVwMStSRXdrcUViM1pKTDlMVExxVjltN2VTTVdL?= =?utf-8?B?V0FCUFNQNys2Rm1HdGcxTUo3eVdPV3g3WFhxdG1XbVYrcWdPZ054Y2MydzRr?= =?utf-8?B?cmw5Wkc5aldING9BQkNIM3g5dnR3SFYzc0pTc1NMcUw0WVZCcFQxcjhuMldy?= =?utf-8?B?cGlCcThWa3FPVWZnTzhMK2R1MFQ5SVlaNXFraHZRaDRrb1JSQmZrSlFhUFlP?= =?utf-8?B?aERpci9BYnVpZHBZYTJWR2FwYUFvMS8yUHcwK09LbzVrWFIzUVBLc2xrQ1NY?= =?utf-8?B?Lzl1eEhxOVRUck51c2h3WXRpeE5KYTVtUG1RcC9BMDFRR2RpaEJTRFJwNm5y?= =?utf-8?B?cHRhS1JRUWxTMFcwdEMxL2FGV0cxQ3Z0NncxZ3RORWlUZk9WZ3BlSjlpZ1gr?= =?utf-8?B?QWkzSTJ6dzZEaGpoQkc3UW51RzdFVmhaZWk3ck14UnhNM0ZqaVMrL0FiaENu?= =?utf-8?B?ZmFOWHFNcEVmTFovTGlUbGFVZXdFY0NFNGd0cjNnOFNRSy9DanpJbzlrcWxs?= =?utf-8?B?MUpidk0xTjZNTVFSakZwdkRNb3BGN3N3V1ExTTlVTzVDNUZEdTMydGVGTjVP?= =?utf-8?B?dzVpVXhBYk1ENmtRZDh1SUEwTFdFRHdWWXhHdmlIYW5kRHlvR1ZKeDNQSFZ5?= =?utf-8?B?WFViYk9XWUx1cnZkRUJIZXlrejd6NUtZb0xYNmlhWjZIaUNBcnVoUWZxaEFx?= =?utf-8?B?bkcralJlM0hpd2RReHlDUjRkQWFMRWpEK0doYjVScUhHdW1qTDl5bjYvSy9r?= =?utf-8?B?ZUtDWGNmK0ZHdytYUkY1Mi9RamQwY2V0UHlqNisrK2NZTlBsazZmb2U1Rk5n?= =?utf-8?B?eElxSTkxRGVDRHVqTGRDaDgxaHF1N2VyVnlralZtQ05UQ2NnOXIxMjl2MThp?= =?utf-8?B?MUVCQWNETVpteWF1aytERFAxT1lzMFR1ak91VHBQR01UWGpKbGxNZDRhcTVI?= =?utf-8?B?TzNGelhnb3hFYURWSUR5OHhaM1lheXM1REMvMmd4TFgxWGdMc2J3NFNnSlM1?= =?utf-8?B?VjVYUElYb0pPRlVGNldCSFZYQTJPMm5hYWJZby9yMlI4Z0pyVUllSmlyNmxH?= =?utf-8?B?NXg5MjQxdkt1aCt3ZkIyR1k3MnNCYXBIZ2RvU09FK1oybm1mL2xqZFZtZlRT?= =?utf-8?B?RWFvYTk4RGNPN2FxcE94WS9DMmdRNjJZdVhmSDQ3ZUhzZWRSeTBSaWdORFE1?= =?utf-8?B?Nkh2c1NVVUYrWGZKdEZGNlY1VC95blhoT3oydkN0WFhlRTJCamM4dEtiQW5j?= =?utf-8?B?Z2pyQlF5aUtRVkg2TVdONVZIZjdQcnR4TUI4ZGdQSDRzZC9zckd0SXYxYkRI?= =?utf-8?Q?1tQgmLMS8im4c=3D?= 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)(48200799018)(61400799027)(376014)(32142699015)(9140799003)(260925021311599003)(55112099003)(260925022911599003)(56012099006)(5063699009)(4143699003)(260925021911599003)(16102099003)(10067099003)(18002099003)(22082099003)(5113699003)(4113699003)(3023799007)(13003099007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IDxRsHC7TgbBEXoB2iaQ/QsSJFPmsfp55BdMe3Le33n7N769cSvzImqxBwQa+Sybc1MzKDoaEWw747JwLUDNVyU0e5i1m3/0gl9iIEN5aL+OlYvGAWufrEIvTC8r+9Bcgm28Lwu6EkoWNz823NYHil9vAEfeSeNNpTr1Kj1LN8n926Ey5vjn2Mc3U8FK71VrNTlZ1xOGMdFnF4QXITiu2QNUk9Vgfs64vBIvPxoNRNrUw6ZPuRC554G0ipZxis45sq8BpFMjuw7iGRQ1eqN3JHy/Ijgj6QoEJV3mbCmPSc2pf5xMjeDl5CpBZOtbobrjIdYHjWxhScZuFiFi5syL2I6+XCmfJ1hc2msqACDM5gtdrA60tzvsHwBNB1/BDS/uCa3DkcnfprsPOn+lvn1s+SrY+Uny4gqnlJvRMupkNNdYf6k/9+gw6mE22piVJPou X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2026 15:18:32.6416 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 30d6c22b-7550-469c-88d6-08df261894cc X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: DB3PEPF0000885A.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVUPR08MB11890 Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Low] migration: cpr_transfer_add_hup_watch() takes untyped opaque but ne= eds MigrationAddress -- commit c7d2819ddcd0f6868aa501a95d87ca2adba9d5d9 Author: Fabiano Rosas migration: Move CPR HUP watch to cpr-transfer.c This commit moves the CPR HUP watch helpers out of migration.c into cpr-transfer.c and renames them cpr_transfer_add_hup_watch() and cpr_transfer_source_destroy(). Callers in migration_cleanup(), migration_cancel(), qmp_migrate_finish_cb() and qmp_migrate() are updated to use the new names. Link: https://lore.kernel.org/qemu-devel/20260123141656.6765-24-farosas@sus= e.de > diff --git a/include/migration/cpr.h b/include/migration/cpr.h > --- a/include/migration/cpr.h > +++ b/include/migration/cpr.h [ ... ] > @@ -76,6 +77,10 @@ int cpr_get_fd_param(const char *name, const char *fdn= ame, int index, bool cpr, > QEMUFile *cpr_transfer_output(MigrationChannel *channel, Error **errp); > QEMUFile *cpr_transfer_input(MigrationChannel *channel, Error **errp); > =20 > +void cpr_transfer_add_hup_watch(MigrationState *s, QIOChannelFunc func, > + void *opaque); > +void cpr_transfer_source_destroy(MigrationState *s); [Severity: Low] This isn't a bug today, but the prototype of cpr_transfer_add_hup_watch() takes a generic "void *opaque", while the implementation in migration/cpr-transfer.c always does QAPI_CLONE(MigrationAddress, opaque) and registers qapi_free_MigrationAddress as the destroy notifier. Could the parameter be declared as "MigrationAddress *addr" instead? A future caller passing any other pointer type would compile cleanly, and the function would then clone and free the wrong object. The only caller is qmp_migrate(), which passes addr, a MigrationAddress *, so behaviour is preserved. > diff --git a/migration/cpr-transfer.c b/migration/cpr-transfer.c > --- a/migration/cpr-transfer.c > +++ b/migration/cpr-transfer.c [ ... ] > +void cpr_transfer_add_hup_watch(MigrationState *s, QIOChannelFunc func, > + void *opaque) > +{ > + s->hup_source =3D qio_channel_create_watch(cpr_state_ioc(), G_IO_HUP= ); > + g_source_set_callback(s->hup_source, > + (GSourceFunc)func, > + QAPI_CLONE(MigrationAddress, opaque), > + (GDestroyNotify)qapi_free_MigrationAddress); > + g_source_attach(s->hup_source, NULL); > +} The same untyped "void *opaque" appears here, and the contract that it must be a MigrationAddress is only visible inside the function body. The old migrate_hup_add() also took "void *opaque", and the series through 3953515702de does not change this, so a typed parameter would have to be done here. --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/20261009-vfio= _v1-v1-0-2ae91d5b8048@virtuozzo.com?part=3D12