From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <010701a15a47ce6d-50663f4e-f698-462d-a7aa-5e8ac1772edf-000000@eu-central-1.amazonses.com> Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11020074.outbound.protection.outlook.com [52.101.69.74]) by lore.virtuozzo.com (Postfix) with ESMTPS id 530328017D for ; Tue, 20 Oct 2026 17:07:01 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cPv3bK2Lwl1C3u97Vkefq6HJgim2Rv2LGaN1pNWtRbP3Fn9G+yE8YZmSBr3BArdQaNvJN/YUllC8UCHlOeiyqmYTraLPEvKOlET6LqoqfU0FZoIGyaM5nfKx8XkTTFW2PyZyGm6VcGwly0y+KNmU7ECYRcr9zIYD1ABeR6Dc2Em7iKCXnveJbQzqZY3l+hPEAvLm038x5EcpFNtrEt9fDN/KaOKMGEEgcwmOjdd0g69LLGoOHqLJ+DLNKLdTHnTBQufF7G5T5UY2apLVggYPlfF1BfPnb82OzBxFHePcTPH7ppTKG88jd5zNqKnqwP1ekW76o1L33BdngzAy+L+rnQ== 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=TYfhXvPTAhFAHvwiixWDTI5BXxI4yAv1+FHtNH9iRTc=; b=jrVq1l+HRRUh51ZTX0UWnAs1e0//GXh2pb+dO+lRE04eL+5Mud9NRBk5u7A/l6CvQU1+5Te2XCRoMwz2p/iIpqdyYCAsA5hKVcYncrxnqmkzEnOHO47/9snsQUeyKRT4Pzm6OPjWGbXeZxLsQDsyQL3V5OPV17bSOW3W/SiHzeAd6Mpduh+5rd7u26lSwBu41iQ9aKI3qoiIlnDY3wMm7KxOUNkA6AOnLHa0lzD9xbtvk30DwIJCqAIb1nhnYYfl9dGoeEiAXeTtGMuQazzIA/dF1ijE4kJfD7pLoLk6T0qOB7p/QRQnoOHGCuML0x6vcN3/SENv+DyVFrV0AdKmXg== 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=TYfhXvPTAhFAHvwiixWDTI5BXxI4yAv1+FHtNH9iRTc=; b=OQlQhEPA+3S2Ltc91uMcaLqVAoy6Gq+yIPdEPHGwosQ+lrDr+myjsTEzZWTLVZ6go98H0HLNI2lmkEqw3VQxPfBZ6qsbyMZLyGk0dt7BNmR0XpXfcOylIHd+VjwkWPkKCWvVM4OWU8eRTJabh72KECRZlgZsvoy2qqPW1MEona0= Received: from DUZP191CA0006.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4f9::16) by AS8PR08MB10247.eurprd08.prod.outlook.com (2603:10a6:20b:629::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.546.15; Tue, 20 Oct 2026 17:06:58 +0000 Received: from DB1PEPF000509FB.eurprd03.prod.outlook.com (2603:10a6:10:4f9:cafe::92) by DUZP191CA0006.outlook.office365.com (2603:10a6:10:4f9::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.522.20 via Frontend Transport; Tue, 20 Oct 2026 17:06:58 +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 DB1PEPF000509FB.mail.protection.outlook.com (10.167.242.37) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.546.15 via Frontend Transport; Tue, 20 Oct 2026 17:06:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1792516017; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=sW8MGKW7lI1jh/db1aQAiHQZzEc9eRDzTVcWRx8Aorg=; b=oJRdHF95DbjWMc15MaWN1RQan2+quwOwceBSpWTC1h2Jiz4hLVD7yx7iH8N45CRt X8Bz02JFoh6uIQ5vxTg2miQ05BwtFUKDjPoeWL08jC6AhHNDeqoBaSAhJiCAN8z+zba U/qdKT/0MBZflOSn2/91UK/RGTmH0ehLoFjFawTI5RfjRzucPmHZcScOuE1gpgioMTt JQYMoHQr4tpU+w1gJPff+hojYNlz3PCGFy/y7jQt9X293KMFI1yAiHGe2QTHZCzFoEd V10Ko4/aeAPLltZuhPLB/bcpCIs6Y5QOt9UqpweQg2ZHcF38HKY+1hE9TUntySjjQmg l+QJBTemVA== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=qftdzk2dqsatjnlrq4r5brjbihpfcrsh; d=amazonses.com; t=1792516017; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Feedback-ID; bh=sW8MGKW7lI1jh/db1aQAiHQZzEc9eRDzTVcWRx8Aorg=; b=WgzXwQhQFwY/z6lTuOt0NtPhj2LL+tP+wmRqygshT8sC+tgAl0uHjccJz+mvUzdp ECve+47PGf6vGdnSm5R11avSOPJMnP9THWKABFq6K47fMlGGzAuah8ivyQoJlY1DrO7 pLVJCt6ZPfzV2zJjZUyIoOkwMtelrXUv+yATKbEw= Message-ID: <010701a15a47ce6d-50663f4e-f698-462d-a7aa-5e8ac1772edf-000000@eu-central-1.amazonses.com> From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH QEMU HCI-8.1 v4 31/31] VZ: vfio/container: lift the CPR blocker for mdev devices #VSTOR-103860 To: Andrey Drobyshev , svt-core@virtuozzo.com In-Reply-To: <20261020-vfio_v1-v4-31-83a5668230e5@virtuozzo.com> References: <20261020-vfio_v1-v4-0-83a5668230e5@virtuozzo.com> <20261020-vfio_v1-v4-31-83a5668230e5@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 20 Oct 2026 17:06:57 +0000 Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.10.20-69.169.224.2 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF000509FB:EE_|AS8PR08MB10247:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 1dfd3747-e82d-4965-73f3-08df2ecc8cfc 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|9140799003|32142699015|61400799027|376014|48200799018|56012099006|5063699009|4143699003|261009223027099003|10067099003|18002099003|22082099003|16102099003|55112099003|5113699003|4113699003|13003099007; X-Microsoft-Antispam-Message-Info: y1zmOmcneKbywYqLW3wbfo9IlmOs8TjxFf91clHi/opULYPGTornfEf4o3b7eICJAc4BH2osskMBYGtRvVbgpvWyJOyNlTfuoALiZ7ZBKpJJIFHuXlr4OErjvSSRv15duGF6trKG0rSh8fDRfimhedTckyHuC+3Y/OjCgKFQsEpPqD2AVLeQW+o0DtgCZcpDGL2xeG+M5UADxHt+b8EhhrFgETYWAlsmPTpSt2aD2kiWV66rZaCaCUlPG2Kh+2jPS4ohE2S/SxaDCMPTvLN/VcfiKcsK5FWbHmwzLozRAujihj41dfsOmgCJFjWd4ca1GywHHjcY3jaoDV/s9aZNxjP2cEi3frGw2xtTibfJgcO7qwtuuAdPRQSY/tsDddJVq/b2BKDh6DTpjNtaGc8ZUjrgcxm0T2V3YaNkj9xqOgsUhEZ/U7UCqUHWqhgJ6V3G1u/hLpwGDkVX9HCJtl63/7azlravQiJTEzYscfL9GnBgcKTn/hQ+VScwx5e92lhghqoGbD/dampp1MelIq+c4olGu2Og4r5e4J2Gn4GvGYe1RuMZov72AeZXiBjdKZLtAg85Nb7+MIjYhfKGn2h0AQ/lWsUDRvl9Zz7xsFGbi8cFSsKX8Hs9FWX12FXVyw9aYagHznkbs2f1IKBZp/wg5aeEs0WPFGLEKDuPDu/HULYeFTb+p8jg5F23X61Fg44m40sQAi4fC8zXGXWMjujE4NQWWPHTqbsJE7uK90ffZRQ1JIJeJlEuEFNacHREC0d4FAB5Gc4DJ0d9ba0GJ3DMlJSHfUNHt5+voUXz90Bq1cBWUIo+noawe+6hLBPPgGHFka3KFOp59RphD82LqWfCZbNjGGZeafToCTFm5RaHT5yuKVCWP0nNMllrNWAWyRsjQUKXE6EskacQRo7C2aa0LQ== 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)(9140799003)(32142699015)(61400799027)(376014)(48200799018)(56012099006)(5063699009)(4143699003)(261009223027099003)(10067099003)(18002099003)(22082099003)(16102099003)(55112099003)(5113699003)(4113699003)(13003099007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fK7XvVpwZL3mbIpnTs6d1vRXA4nhw6/epQL7I+0oFfUNemPjd55xc5/i89+Z39Kd/vNBSY3/74k9uoAsMHzXnwnuY6sbtYef1n+x6mdqFDdccnaVAVcpQ6kCczHXDDY8060gcHtc6Om2SJt8xlqUSgevFAhhc8oqAadsudE5YFXu6g3ThcTgvIkfPnBVpg4/e9h2Vd7sdkIDneKZEwIXyvwaJaWH5AFpKHnz/c4iqiyNSG4C8z+zYfOuo83sl+22hXL3M0uOxw5sx2sHjlDI28V2tHKpo/HT5P0GfkFcleajySZRVmTYK/bNLZlZcrQ54yGNKhakhQo1i7zZktGUpg7ZxdHa3H4cbAHvdXuCyoxx65/c+xzYEYI+1dES/JBSlsUhoD5qTchU5JtFvbwMUnTuTAmB+lEvZ18hHzgjYJtgnqIfpg3kM6Nllqb1lmbr X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2026 17:06:58.2597 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1dfd3747-e82d-4965-73f3-08df2ecc8cfc X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF000509FB.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB10247 Thank you for your contribution! Sashiko AI review found 2 potential issue(= s) to consider: - [Medium] vfio: mdev CPR blocker dropped; remaining UPDATE_VADDR check onl= y covers the first group - [Low] vfio: CPR mdev blocker removed for all mdev types, including vfio-a= p and vfio-ccw -- commit 7cbd800afda6ddbe0b7b6ef4fa513b3145de2ff4 Author: Andrey Drobyshev VZ: vfio/container: lift the CPR blocker for mdev devices #VSTOR-103860 This patch removes the per-device CPR migration blocker for mdev devices in vfio_legacy_attach_device() and the mdev_blocker field in VFIODeviceCPR. The aim is to allow cpr-transfer and cpr-exec for mdev vGPUs. The commit message says this needs a kernel that reverts ef3a3f6a294b. > diff --git a/hw/vfio/container-legacy.c b/hw/vfio/container-legacy.c > --- a/hw/vfio/container-legacy.c > +++ b/hw/vfio/container-legacy.c > @@ -988,20 +988,8 @@ static bool vfio_legacy_attach_device(const char *na= me, VFIODevice *vbasedev, > goto device_put_exit; > } > =20 > - if (vbasedev->mdev) { > - error_setg(&vbasedev->cpr.mdev_blocker, > - "CPR does not support vfio mdev %s", vbasedev->name); > - if (migrate_add_blocker_modes(&vbasedev->cpr.mdev_blocker, errp, > - MIG_MODE_CPR_TRANSFER, MIG_MODE_CP= R_EXEC, > - -1) < 0) { > - goto hiod_unref_exit; > - } > - } > - [Severity: Medium] Is the commit message accurate where it says "Without it the VFIO_UPDATE_VADDR extension check in vfio_cpr_supported() still blocks CPR"? That check is container-wide. It runs once, from vfio_legacy_cpr_register_container(), right after the first group of an address space has been attached: if (!vfio_cpr_supported(container, cpr_blocker)) { return migrate_add_blocker_modes(cpr_blocker, errp, MIG_MODE_CPR_TRANSFER, MIG_MODE_CPR_EXEC, -1) =3D=3D 0; } When a later group joins an existing container, vfio_container_connect() returns early: QLIST_FOREACH(bcontainer, &space->containers, next) { container =3D VFIO_IOMMU_LEGACY(bcontainer); if (!ioctl(group->fd, VFIO_GROUP_SET_CONTAINER, &container->fd)) { return vfio_container_group_add(container, group, errp); } } This path never calls vfio_cpr_supported() again. Consider a passthrough group that opens the container first, followed by an mdev group that joins it. On a kernel that still carries ef3a3f6a294b, the extension check passes before the mdev attaches. The removed mdev_blocker was the only guard for that case. Can CPR then be refused only late, from vfio_container_pre_save() through vfio_dma_unmap_vaddr_all(), instead of being blocked up front? Does the patch also leave QEMU silently dependent on a patched kernel, with no runtime probe, opt-in property or per-device blocker? That also differs from upstream commit dac0dd68d9b. [Severity: Low] Is it intended that this blocker is removed for every mdev type? The removed check was keyed only on vbasedev->mdev, so it covered all mdev-backed devices attached through vfio_legacy_attach_device(). vfio-ap (vfio_ap_realize() in hw/vfio/ap.c) and vfio-ccw (vfio_ccw_realize() in hw/vfio/ccw.c) both set: vbasedev->mdev =3D true; so they also lose the blocker. vfio-pci does the same when vfio_device_is_mdev() matches. The commit message gives the reason only for mdev vGPUs. The only remaining gate is the VFIO_CHECK_EXTENSION(VFIO_UPDATE_VADDR) test in vfio_cpr_supported(), which does not look at device type. Has the VADDR-update flow been checked for vfio-ap and vfio-ccw? If not, should the blocker be kept for those device types? > return true; > =20 > -hiod_unref_exit: > - object_unref(vbasedev->hiod); > device_put_exit: > vfio_device_put(vbasedev); > group_put_exit: [ ... ] --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/20261020-vfio= _v1-v4-0-83a5668230e5@virtuozzo.com?part=3D31