From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720788; cv=pass; d=zohomail.com; s=zohoarc; b=A53Vf5YtpAEG5tm6BAQE7A3FmTZddtY3xieP9JKXXrzKFBeB4jDJLMAfSCYS7f4rZ/sD9ELyldfaaIKi19y1/9okxZ3wPfmeYLr7Dgj/rDNmoKN5iivw7cxaUdGsT4ZqCQxQ4THW0vHBy8Eh3EUjyZg9rXsJ0god5bz+ADEv8GA= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720788; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=RIbbeMLPJ1Oc8O3jfNscoU93ycEkxovMGroMGjaJzMA=; b=b+7+YV+Cneit84eLfcyJxV1IVJfdmicAS++ZmC33CRRbAuEsZilPnDTqEhSYgGcLH0HfVTpIwtFgPBreEUP0EMBzTDiG9LrwaGLdgBs5dmbH1PwU6LtrnTMn5Vx8eixbjCm8wSwhnk2A+Dy25D+wvz6LBsOqVJUowL8LvjJ5nFc= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720788727788.2080245793711; Mon, 20 Apr 2026 14:33:08 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287749.1568114 (Exim 4.92) (envelope-from ) id 1wEwEX-0006o6-9D; Mon, 20 Apr 2026 21:32:45 +0000 Received: by outflank-mailman (output) from mailman id 1287749.1568114; Mon, 20 Apr 2026 21:32:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEX-0006nz-6E; Mon, 20 Apr 2026 21:32:45 +0000 Received: by outflank-mailman (input) for mailman id 1287749; Mon, 20 Apr 2026 21:32:43 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEV-0006nt-Fo for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:32:43 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEU-00CD1J-PA for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:32:42 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b6b-2eae-0a2a0a5409dd-0a2a450289b2-16 for ; Mon, 20 Apr 2026 23:32:42 +0200 Received: from [52.101.62.125] (helo=DM5PR21CU001.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b79-af86-0a2a45020019-34653e7d2fd7-3 for ; Mon, 20 Apr 2026 23:32:42 +0200 Received: from BN8PR04CA0046.namprd04.prod.outlook.com (2603:10b6:408:d4::20) by BN0PR08MB7535.namprd08.prod.outlook.com (2603:10b6:408:15b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:32:38 +0000 Received: from BN2PEPF00004FC0.namprd04.prod.outlook.com (2603:10b6:408:d4:cafe::ac) by BN8PR04CA0046.outlook.office365.com (2603:10b6:408:d4::20) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:38 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BN2PEPF00004FC0.mail.protection.outlook.com (10.167.243.186) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:37 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzGr5ZTxz1wdM; Mon, 20 Apr 2026 14:32:36 -0700 (PDT) Received: from SJ0PR08CU001.outbound.protection.outlook.com (mail-sj0pr08cu00102.outbound.protection.outlook.com [40.93.1.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:36 -0700 (PDT) Received: from SJ0PR13CA0206.namprd13.prod.outlook.com (2603:10b6:a03:2c3::31) by CH3PR08MB10292.namprd08.prod.outlook.com (2603:10b6:610:208::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:29 +0000 Received: from SJ1PEPF000026C7.namprd04.prod.outlook.com (2603:10b6:a03:2c3:cafe::9f) by SJ0PR13CA0206.outlook.office365.com (2603:10b6:a03:2c3::31) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:29 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C7.mail.protection.outlook.com (10.167.244.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:28 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:25 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=ebXKwuSPcjkn5IOyEjvxW1od2zYbsQ7n1rRycbunXt+6PQ+nlG+f1Wp6EgRUG53b2Uss4XA9d5kJWlvtwEsuas/xTQEYnx2wdqmeMsvk3VPh6PpBOtiujvfOpYm3SH93ckd2e8ibohFSmEfUnVSU/GQZdysOHabTNT92UGnXG1Bgn957D7QLtUGcBIt+wsrKxQk2BD4n1q69CEb4vY3iiIw0kU4XCtG3emVhIFJdAak5LAZQbosmfI/mygulNj1aZ27byfv5h7V/UNd0BroTv3/FbecDx3ccBqJ4GV5IVzGmR5+jEYpfcojJ32fHaiSa09VH9f91pjT7NXjKwwj7YQ== ARC-Message-Signature: i=2; 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=RIbbeMLPJ1Oc8O3jfNscoU93ycEkxovMGroMGjaJzMA=; b=hTTAO1Ytxlsv+NAOmkaANcNpWuzWjsZEveTzoxfgypRSb56QzVNnb0WLYB/Jdq0AKVq7k+m//TcBdY3zJivMMyaD5n7lAzv2kPoltquUpDcEhJT285jKTyJjsI7AGmwl/ZxXFJqxqSm2Gu2Cbt21NMCJhivri1ngcjNKlYvtbj/eMX48QD0z97rkl3PSWfoVT92OOTawPJYSQr920x3JXglCWCP8DS0WOOGRU35wkPa2xq3k89bubLpFHQHmdRVDRqk2JZT912K1+3HdMz8g/pcsckG2mas+JIh1hn9XLfFxm0egMn4F1jTsxqxk3NEfux77XwlTuB+TIsLtmoBEvA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.74) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RIbbeMLPJ1Oc8O3jfNscoU93ycEkxovMGroMGjaJzMA=; b=XOe7d+SbjJTnY3xVcYoclCF/DPLPoJLW4FFKjFmSAZSoy9d7D3DxsRFHNGcd5zXipxZGN4NZGnspgWGyerYaGdCN9CFN7qjxaOByQyuMfO63WCgvebZEGU/uATJpmegdipMevsn3bQjy71oMOMr4OuJ0N0tHZhjWgfMFRb0DRwA= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.74) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.74; helo=SJ0PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EluVDqLvGbOHOneT3Q2IYyKral+PiF993yvUhKOcf8Hv0o+s2+iAqFRYLJISll+lpobHgqfQHaCsetoixpOjALcbWcfSFo0/jO+9G1fFsA92oiKMh7i1Ha9ruMmwLC7lY14NI3lSAryNMW09jDEu9DRY8XtsZ34+6EHjaDiuVA1sbj9L7+90yIXRUIdVx7GEZ4lxCyFWkRxw1BTtqdpPoowEgPIJZ7YLMx+KLGltNmxGC0lIvJCY3zvnyxQ25xk9hwkzKLGUGiiRw0RIqgUZ4tRXAayb7ZFKDVNKU1QSVuiPTkWDVsh9xxK/byO0XQ/45QalattReRBg5aup+ZHeVA== 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=RIbbeMLPJ1Oc8O3jfNscoU93ycEkxovMGroMGjaJzMA=; b=Pv31Zdfgw9n6r1whvXvcWjWeRX2tJ/4/sU7fEktJhmCzpToXK9O/wcy5l4XwK/YzHz62IgxbIJofgEQ6jV2wrCH5/vgzQYqjTQeD6IUxs3vt3ptAzHoQkL5u3cGwOamslb8OCTGd9qyMVIIuyDKGiWEszBRvdfmUNwuQh1AX1/eLdH70uKrvd0rGfqzoRuqOb8KqIb5HZyPii/VkU9d/VxVn6bwNl6NmGA8ABF6Zs46uJx/fZ0cYFRQjhM8wwahH2YVbFBFCVvP0RgMie23rbL4YMi8MSgEJZe+c2LsqAoT4FJzs21jSQSrt3eih9z3qBUa6JDrDntFCPBTlDgYkKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RIbbeMLPJ1Oc8O3jfNscoU93ycEkxovMGroMGjaJzMA=; b=XOe7d+SbjJTnY3xVcYoclCF/DPLPoJLW4FFKjFmSAZSoy9d7D3DxsRFHNGcd5zXipxZGN4NZGnspgWGyerYaGdCN9CFN7qjxaOByQyuMfO63WCgvebZEGU/uATJpmegdipMevsn3bQjy71oMOMr4OuJ0N0tHZhjWgfMFRb0DRwA= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , "Julien Grall" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [RFC PATCH v6 01/43] altp2m: Add template common altp2m.c/altp2m.h Date: Mon, 20 Apr 2026 17:31:24 -0400 Message-ID: <20260420213206.208750-2-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C7:EE_|CH3PR08MB10292:EE_|BN2PEPF00004FC0:EE_|BN0PR08MB7535:EE_ X-MS-Office365-Filtering-Correlation-Id: 85feac3e-3985-4319-d454-08de9f24584a X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|36860700016|82310400026|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?BE8rtEXCWaAApeWCvMorSyKGDw9VgXnc8iwL8MktiVTNVDq8oFwOUTmLSa1N?= =?us-ascii?Q?hH8E7C3yrBMMYgYsnly6qrx05LKbse3Z6QTmS8ICpzXiSfD0GSVpx4asYnh/?= =?us-ascii?Q?hZxaTDKynZjKoDg7b3DIU1og4hG2WD12k1FjNfit4BktJKZtxrVMlDPfyjzd?= =?us-ascii?Q?0o0SaWRctA1vv/XJ/KMmGEnzTgpHMMP2cbYnb+qmGyDsGsugVnFmwwbU2VrS?= =?us-ascii?Q?cCYDjBjpVENfKEUE8m+t69M1CooQGp0IwoqMep3uIHKy0Na8+7d7yxZR5/Wq?= =?us-ascii?Q?2kAanLrkHct3vK+UXu8vupMFNMC40wni7UM5WZYQsDVY8kmm2k1BazayDQnb?= =?us-ascii?Q?Aoesy1O/R1w4++qZtipG5Lyc2FSYC6XwrGi/WKmwQ1CpHrN/YyAv9/JR6SUI?= =?us-ascii?Q?1laU4EeSpXWLqaOKstQTVGC2vZtZRlMDCZNClM+zPhxQ/yf3N+Xx4T0hYr/O?= =?us-ascii?Q?BpyP4zmgb7eoh9FrGTwEvwM+mcEw9zck9WDpLe0udJh2lVhr6mI1HFlMuk5n?= =?us-ascii?Q?IFUDyjYRmncyzOlB++RoV3TYs+O0RPs3F5cNvvH38TEVq5j8etC+8vdm4E7O?= =?us-ascii?Q?kGl2Mwlih+scK3Ptd80N5WVMzWG7OnLZioP6rfNZqXPrGsSghsIxdIaiEAGZ?= =?us-ascii?Q?sK4uzTLnjRbPo9f1WFBnvKpGHOLGCsSt2+3z85gXbEsoLXX1cTcupgb9kR/+?= =?us-ascii?Q?ueWsmZifCM2xHkd+wctpE3pFrj5NDwbjNgtahJcEgTZqkLFIcQAfS29G8ZZq?= =?us-ascii?Q?H83x3RDM7870zJqZrrVE0fq+vB5cTfMUANkrJNVLalZ3F/BVpHx3RIlE2T+j?= =?us-ascii?Q?Q+fSvr0Kvo3MzSNEvJgVJF6/tudj+61PKD0VYY7hmloQV62feKb5af6Jx7GK?= =?us-ascii?Q?JS7oqjp2S1k2GyVncmxTWix0lzwE60wLaCAoNhkXvYcwwQujw3GL7Oum8yFI?= =?us-ascii?Q?gbYjT0DJaT6o/hLoi2biLPlpdP/p1m2qaUsypx5LpyeRtsVeu4jSJtoOFYPT?= =?us-ascii?Q?GKxRAV0q27EAzQ9CsUUwyY+o8D/3NOJw3BMigLGMV//+16z/cHp1Lm0QlYSX?= =?us-ascii?Q?f3eXGnxPP9rDZ3915wO5BQtVLxUhumUfMgB96onOKdZ6roPeMFBYOGrJ5GV6?= =?us-ascii?Q?F/COfly0Lo3ZtObir7t/vYmyg9qPXwORXbF6P63rgq9y80Fl+i3XgZhzXa/U?= =?us-ascii?Q?P4j85QMNiXcBulcuMG92hA6lwep9fX4EW7RO3ubpQzF3TLNUwBPUW3XmCFom?= =?us-ascii?Q?onDvbB8PBGZngdWcPCkx?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(376014)(36860700016)(82310400026)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: ZrgEm8lPaveONrDiaPSk5FBNmgdmCQlIJ+zy2ZzdRn6Is5i8B2T6J8uSh9Ue0MQApChpwqJ3H8fo7PbCSUvQb7fDxvCPmR/hWCx6UjYlAjsLiYFof/wm7/AOsgMdwbOHmdIT+anSJuKYDxBVfxduRz/ugKMEEeSQtGCscbTLLzzEKv1RPSKq2VG4NyxdsenDj+Dqc5a8duXkL0DaidHGHb1fWq1P0CY3W/RWXS9h8AgdzzEw6mb4NuO6xwgjqaKUY5Z4wvOqQuql546N6tU9LSvkNGViwx8XJZ/c22TxzeOu3qPULMa4H3E/khy7iOQ06zTeqrDdS1OYOJeulN75CA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR08MB10292 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.74];domain=SJ0PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.74];domain=SJ0PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN2PEPF00004FC0.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b57a37ec-bf20-487b-2338-08de9f2452f3 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|14060799003|156008|35042699022|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?hs080B2h/SBOFr3cPUgVBy4zHF1lAB6gE6pDf7vITYUn2i1wNHi/+yvLav9b?= =?us-ascii?Q?ySKJgbOg2IaZL20jfM+GmLFd8dhmEJP1ZwzRB02PzIOHJi39TcKInJAjlXSA?= =?us-ascii?Q?vfRxN6zT18wQEZ9iJ8/nw+ZcrN5DLOZMHA3N92KaA7rxHjzzE1xbORbif1Cf?= =?us-ascii?Q?dOcYGsy+62nbbYWyxBbenismKzc1c9hBhu4XOywXTXG+e3A2FSTjnDFCIqqf?= =?us-ascii?Q?7fpXtR62JYDu7OOj9RaLPj6xCgLlFwtjf1k1jaMOgsH+OQOMWjrE7RJjpeRW?= =?us-ascii?Q?L1XtJdFJAP2Hi4tVbngR5dOd3vbgVdfPBArIxKebPjIKBuFbVdq2f6p8aYBv?= =?us-ascii?Q?6NBDTHGl02IBEdXl4yNM2FyKu1/MohxQ+urv06STpUCGsPGbqg8gy/GvVXiJ?= =?us-ascii?Q?lkW/6cWdusvhE0NnZzgEUb7vaE37u8D55Xc2N4AvJk3A/hfieXvPKA6wap3z?= =?us-ascii?Q?Ts4pauK6d8c5NYeWBbQbrQCMGG1cQaQN+XS/+qvI3YI7YDrwfjnHAcsD7/NZ?= =?us-ascii?Q?atvIKLLuP10zGkCx1GtqxTOb0fAheHwn0W86DOPale4cNEZJHWrliFuZeFlP?= =?us-ascii?Q?ouF8IBbGfqkgbhHlVSpSIHonpgB707J/KU6nns8ZkpI6CFGDgHaca0l2I8tF?= =?us-ascii?Q?3t6hDWHgfbBW26roC7WWeI7wZ+AHu9OXkGS1tU4In0t1R+4MPHSraRtsQAj7?= =?us-ascii?Q?zcWol4yQnbDeFYCL3SlxukfVH8J/J721KdcaTjgGTuviS4t9UGQ9QfwwiROi?= =?us-ascii?Q?ZgkN7ax/9CIQ1vuVG8Uo8wAPL2xTB29KcAE9yxr0EEkWcAZcWHAGkFzDM9Yt?= =?us-ascii?Q?lj9ewXPUVi6rmkvIwSapvwTFyMYL8ka917kR6cmwZT6X2i/t22j4cxvr2L4P?= =?us-ascii?Q?Fp2or1q9wu5QnNzr6NQx7RHXDGEomJn0CTBlsH6gMv6v5/rKhh/4ZjHfdFJS?= =?us-ascii?Q?s71vvcIfJXOw73ZWvwRe2/3ib5Q2jYna1NzunHqSieTeNiwLnVFg8hAXFg3K?= =?us-ascii?Q?MMgt7NBhKP8yyP7XmkVHNkJ7wPcRW6iQIUfiOusjwmFM66fbLdnTf2OKuamJ?= =?us-ascii?Q?fEd9mOeoweq819OwfaekvngQhBU+PwkGa6OtLmenTWPjM6stFdQmJ8F/M8sk?= =?us-ascii?Q?dYNBAMpqaietlAxcPZAiYBZdqrGsgZB8Fd7zrnqfV8zw34sUWD37WLj7GAKV?= =?us-ascii?Q?ICs9DRmuTySb7btHcm4XA7y4sZuvm5Mftn496vg7zlAO4cgBrDR20tb88fQt?= =?us-ascii?Q?ofoevZO/XCIyBod2m+hE?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR08CU001.outbound.protection.outlook.com;PTR:mail-sj0pr08cu00102.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(82310400026)(14060799003)(156008)(35042699022)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wqiAqRZgnTMuKIj5V1aU5/bjXKuRuBz+ZBcKcABf5rZHGYAEk6xueOTqT+SP7Ve8GPuO7WU98+w6KtzyrDSkEZ7Jq1UJYf86m6vfnnkEYGZWcAhP4r8ELg8HUGuMGhGK9jUeowTzftBtSnSHsmuwsb7vZtp9XkIMmAAUZWZp3Jj/quBJhLizw3oNkFLbYuL2AVB2m3t9IreoPSJwMQHUlVXbLQg9MeDdDyPlDqTCh9i58ZvmgrfH4oWKcz0SQ2df4Gn/6RYzpay/hM2xIJ4PAdMGWk3DOHFHJFzKTGxqD/lxyjHMNc3bHPYqWl9Fgm93RnkRfZGMzl1rDJjjD6xUei2oTvfKzOQxYTTMD5BiClS9osJi6CIB4JXaXXBBq0H2WCD9C5FADo4yFlfQReDch6AJQa+gNz/n3SoUuGLxTuMj4u1Lfq3FCHk8oBw8RVkG X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:37.6759 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85feac3e-3985-4319-d454-08de9f24584a X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN2PEPF00004FC0.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR08MB7535 X-purgate-ID: tlsNG-720697/1776720762-89AC2161-FA5047C0/0/0 X-purgate-type: clean X-purgate-size: 1801 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720790371154100 Content-Type: text/plain; charset="utf-8" This commit adds an empty common altp2m.c and altp2m.h file to be added to in later commits. Creating a commit with just the empty file additions makes it easier to reorder later commits which add to these files. This commit can be squashed into the first commit which actually adds something to altp2m.c/altp2m.h for the actual submission if that would be preferred. This is commit 1/8 of the preparation phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/common/Makefile | 1 + xen/common/altp2m.c | 12 ++++++++++++ xen/include/xen/altp2m.h | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 xen/common/altp2m.c create mode 100644 xen/include/xen/altp2m.h diff --git a/xen/common/Makefile b/xen/common/Makefile index 6018e256147f..dbe0094006df 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -1,3 +1,4 @@ +obj-$(CONFIG_ALTP2M) +=3D altp2m.o obj-$(CONFIG_ARGO) +=3D argo.o obj-y +=3D bitmap.o obj-bin-$(CONFIG_SELF_TESTS) +=3D bitops.init.o diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c new file mode 100644 index 000000000000..1a4e102324d4 --- /dev/null +++ b/xen/common/altp2m.c @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#include + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h new file mode 100644 index 000000000000..520328fd3fa8 --- /dev/null +++ b/xen/include/xen/altp2m.h @@ -0,0 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __XEN_ALTP2M_H__ +#define __XEN_ALTP2M_H__ + +#endif /* __XEN_ALTP2M_H__ */ --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776721024; cv=pass; d=zohomail.com; s=zohoarc; b=F4lrY2mOTDUKm/3IcoN7900cHzrcxKnZSTyIv2IFBI55y3eEJCQ3ICrZ/hQk3Uau+GjgwQRC7ws6TltXCQTC/QD5TvLZeq8FnpHiDm7ambxE3vDxHTtyaELew7vRa87v4AqMKtyf9oSfzSAiPplJPaFSX8GzJjJbC1ftAfY7TJo= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776721024; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZmKInt9aDaXWoQsf+7PgzNCnu/gQkWKtbvxoqa67GlM=; b=S24CZaxl9kLDXFA3Lpw551fCLysc4ros6L30CU3+9ZCIY1Yg+g6xd/BpPvr4DPX2p5qphdNYwcwpR2Q2MbCQNh2pGqBx1F86WbAbCI7UeYPb35MIOMS9y0pL7TZ8q5uo/KTGt98p0PsHdSvy0SDcFVYC1NpO+REvQ8FelrnHOaE= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776721024337468.88580226576994; Mon, 20 Apr 2026 14:37:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1288129.1568457 (Exim 4.92) (envelope-from ) id 1wEwIT-0001Of-8e; Mon, 20 Apr 2026 21:36:49 +0000 Received: by outflank-mailman (output) from mailman id 1288129.1568457; Mon, 20 Apr 2026 21:36:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwIT-0001OY-5n; Mon, 20 Apr 2026 21:36:49 +0000 Received: by outflank-mailman (input) for mailman id 1288129; Mon, 20 Apr 2026 21:36:48 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwIR-0001OK-Nm for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:36:48 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwIR-00CCkp-4P for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:36:47 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69c66-e002-0a2a0a5209dd-0a2a4502c436-4 for ; Mon, 20 Apr 2026 23:36:47 +0200 Received: from [52.101.62.143] (helo=DM5PR21CU001.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b7d-af86-0a2a45020019-34653e8fe92e-3 for ; Mon, 20 Apr 2026 23:32:46 +0200 Received: from SJ0PR13CA0043.namprd13.prod.outlook.com (2603:10b6:a03:2c2::18) by DM6PR08MB6426.namprd08.prod.outlook.com (2603:10b6:5:1ec::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:37 +0000 Received: from CO1PEPF000066E8.namprd05.prod.outlook.com (2603:10b6:a03:2c2:cafe::b4) by SJ0PR13CA0043.outlook.office365.com (2603:10b6:a03:2c2::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:37 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CO1PEPF000066E8.mail.protection.outlook.com (10.167.249.6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:37 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzGr6yj3z1wdP; Mon, 20 Apr 2026 14:32:36 -0700 (PDT) Received: from DM2PR04CU003.outbound.protection.outlook.com (mail-dm2pr04cu00301.outbound.protection.outlook.com [40.93.13.57]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:36 -0700 (PDT) Received: from SJ0PR13CA0194.namprd13.prod.outlook.com (2603:10b6:a03:2c3::19) by MWHPR08MB9870.namprd08.prod.outlook.com (2603:10b6:303:27b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:32:30 +0000 Received: from SJ1PEPF000026C7.namprd04.prod.outlook.com (2603:10b6:a03:2c3:cafe::37) by SJ0PR13CA0194.outlook.office365.com (2603:10b6:a03:2c3::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:30 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C7.mail.protection.outlook.com (10.167.244.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:30 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:27 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=joy9Ml+wBC/3JXP0D1STNGjUJuIev05TFrpO5oaqV0ckBiZpnS+NDsPWTN8q0Kd1zdLGaaWwcRY7Jecu06wXBiHveOkQJq0OmOPdS+Jvb50WLr7+11/pLtMB1sDkrO+Ax9LABDBg6wjHxzvnCcOaCIZ8FL5wpibS+3ChbKybr2RwYrNYRf4D0NC5nmfxJ5XV4ixu75bhsSH4T7zAl/rbUNEe6uw8UJ7YCEUwb39KgjBuEYPfGm3th1Qey6IBNQoyNQFPE0VU3LeXC5q4WNx4j0gvJ28zOpv6mNl1fpQFVJ3eKV/GcmRHzq+SngUrg8kiwyjybMrcfxqkh9iHoNUoiQ== ARC-Message-Signature: i=2; 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=ZmKInt9aDaXWoQsf+7PgzNCnu/gQkWKtbvxoqa67GlM=; b=ErxZwqq5x+P4BoHkqhO3PUGmL6oUc0a1JGKqVDJBATnEHZQrarlWdLrdSK0JjJ78DdQD9AGN8HwvGvW6iHyB9Or021DXacSf23a/PGXqJdnOeS81TTfsWKG/UdAJT5cPZVvQA9FgWtbW3hUYmXsOvxUgvHIZ/jR7lgm4OSSdDaUUwt15ahkbrVx+CpSR7amvbnlPy4GsqNDa92gvuOPdHwNjvqESHzlMjHwGqbJi1Pfph/JJZwhpz+L5N6h+d5acuHX/D2S5lHwTVuQ9tmH/rsg3sHQsKugIQx/pfwlfovUtbxYQ4AH2P1yT2ZVwmcuH6dkd72lBajvG1vKSraoIhQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.13.57) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZmKInt9aDaXWoQsf+7PgzNCnu/gQkWKtbvxoqa67GlM=; b=zSBGDKwvLDT9C2izIOabWk6JCX+QMDn5E/UApmtRHrlWnbnHLoMJzmV9dc0iXfQyJMIam6VPv9QWwXTK1P2vnAOBxhWaUz0FIcWM+GJuZdyzJ64WvxGkbnlTcVc0724E6xyG5mFyRClLXBs1FG/oaOTBqkRrp+0OGWFNkaKY3KU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.13.57) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.13.57 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.13.57; helo=DM2PR04CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=B8u5VdPmhdocQulIx5cWf+JokJZcsxJLfulnl6ZE7bMyJmsDdsoCBbxnhMjjro58DG71uqP35B8WPF5N/gPyo25CXpj1mGDiluZIG3zjTO5JC2IscVBfNW/Gq9SugqfChWkpRq/m3p+X4gP9PYLVHu3xfKoYCpSqiXiTXdG6mwNFN9Mdqn7IBTPx8PQ/2gxwvoqGf9OZuTi2PQ6qZGv5NwENj+TZloEeyuJTE2IXZjp98ZxJq08BI6ogE7/wPMC6DK8GrGrms35F4wS98OcL7UyI5QFcjHh/qIQJD/1SCN5EWs3b1UJ1rCKHqMoaYPX+z376fQCH+v7YuBTvegvuGg== 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=ZmKInt9aDaXWoQsf+7PgzNCnu/gQkWKtbvxoqa67GlM=; b=COKLM0E/XxgYwosjbAAE/JTFqwnPMU+fS8oJ9N79Z3Upr0/9AHPHqseOOwsyQ03VZl/TBrVvtjZ6taRAY0AvuYcb4QDr7cqoPqF8bSBudbJ9z5/G5p5TxXFKCFp+CyfZuU+6fgE/twx2pZKa1SK3RKut79MrQlwOWEkD9jXwjGzGIHA1J/JiJHzXArK7LngshnMw3ud1xR9qeB0AlscNpqA8VXtyKtKQlT7JtFFEnl8hg1K0ri65YJtr0Hsuw1SLDRznMs4UQskGylboFf4kmvFc1ig4iypHgF0YzRLnboGcn6isPgTdHgCt36ZtlzA4ypkJV9hER15cr0b67y0SYA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZmKInt9aDaXWoQsf+7PgzNCnu/gQkWKtbvxoqa67GlM=; b=zSBGDKwvLDT9C2izIOabWk6JCX+QMDn5E/UApmtRHrlWnbnHLoMJzmV9dc0iXfQyJMIam6VPv9QWwXTK1P2vnAOBxhWaUz0FIcWM+GJuZdyzJ64WvxGkbnlTcVc0724E6xyG5mFyRClLXBs1FG/oaOTBqkRrp+0OGWFNkaKY3KU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Anthony PERARD , "Michal Orzel" , Julien Grall , "Stefano Stabellini" , Tamas K Lengyel Subject: [RFC PATCH v6 02/43] altp2m: Move altp2m_active to common domain struct Date: Mon, 20 Apr 2026 17:31:25 -0400 Message-ID: <20260420213206.208750-3-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C7:EE_|MWHPR08MB9870:EE_|CO1PEPF000066E8:EE_|DM6PR08MB6426:EE_ X-MS-Office365-Filtering-Correlation-Id: fb8d7ef4-3707-4691-3a00-08de9f2457bd X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704162011799003|82310400026|7416014|36860700016|376014|1800799024|13003099007|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?jqwX9pureH6+tVenENjCXs7vHU2VMVFkm/0eQuGmUNNi3g67P6yDamWNNnEp?= =?us-ascii?Q?FyDlqdRqHhREzIMqug4YNbrIaBmo0V3AX3ppzUXUknohYO4UJl/DnMBOy1dQ?= =?us-ascii?Q?EpBYC57/TQrcpE8iXEHjbXocIiS/ihvbvi7eHAlz1jSNHgTQgF7RTOjardPw?= =?us-ascii?Q?ZadEfybIYExajh2MicvB4z7ZptwoXiC+PH+kJXnh1KZIKfw1M55A3rJJbUBW?= =?us-ascii?Q?HFzxxWn45knwSzFzpkTIc3W+zxTJMp7zASHa99JVMStFm7dnxK6oYXzKlcOU?= =?us-ascii?Q?do5rJVjIy0JTIoC2V6rCNegFoujOoSv27qgLItM0sAPDm8v0R+orhPChnWKS?= =?us-ascii?Q?byG9rnmk/zO/Yh0wS4IUXHzLvHRcplvf1tYq/KyubILgG7tb5uNLv/gM8T7g?= =?us-ascii?Q?NR4k1ftZF85fUu12MtS2KJbABgY1W3kBLqZ4bPlaHTCdf1dfXO2FmNEOdcHP?= =?us-ascii?Q?ARmS5QxH15luEB07kXMNeyugOZB7/iPyNyxyXXbOfLrUp3iq/MPAgl2NYpn2?= =?us-ascii?Q?xbSDJKuQ56MLbtLZ3cP3pYHYkb8p/yPmyvv00enaz+PxrGhbxVsvHiOS7+v0?= =?us-ascii?Q?LqeGKnXjJqQf6XpRWmc0TND0JIjpOCN0nL0E3JwrgV6w+VJxzT+eUROglhCV?= =?us-ascii?Q?u78EabYALZ1eVIL8VqkchVDE06pgRe3D7iTr4dMV3g9cB47JDgiKY5wnVnpS?= =?us-ascii?Q?aO/cQnHKT8avAi3fNiaVBVYtoxzFIUuCitOpNQkwU5Zi5B8+29h9ZUJpKyXe?= =?us-ascii?Q?BqBjeLNDrYDnfgYLr3slfItjaz8XtRdhr5VpbpdUy8jAtPFgXE4Q8tB9af7N?= =?us-ascii?Q?vvR5Ua/a0GPvNgwRk7khqSrZVgscTI4TolXRy6c1dln5QYD+WenYNgAkfd3O?= =?us-ascii?Q?pqWfwoRKtctnQ0chgZY7uBPnP0QKdU+o+OjPawm847/V2gPw7AVeDS47stKm?= =?us-ascii?Q?O0x8MnlzVUVSIhVupE+G62Bziotm5O0ImgIHyHShzKDRuOCcHVNb+cdLaoVB?= =?us-ascii?Q?vLLLSY7JfoihRbWxwv2cQi/mkwPuLUN4FPZ7B68aMUy6I8LDv/TzjjAGLznr?= =?us-ascii?Q?Yy7c4IY9krzY8LNWTA2TB9vHkBCpuprMVQdpQ0bG4gYlvpe2qKadvtMmpD1G?= =?us-ascii?Q?EPfaSWTyH9oDJ0mDZF8HuYXW4lFAc91/IA=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704162011799003)(82310400026)(7416014)(36860700016)(376014)(1800799024)(13003099007)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: dSVXv+ePpA9GTQcN4WQSWQ6dxdgw9b9pQds+7Y5uO8Sl14w7hCQxO3HFMGzCKHrswMrAQAAVUT+BuCDkkOGOVFLQ00ClnT/IPG/HCP2f/4r58b1zpWgi190pg1BG3Xw68/4f3zY+PzuxV60DBT+2cfueOEBbgm0Rp7D+xDbVseHySzUqvzqWte2LYGR/uPqK1sfIkSR/EHqpSqYnL/5zBI2S/fsurUYLtetuguT2C/xW/wGiRyRk6wxHuBLspAoWU54AK8/kwCDptCplBhu4yMyrDtAyJXNidMj8Gpw9HJlUaKF6gw1AXD6sSLSgzmBW2pQuAO25ERGU6AUwviumvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR08MB9870 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.13.57];domain=DM2PR04CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.13.57];domain=DM2PR04CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CO1PEPF000066E8.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 30512a0b-7569-46a6-ab62-08de9f2453c9 X-Microsoft-Antispam: BCL:0;ARA:13230040|704162011799003|7416014|376014|36860700016|1800799024|82310400026|14060799003|35042699022|156008|13003099007|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ty8qVqOhnrrL1Mt2A+ONKTU002Ivirb5Y/iCfzdg8HTbgfyvz88+rhIfFWuO?= =?us-ascii?Q?xOUwj1RJcixQX8gb1N/w+3XTuY4PzhyWEZXXM06OxJEnoMCaqyz4eOj9G/7Z?= =?us-ascii?Q?kcp4w7YPBopFuvYOwIxQ6pNVMen8Pz1mAMgf9/OymwnNVoSb4HCMULPes2fn?= =?us-ascii?Q?wbI8u0mdTpBMgLf0CcD3ButpyPE75Z6jonNpgrgA9jT4P5djMkMqOCp67gyJ?= =?us-ascii?Q?kWT8UFAc5f+TxU0WSptjSl09gSXM8Cm5dW+n99LkfaU5aCRy30cGVMyq5rFf?= =?us-ascii?Q?eHq8vY6ScY57qai8216R6PxWAi3RIFpY0Nt6H1JuVwdgYDnL6m8MUbQq1tiS?= =?us-ascii?Q?ZagASqtqwpvsx2hJkLhpnLBbSI/gTHQuLSIiHNeq2Ch7pmA2p2XJOsr+kXZw?= =?us-ascii?Q?9puWO1LuxoUmnChoHOtyg7tKcklOGJgAjWB+oIN98ccF7rWh8gBIjuhsIB6v?= =?us-ascii?Q?GbxvGTTd6IjX4/auHsqL9LHReQXxLeY1q6Ho0VIOTL8fSau4c2gfArU/WAPg?= =?us-ascii?Q?u+ZilEdAk8+wsyyDBrUruQcXzcvLb1KAbVYlZvI/ZBqbGONCM5wEn6OMLUAw?= =?us-ascii?Q?YE4f1YFQEKATQzGgcptNWWl80MnVTqkh8MRX/RVIc9Cdye6DuAsfaUMorn6A?= =?us-ascii?Q?hMsI8GjaTlpF8kpZpFPCWS8OPCjhgs/7kUqMD+NXuKP7mJuFBHNmdRJZjUnh?= =?us-ascii?Q?8fngeDvkDSNgHzH8KDZKu4bZsbFfAyZHiCowQ/0a8BHsR6DE6c7aL6kBAEkv?= =?us-ascii?Q?YJgarjAgizZ8mgs9rtH9wRKvrGbz+7bYcNSEXEW4aNynfwWWsFKjvcCckcUY?= =?us-ascii?Q?Qp2m2Wyn8aybp3wcjs1WN5b8Sm9jj/oAJlaJBeBd9+MAKp/veuOVmF6l4E7j?= =?us-ascii?Q?cflGizD/xPzhLS7yy2gznwDDAoiMH/Fbtnp+JySK3SR6N6882vyKCpWtiE8F?= =?us-ascii?Q?sfbhfTJxiWvBL2wjA7XxVOjY+09WIEKk6bVuUkNpcOyYFj51fiz3aXU9VT0W?= =?us-ascii?Q?7yrV0MLYkjtwXgCJEN+hFl23ww91eZMPZvLXo7zb230f7I7lpD7zMnwpJqhO?= =?us-ascii?Q?LciRna7lm8fkDwKkf1B/ATUU6kcXuUwRutBCcchsVW4WQKwZ62sZPEdQHUn7?= =?us-ascii?Q?21dxfOdofGxwgh9B/SKIshEjXj91qLoKCg=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM2PR04CU003.outbound.protection.outlook.com;PTR:mail-dm2pr04cu00301.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704162011799003)(7416014)(376014)(36860700016)(1800799024)(82310400026)(14060799003)(35042699022)(156008)(13003099007)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: F4zSkkuHk76QwE6+csRaEcYn+UuZlzlR9D+agYinRRCD0s6T6yCpLPKXxuN4HnlfnT3zEs+tQWhCfhrY/RmsnAPTh5S4NfKZHvNubMk8tu7hjV/HcYisoOT0FJjbj3rK0zG7b/p3q4HqcVULkZtpkOeDbeXYZDe84mMVyniPwbeT1p1rk7MfrKDotvyWPFSDw5NVTqIKdSmuLh9IRSk+opb+uVlNqVI404OANJQN5zMuwSv6Ig49F1MUOWglAGmdhpbYfHv/1CDLLxGDWsliUT2PZwliCm0fw9YdCmD1HJFjqOlrCYAkyZ1fbSyjk/m6sCs/9A/mq5AFLyVeYUfW/Go0t8Ux/IF+PhfVGwfNH6ZwXOlYGVVAJcwDqCO4wCrH/PvHvilsEno4QP/NukxGUWeowWDTzt8aY0hX4cCUNXOi6sKUPaMzl/JzSNuHeXBQ X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:37.1935 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb8d7ef4-3707-4691-3a00-08de9f2457bd X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CO1PEPF000066E8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR08MB6426 X-purgate-ID: tlsNG-720697/1776720766-83F66161-4A065D13/0/0 X-purgate-type: clean X-purgate-size: 10620 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776721026039154100 Content-Type: text/plain; charset="utf-8" This commit moves altp2m_active from arch_domain on x86 to the common domain struct. Similarly to nr_altp2m, this is not an arch-specific value. Moving it to common code allows the common altp2m routines introduced later in this patch series to operate on altp2m_active without needing an altp2m_active member on arch_domain for each architecture supporting altp2m. This is commit 2/8 of the preparation phase. This commit is a refactor, and no change in functionality is intended. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/hvm/emulate.c | 1 + xen/arch/x86/hvm/hvm.c | 11 ++++++----- xen/arch/x86/hvm/monitor.c | 1 + xen/arch/x86/hvm/vmx/vmx.c | 1 + xen/arch/x86/include/asm/altp2m.h | 11 ----------- xen/arch/x86/include/asm/domain.h | 2 -- xen/arch/x86/mm/altp2m.c | 1 + xen/arch/x86/mm/hap/hap.c | 5 +++-- xen/arch/x86/mm/mem_access.c | 1 + xen/arch/x86/mm/mem_sharing.c | 1 + xen/arch/x86/mm/p2m-ept.c | 1 + xen/arch/x86/mm/p2m-pt.c | 1 + xen/arch/x86/mm/p2m.c | 1 + xen/common/monitor.c | 1 + xen/include/asm-generic/altp2m.h | 8 -------- xen/include/xen/altp2m.h | 19 +++++++++++++++++++ xen/include/xen/sched.h | 2 ++ 17 files changed, 40 insertions(+), 28 deletions(-) diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index f3aae158e9f8..9a9b89a232e6 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -9,6 +9,7 @@ * Keir Fraser */ =20 +#include #include #include #include diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 4a81afce02e7..86c12c0d1ef4 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -7,6 +7,7 @@ * Copyright (c) 2008, Citrix Systems, Inc. */ =20 +#include #include #include #include @@ -4612,7 +4613,7 @@ static int do_altp2m_op( =20 if ( (a.cmd !=3D HVMOP_altp2m_get_domain_state) && (a.cmd !=3D HVMOP_altp2m_set_domain_state) && - !d->arch.altp2m_active ) + !d->altp2m_active ) { rc =3D -EOPNOTSUPP; goto out; @@ -4657,11 +4658,11 @@ static int do_altp2m_op( if ( rc ) break; =20 - ostate =3D d->arch.altp2m_active; - d->arch.altp2m_active =3D !!a.u.domain_state.state; + ostate =3D d->altp2m_active; + d->altp2m_active =3D !!a.u.domain_state.state; =20 /* If the alternate p2m state has changed, handle appropriately */ - if ( d->arch.altp2m_active !=3D ostate && + if ( d->altp2m_active !=3D ostate && (ostate || !(rc =3D p2m_init_altp2m_by_id(d, 0))) ) { for_each_vcpu( d, v ) @@ -4676,7 +4677,7 @@ static int do_altp2m_op( p2m_flush_altp2m(d); } else if ( rc ) - d->arch.altp2m_active =3D false; + d->altp2m_active =3D false; =20 domain_unpause_except_self(d); break; diff --git a/xen/arch/x86/hvm/monitor.c b/xen/arch/x86/hvm/monitor.c index d22a2e464460..84c1c2234ca9 100644 --- a/xen/arch/x86/hvm/monitor.c +++ b/xen/arch/x86/hvm/monitor.c @@ -22,6 +22,7 @@ * this program; If not, see . */ =20 +#include #include #include #include diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 269ca5643346..ff895f7f9437 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -4,6 +4,7 @@ * Copyright (c) 2004, Intel Corporation. */ =20 +#include #include #include #include diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index 9c1ac3cc2676..ad5ded833a75 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -28,12 +28,6 @@ static inline bool altp2m_is_eptp_valid(const struct dom= ain *d, mfn_x(INVALID_MFN); } =20 -/* Alternate p2m HVM on/off per domain */ -static inline bool altp2m_active(const struct domain *d) -{ - return d->arch.altp2m_active; -} - static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v) { return vcpu_altp2m(v).p2midx; @@ -64,11 +58,6 @@ static inline bool altp2m_is_eptp_valid(const struct dom= ain *d, return false; } =20 -static inline bool altp2m_active(const struct domain *d) -{ - return false; -} - /* Only declaration is needed. DCE will optimise it out when linking. */ uint16_t altp2m_vcpu_idx(const struct vcpu *v); void altp2m_vcpu_initialise(struct vcpu *v); diff --git a/xen/arch/x86/include/asm/domain.h b/xen/arch/x86/include/asm/d= omain.h index 385a6666dafa..0cf0c0d92087 100644 --- a/xen/arch/x86/include/asm/domain.h +++ b/xen/arch/x86/include/asm/domain.h @@ -368,8 +368,6 @@ struct arch_domain mm_lock_t nested_p2m_lock; =20 #ifdef CONFIG_ALTP2M - /* altp2m: allow multiple copies of host p2m */ - bool altp2m_active; struct p2m_domain **altp2m_p2m; mm_lock_t altp2m_list_lock; uint64_t *altp2m_eptp; diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index 0bc9b9ad2f52..08db8f37c1b1 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include "mm-locks.h" diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index 5ccb80bda5d3..3d563b3bc2d1 100644 --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -7,6 +7,7 @@ * Parts of this code are Copyright (c) 2007 by XenSource Inc. */ =20 +#include #include #include #include @@ -528,7 +529,7 @@ int hap_enable(struct domain *d, u32 mode) goto out; } =20 - d->arch.altp2m_active =3D false; + d->altp2m_active =3D false; } #endif /* CONFIG_ALTP2M */ =20 @@ -595,7 +596,7 @@ void hap_teardown(struct domain *d, bool *preempted) for_each_vcpu ( d, v ) altp2m_vcpu_disable_ve(v); =20 - d->arch.altp2m_active =3D false; + d->altp2m_active =3D false; =20 FREE_XENHEAP_PAGE(d->arch.altp2m_eptp); FREE_XENHEAP_PAGE(d->arch.altp2m_visible_eptp); diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c index e55e53f44c78..a9d6b081a523 100644 --- a/xen/arch/x86/mm/mem_access.c +++ b/xen/arch/x86/mm/mem_access.c @@ -9,6 +9,7 @@ * Parts based on earlier work by Michael A Fetterman, Ian Pratt et al. */ =20 +#include #include /* copy_from_guest() */ #include #include diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c index 5c7a0ff30e8b..8319733b1bb6 100644 --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -8,6 +8,7 @@ * Copyright (c) 2009 Citrix Systems, Inc. (Grzegorz Milos) */ =20 +#include #include #include #include diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index dfdbfa0afec8..ed850723f5fd 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -4,6 +4,7 @@ * Copyright (c) 2007, Intel Corporation. */ =20 +#include #include #include #include diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c index 5a6ce2f8bc2e..17f38aac14d5 100644 --- a/xen/arch/x86/mm/p2m-pt.c +++ b/xen/arch/x86/mm/p2m-pt.c @@ -12,6 +12,7 @@ * Parts based on earlier work by Michael A Fetterman, Ian Pratt et al. */ =20 +#include #include #include #include diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index fddecdf978ec..41517765c5ec 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -11,6 +11,7 @@ * Parts based on earlier work by Michael A Fetterman, Ian Pratt et al. */ =20 +#include #include #include #include diff --git a/xen/common/monitor.c b/xen/common/monitor.c index d5c9ff1cbf8c..e758a3fea9f1 100644 --- a/xen/common/monitor.c +++ b/xen/common/monitor.c @@ -19,6 +19,7 @@ * License along with this program; If not, see . */ =20 +#include #include #include #include diff --git a/xen/include/asm-generic/altp2m.h b/xen/include/asm-generic/alt= p2m.h index 39865a842ab3..ecee6942f4e8 100644 --- a/xen/include/asm-generic/altp2m.h +++ b/xen/include/asm-generic/altp2m.h @@ -4,16 +4,8 @@ =20 #include =20 -struct domain; struct vcpu; =20 -/* Alternate p2m on/off per domain */ -static inline bool altp2m_active(const struct domain *d) -{ - /* Not implemented on GENERIC. */ - return false; -} - /* Alternate p2m VCPU */ static inline unsigned int altp2m_vcpu_idx(const struct vcpu *v) { diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index 520328fd3fa8..b3b21124dd7e 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -2,4 +2,23 @@ #ifndef __XEN_ALTP2M_H__ #define __XEN_ALTP2M_H__ =20 +#include + +#ifdef CONFIG_ALTP2M + +/* Alternate p2m HVM on/off per domain */ +static inline bool altp2m_active(const struct domain *d) +{ + return d->altp2m_active; +} + +#else /* CONFIG_ALTP2M */ + +static inline bool altp2m_active(const struct domain *d) +{ + return false; +} + +#endif /* CONFIG_ALTP2M */ + #endif /* __XEN_ALTP2M_H__ */ diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 212c7d765c3e..458f2f260dd7 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -623,6 +623,8 @@ struct domain } monitor; =20 #ifdef CONFIG_ALTP2M + /* altp2m: allow multiple copies of host p2m */ + bool altp2m_active; unsigned int nr_altp2m; /* Number of altp2m tables. */ #endif =20 --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720795; cv=pass; d=zohomail.com; s=zohoarc; b=YbfH3YYgE7eVwOB5gThPcAN0DXkXpTDJqffUdE0Hk5UqzYPRVduzBa7sUH1P9jvq4MQn3pI1Ry+2fsAc0DoeZnqWMSNHOe5KXUFRAZFBMG6P/BSlFZyber0DSHElyd7ZZS/G+PjRHOL5JcoKENitFFltZ957t16RemcVwwZ1HGA= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720795; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2ZAemscrHmCDKhZ6RJ1poqZ5UjAED/22jekv/5eW7eQ=; b=Kggu4ccHVM7fk5LcLeYxe3NThlzQcm8PYKIZARP/Qt2wpSoF9349K6nVnn3SQmTDymA22lXbtuefRzXHq9idePtZ5ECZZuYDaRJg/ayTEnIi0Ma3wFzgafzQF4oltOoj9nkbIidgdg4ZHyAJRYjTkMWyKUPJNDcv+Km7md+KvHE= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720795462665.2722767550024; Mon, 20 Apr 2026 14:33:15 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287757.1568159 (Exim 4.92) (envelope-from ) id 1wEwEk-000864-2T; Mon, 20 Apr 2026 21:32:58 +0000 Received: by outflank-mailman (output) from mailman id 1287757.1568159; Mon, 20 Apr 2026 21:32:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEj-00085v-VW; Mon, 20 Apr 2026 21:32:57 +0000 Received: by outflank-mailman (input) for mailman id 1287757; Mon, 20 Apr 2026 21:32:56 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEi-0007oF-78 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:32:56 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEh-00CCKM-KH for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:32:55 +0200 Received: from [10.42.69.11] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b55-bab6-0a2a0a5309dd-0a2a450b9074-22 for ; Mon, 20 Apr 2026 23:32:55 +0200 Received: from [40.93.201.103] (helo=CY3PR05CU001.outbound.protection.outlook.com) by tlsNG-42698a.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b85-212f-0a2a450b0019-285dc9679ce1-3 for ; Mon, 20 Apr 2026 23:32:55 +0200 Received: from MW4PR04CA0174.namprd04.prod.outlook.com (2603:10b6:303:85::29) by LV8PR08MB9151.namprd08.prod.outlook.com (2603:10b6:408:209::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:46 +0000 Received: from CO1PEPF000066EA.namprd05.prod.outlook.com (2603:10b6:303:85:cafe::e5) by MW4PR04CA0174.outlook.office365.com (2603:10b6:303:85::29) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:46 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CO1PEPF000066EA.mail.protection.outlook.com (10.167.249.5) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:46 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzH16Phyz1wdP; Mon, 20 Apr 2026 14:32:45 -0700 (PDT) Received: from BYAPR08CU003.outbound.protection.outlook.com (mail-byapr08cu00303.outbound.protection.outlook.com [40.93.1.107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:45 -0700 (PDT) Received: from SJ0PR05CA0131.namprd05.prod.outlook.com (2603:10b6:a03:33d::16) by PH7PR08MB8180.namprd08.prod.outlook.com (2603:10b6:510:150::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:33 +0000 Received: from SJ1PEPF000026C5.namprd04.prod.outlook.com (2603:10b6:a03:33d:cafe::34) by SJ0PR05CA0131.outlook.office365.com (2603:10b6:a03:33d::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:33 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C5.mail.protection.outlook.com (10.167.244.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:32 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:29 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=sFf5YeEXMrQFY0ppQzS9Tm//Ky/s5COdgL3TWSif2YlhFRzgsxg5/E79AEGIj+ShlrGWUn5Ej/DfzDyekmM9chebCowF4YOqxUdv1sdGLKcrz4oj3iI4gHDc/TCWV/z/MpDxxMw1Y7EmFD6yVkbcOMiujHSEJwYPxyGJurXD7rkscmxeYCokmAIwxJZw/Fj+CTzbqK4HdgVZTg8uc5RW48t8mQy9J83oYu1RGJkzYb/4/cuS9bMNPa7bjUEwmI+oUTGe1hieGqNqQXG/puDmq1+P6cS3SXjES38is7CWJinoeQGdNvF6dLsHgO+JcqQ/lVpVDiQrkrvrCNLrThTVLQ== ARC-Message-Signature: i=2; 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=2ZAemscrHmCDKhZ6RJ1poqZ5UjAED/22jekv/5eW7eQ=; b=JjvyVMLE/yhSIQGFbV5Eo9mXGTaq+cz80YJCMmomUceEvN2HrWCJLjQd2zChcXjmjxiEmS7DH45DVU4hCrLZ/u4ElAy+f6Dll8ph5dS2Gvgeq4dc0EVvUu39LUg82soF1HQMrfFno0A6mhpayJeVR24rjQYRWrND52XNPlmj0219f/vdKfi0CtomS61Ueuf4Wn/8eMMwSW5Ikj5Zawcqb+tsl8Ac8zXlVN5YhK2XFhAvcXuxTHN1rvzghMXy0X4dtuiU9PhMTa8j0O1Y/qOyB9uhWQMzjEXWcUDQhnEnzSCSPPDOLOoA0vT3iRUOHiWt9pPm3fnz9J6/T9mVo1767w== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.107) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2ZAemscrHmCDKhZ6RJ1poqZ5UjAED/22jekv/5eW7eQ=; b=mjKk8oE/VWBVx0KU3IdA0yxKAjFEcer/5adEsu7MqjuFViR7teWgqUGInzI7A969eSCRvfBG9kuEFwTQAiBPYvFRa8FtdZIqEFobbWsk7AGLh2PibGH77v8PRnvH2QHoXHgNAP+VIUmwss4qqR7vTaCH87i4MokLSkiTZ56T+ow= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.107) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.107 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.107; helo=BYAPR08CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YcF4O5omefIXk+Kv++dndUdKdoOlQzX9TcbZM0rxbuqC/w9FPPImO6SOH92UWtaHZ66ynYWHr/hqWPEaKNzRMCbUdNGxLRZzoVER+JtoviPNBaNhH7If+xKci7SKKsPGgYgkhRUWyfNtlt2Set8ExwTL16ZoCiUFBHf0fe8wci/BQrzrpdusDoA2oDSP8IRjsFI/QL/lpPnutf+WU637HAg4PQLyd4P7+Gjef4CNVKHt7S8BZxSORA+MIGYPjbCiLJl7PfsaOdfHlIDrJ9thEsT40TXdQvksm1mWqnAezkP2eLaZv/jOUBNe+2SQBbAFRefMI5+ejCAzlpWTjpQtmw== 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=2ZAemscrHmCDKhZ6RJ1poqZ5UjAED/22jekv/5eW7eQ=; b=s8OVYuWfKZN7KKPWRKjBKwzyaYTBVyDphvM453gsG/Jxfo7sqssPYDhYRB+AtwKnIrV375uAW7IksQ7MEiYgFdBqFy3wZa9341t5ZZ+bLx6I8VXCl00Qj1IKtzEfygfPtW420CnCSzNmxrPPcOEktXFQhCjLfaBMSy5xrMOivd4YNfZRGo4751yVI1krWsm8SSMGsbSWX0jo5mwyugz2OOiGnjKH0OiKsv/gO5C5eNndhtglsMEn4p+KZ4u1VGZvG0N62gqH182bVmgiFeFb4LKMDxo1vM1xs3a1M8EFulXOlm24jIek60nBk+1tjAGTh4HJtxIemTK1DqElKSAOFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2ZAemscrHmCDKhZ6RJ1poqZ5UjAED/22jekv/5eW7eQ=; b=mjKk8oE/VWBVx0KU3IdA0yxKAjFEcer/5adEsu7MqjuFViR7teWgqUGInzI7A969eSCRvfBG9kuEFwTQAiBPYvFRa8FtdZIqEFobbWsk7AGLh2PibGH77v8PRnvH2QHoXHgNAP+VIUmwss4qqR7vTaCH87i4MokLSkiTZ56T+ow= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Anthony PERARD , "Michal Orzel" , Julien Grall , "Stefano Stabellini" , Tamas K Lengyel Subject: [RFC PATCH v6 03/43] altp2m: Move altp2m_p2m to common domain struct Date: Mon, 20 Apr 2026 17:31:26 -0400 Message-ID: <20260420213206.208750-4-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C5:EE_|PH7PR08MB8180:EE_|CO1PEPF000066EA:EE_|LV8PR08MB9151:EE_ X-MS-Office365-Filtering-Correlation-Id: 87086589-79e7-4a65-e530-08de9f245d0d X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|36860700016|7416014|1800799024|376014|82310400026|22082099003|18002099003|56012099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?dtVa0J8+xESiURrGLwikHDuCjwQgaT3cToUdKQMbjDvUt7tvjoXm2sM6uiNy?= =?us-ascii?Q?HGrZP/m4YqzHt16JiWXrXEe0sOTsZjZsaFk+hwgEDZ6EvBotCQPKXFL4J/Ky?= =?us-ascii?Q?JrGLnEW5cRKJH9kRkrz7U+oquilFFULCzO8dyRcecodbp0iII43xqbvwciz0?= =?us-ascii?Q?uAuDfLNkBphenszh0Lj/nL0w+tnqKnoVazv7ucsiB17UjxVG+dc+9HzjRFeo?= =?us-ascii?Q?B/snrxYZ4yMDUrnkcBFzJ2KjlqUcL5g0CQ3e8vzo19EFDLM+jo2E7ctlwIlJ?= =?us-ascii?Q?Dp5qfDibTeHtrxbc4IT7bCszlJmrWeQmGVU935miZSay3rYFIt12jVbnA/St?= =?us-ascii?Q?vQKn8x9SuGBIW5N8NSQmkE28rWeyAULrNUWTV3WNvs1NzJAp752a3fHXfIzk?= =?us-ascii?Q?66nYMeGrdzVIPYYkSM6N9IBeFkB+14R6/W9SSpfLC6G1vcvq9PB2bijHryMB?= =?us-ascii?Q?YKVdCPtgJdO4mGkP2K2Kwu2z8k3Z9JETrb9eQeUXln/itxPsTYAvAcTn+rNJ?= =?us-ascii?Q?yQlBvgQabwPczOH9mX1dczqi5/dQmNSTTpRjDVBhFKipv3fh3ROBq/9EP31P?= =?us-ascii?Q?u/ilV/CMu6m1AzyF4XSbVi4FVtPxbtJMoariJEplU8bIiY09CjU2kLEXTvcM?= =?us-ascii?Q?nBziy44RXeuzzlP9LA1+sZH8lx1EZArS8hYOV+dkO/cwxdwTd8XSoVNDUIfs?= =?us-ascii?Q?pDzr+dyf4uBJ+oFP9dAGD2A8890Ud5D7d/b3QqZRjiAFJuelVKLuSmfZqIFZ?= =?us-ascii?Q?Nb4NO0Xn548wQCndkP0a1GMU0R93mM1lPXN62Udfb6N1scUuBVgnakFi9wfx?= =?us-ascii?Q?VzAEZ6lx6qj1mgLXoWcg9jr/A3DvrKiCclMGqT78yfezAW9gUW3v9XUSxzmL?= =?us-ascii?Q?CJD5dQ4Z5KO2MAn8VQBywoT6LxtEWq6cc3itKqj9vuM1lXZ0gi+GFQS0bbfj?= =?us-ascii?Q?Guv6Xn3aiOuz2VQ7CahQdP47w14yA86EhsH9uLB3A1NoRbA4eaGL1KmUC0vM?= =?us-ascii?Q?4Hsif4Cqg4AtvQzKjewi0uzZKRZ0LeV79Bio9t4uooyjy3GkDrhUmGgDTwre?= =?us-ascii?Q?qhGa7Zf73ybAZ4MGMGoLA6ogEsYsRlnFBBv6IXR/3WFhJimtRIM/KKIWTzZq?= =?us-ascii?Q?hcDjqDJaNbepexonEomP1vdm2yC2hMso6v9FWg37Snca7gGX75dRD/RsCNIV?= =?us-ascii?Q?Io6etLVDtNmMuxPvPdssRNXRoB/mFfpf61H8mWC29m5Z2RUSRnwHnghWWcJ/?= =?us-ascii?Q?VF9EzjSrBpWuxeyh91ls?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(36860700016)(7416014)(1800799024)(376014)(82310400026)(22082099003)(18002099003)(56012099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: W1si48NKmjL2upf5qmDXQZvXx6+mrLFLbhY37+yfSGjtv1lH2HSt4gj4m0ScxWb3aPVW3s++hAa76Ua2kcM2SYFPhOtQPOpnEebJ/+zn6CiDuApPYsmYfZ4c8BGBoVg6WYDfi/PysX2a4jEBwKqJQWl5jABCAgY9sQvdNKuMPD2ke8LFe0hZe1+hGMu44OQAoh0/5/2gYFOCJeXxcBtWsm1FkW1/VkO5aAHjAwKaB8fIbhJkEYnYWZKJpjg1RpLOgtMnZ0Vfvwesw/wGWxmzpgLpt2ynXucENd5udMwjzQQeh5k6FDRQ5IWkCDy2pSzaKNWWRfwMHE5/wD+k/rm2FA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR08MB8180 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.107];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.107];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CO1PEPF000066EA.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b5dc6a57-6f44-404f-e12f-08de9f24553b X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|7416014|376014|14060799003|35042699022|82310400026|156008|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?cQHJ1n0L04t/0Euq1D3D67SFd4uMZOqBtC9aDCB8xPFG/3qv1/cn4HwPzlGQ?= =?us-ascii?Q?QT7lG5v38XS18nhEvGWWElFXHHDcbjuDPxf6Vau5FB+FeYbewH0pt4QrQdni?= =?us-ascii?Q?3jRhaq6vv7tj8g7dGXBzyhw166MhuIeBKMlggrx728ufBqcy/BROx3XNH8wa?= =?us-ascii?Q?sqZfXGs2NDxU87AiFvLA40/kRhQZdbktL3oZEUkByL5htwwOj/Z7y1qpKv4b?= =?us-ascii?Q?/K+FFUcf+v4O+xOLh7DPU8EkXwVvamdNfPvhA3wJRqxgrMuwBN06U2vbuCAA?= =?us-ascii?Q?2+vf5O3JrAq3gPgGXuhBvgfFD9hTUy8Z+Y9fQgpwG0+wEtgUjiZC3gDMZAML?= =?us-ascii?Q?BmeG14Gd/SczfeW7jjDVc1//446oWiKRBt59/bvNdhWxHJIFecl/b1sH9Ikg?= =?us-ascii?Q?AEHQmhONGInfu0tEXxhjZ+9VtM4WWPaevI8ULp2SwSmM6prfBdLBYulPz3qT?= =?us-ascii?Q?NVwZy8t1vZeP4LkuDWYW4XoprT7ZfnzK640X5m0XaYh6FlkHoV1BLnM1dBX8?= =?us-ascii?Q?2zhHCbYs58KVPinve0USDkb9cT/b54/ZIrcocDS6xiJI+/FGkEDuvKzeumcU?= =?us-ascii?Q?ZA+9WFDtO8AuWjfbP8OKlX7n8zvGJZ/daTGE5lcWSstN9j+H/OXc+GcN69LK?= =?us-ascii?Q?zNMJzvqBVYx+EKeX8G0WWpZpqvbDnQPRF+VfoHVxnmV0K/fTTELmxGOOCSjB?= =?us-ascii?Q?vKFelNf55nrOwLJmmG0RTeew4EsdLLjw1f8qGOnXxlbh7Qd81Y00vtz0Aqly?= =?us-ascii?Q?6TTiHWsrDWPVAVtwdCLvqWKfE19lh6/dFA1YdxsrE/RnIwx/SrXAQ/aWZ1o4?= =?us-ascii?Q?UGtTF9liSZj6iBfqK8FWPXLcV1o3NoZHBSe0cnKn8oRH4wDxZ6O1wu/Pyr2B?= =?us-ascii?Q?V70Jbr9moTtDbN+SvGkiwUM8m+n6F+q9ifJqdOI2fbnC8HM9EdbAQuI23/ht?= =?us-ascii?Q?DTdtrQWzisaL7dCl8O2UH2QfYAGsxdweTBBmSw4snVUo75ceBx5x+wfY2Bb5?= =?us-ascii?Q?RavxewyVJNS8PUzZdiLraOb/3guOzUskbdAIWS0AcjyMcRxPcma4BS2KWpkj?= =?us-ascii?Q?qjslDMwTJRC/EFKF02reZ5Syuj1OUtMncKj/UkfZM4V6F1h6o6sdardRon++?= =?us-ascii?Q?qqSfqzD2F2z9arLFCbZQRpNJ7p3uYTuaP0UNKQ8LMRJTrt+TT+gEXpk6ZzHZ?= =?us-ascii?Q?rj4OrENE7saHdutpEUk4yQELOsmocvB8OtTP4f4gdn5OgtM1JFRyhOlvtbBM?= =?us-ascii?Q?q5+9gIHaRnFpbp6aWLnW?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR08CU003.outbound.protection.outlook.com;PTR:mail-byapr08cu00303.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(7416014)(376014)(14060799003)(35042699022)(82310400026)(156008)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +MyymflaFjgAyhQpDKMkybRTtCfZw4Qu7e0pGaYIpfhO1qZzeuA9uL5yJSoOhZphPlORpn37gstjnBRezs6/cshAbJE3UwN/RUzggUcEnqOtzNsoaBt4kJtW6w5P8bNHjcEt2G/dKbQF1KIzr60HrcuEAmkaetSgXDxcXo3zALwFpRgIYpwzUf1zHM6cJ6qezWu5M0yMDKTEn4As5sn6HppWO57xOny9ZvF7Gsq8HyG6ZjP+i/7WOZiZ9zBQaZ+cReTR06QNgZ+faustMpVhQqDi51NRAFdrsTdVtnbRVYGa1oSsxTxKYRCh48m8vIo3jgiTTRWu6X89BxtftKARW93R8kwZF/gKCcyxHW1N0L/FkkdBurrz5jNcjaxlaYQkSAmCCT3kfebLWizRxeHVED4495Ko/4ky2cOloEQe7fMyugAarsih5TjpMG6+SwG2 X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:46.1162 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 87086589-79e7-4a65-e530-08de9f245d0d X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CO1PEPF000066EA.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR08MB9151 X-purgate-ID: tlsNG-42698a/1776720775-252B9F3B-295B4CEC/0/0 X-purgate-type: clean X-purgate-size: 13310 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720798584154100 Content-Type: text/plain; charset="utf-8" Similarly to the previous commit, this commit moves altp2m_p2m to the common domain struct. The representation of altp2m views as an array of p2m_domain pointers is the same on x86 and ARM, and it seems that this would be the case for other architectures as well. This commit is a refactor, and no change in functionality is intended. This is commit 3/8 of the preparation phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/hvm/vmx/vmx.c | 2 +- xen/arch/x86/include/asm/domain.h | 1 - xen/arch/x86/include/asm/p2m.h | 4 ++-- xen/arch/x86/mm/altp2m.c | 28 ++++++++++++++-------------- xen/arch/x86/mm/hap/hap.c | 6 +++--- xen/arch/x86/mm/mem_access.c | 8 ++++---- xen/arch/x86/mm/mem_sharing.c | 2 +- xen/arch/x86/mm/p2m-ept.c | 6 +++--- xen/arch/x86/mm/p2m.c | 8 ++++---- xen/include/xen/sched.h | 1 + 10 files changed, 33 insertions(+), 33 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index ff895f7f9437..0909929c00e0 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -5004,7 +5004,7 @@ bool asmlinkage vmx_vmenter_helper(const struct cpu_u= ser_regs *regs) if ( currd->arch.altp2m_eptp[i] =3D=3D mfn_x(INVALID_MFN) ) continue; =20 - ept =3D &currd->arch.altp2m_p2m[i]->ept; + ept =3D &currd->altp2m_p2m[i]->ept; if ( cpumask_test_cpu(cpu, ept->invalidate) ) { cpumask_clear_cpu(cpu, ept->invalidate); diff --git a/xen/arch/x86/include/asm/domain.h b/xen/arch/x86/include/asm/d= omain.h index 0cf0c0d92087..f8038087e612 100644 --- a/xen/arch/x86/include/asm/domain.h +++ b/xen/arch/x86/include/asm/domain.h @@ -368,7 +368,6 @@ struct arch_domain mm_lock_t nested_p2m_lock; =20 #ifdef CONFIG_ALTP2M - struct p2m_domain **altp2m_p2m; mm_lock_t altp2m_list_lock; uint64_t *altp2m_eptp; uint64_t *altp2m_visible_eptp; diff --git a/xen/arch/x86/include/asm/p2m.h b/xen/arch/x86/include/asm/p2m.h index 3a5a5fd43c2a..ec871717a9e4 100644 --- a/xen/arch/x86/include/asm/p2m.h +++ b/xen/arch/x86/include/asm/p2m.h @@ -901,7 +901,7 @@ static inline struct p2m_domain *p2m_get_altp2m(struct = vcpu *v) =20 BUG_ON(index >=3D v->domain->nr_altp2m); =20 - return v->domain->arch.altp2m_p2m[index]; + return v->domain->altp2m_p2m[index]; } =20 /* set current alternate p2m table */ @@ -919,7 +919,7 @@ static inline bool p2m_set_altp2m(struct vcpu *v, unsig= ned int idx) atomic_dec(&orig->active_vcpus); =20 vcpu_altp2m(v).p2midx =3D idx; - atomic_inc(&v->domain->arch.altp2m_p2m[idx]->active_vcpus); + atomic_inc(&v->domain->altp2m_p2m[idx]->active_vcpus); =20 return true; } diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index 08db8f37c1b1..8dd3c0f96be0 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -130,14 +130,14 @@ int p2m_init_altp2m(struct domain *d) struct p2m_domain *hostp2m =3D p2m_get_hostp2m(d); =20 mm_lock_init(&d->arch.altp2m_list_lock); - d->arch.altp2m_p2m =3D xvzalloc_array(struct p2m_domain *, d->nr_altp2= m); + d->altp2m_p2m =3D xvzalloc_array(struct p2m_domain *, d->nr_altp2m); =20 - if ( !d->arch.altp2m_p2m ) + if ( !d->altp2m_p2m ) return -ENOMEM; =20 for ( i =3D 0; i < d->nr_altp2m; i++ ) { - d->arch.altp2m_p2m[i] =3D p2m =3D p2m_init_one(d); + d->altp2m_p2m[i] =3D p2m =3D p2m_init_one(d); if ( p2m =3D=3D NULL ) { p2m_teardown_altp2m(d); @@ -158,14 +158,14 @@ void p2m_teardown_altp2m(struct domain *d) =20 for ( i =3D 0; i < d->nr_altp2m; i++ ) { - if ( !d->arch.altp2m_p2m[i] ) + if ( !d->altp2m_p2m[i] ) continue; - p2m =3D d->arch.altp2m_p2m[i]; - d->arch.altp2m_p2m[i] =3D NULL; + p2m =3D d->altp2m_p2m[i]; + d->altp2m_p2m[i] =3D NULL; p2m_free_one(p2m); } =20 - XVFREE(d->arch.altp2m_p2m); + XVFREE(d->altp2m_p2m); } =20 int altp2m_get_effective_entry(struct p2m_domain *ap2m, gfn_t gfn, mfn_t *= mfn, @@ -325,7 +325,7 @@ static void p2m_reset_altp2m(struct domain *d, unsigned= int idx, struct p2m_domain *p2m; =20 ASSERT(idx < d->nr_altp2m); - p2m =3D d->arch.altp2m_p2m[array_index_nospec(idx, d->nr_altp2m)]; + p2m =3D d->altp2m_p2m[array_index_nospec(idx, d->nr_altp2m)]; =20 p2m_lock(p2m); =20 @@ -368,7 +368,7 @@ static int p2m_activate_altp2m(struct domain *d, unsign= ed int idx, =20 ASSERT(idx < d->nr_altp2m); =20 - p2m =3D d->arch.altp2m_p2m[array_index_nospec(idx, d->nr_altp2m)]; + p2m =3D d->altp2m_p2m[array_index_nospec(idx, d->nr_altp2m)]; hostp2m =3D p2m_get_hostp2m(d); =20 p2m_lock(p2m); @@ -468,7 +468,7 @@ int p2m_destroy_altp2m_by_id(struct domain *d, unsigned= int idx) if ( d->arch.altp2m_eptp[array_index_nospec(idx, MAX_EPTP)] !=3D mfn_x(INVALID_MFN) ) { - p2m =3D d->arch.altp2m_p2m[array_index_nospec(idx, d->nr_altp2m)]; + p2m =3D d->altp2m_p2m[array_index_nospec(idx, d->nr_altp2m)]; =20 if ( !_atomic_read(p2m->active_vcpus) ) { @@ -532,7 +532,7 @@ int p2m_change_altp2m_gfn(struct domain *d, unsigned in= t idx, return rc; =20 hp2m =3D p2m_get_hostp2m(d); - ap2m =3D d->arch.altp2m_p2m[array_index_nospec(idx, d->nr_altp2m)]; + ap2m =3D d->altp2m_p2m[array_index_nospec(idx, d->nr_altp2m)]; =20 p2m_lock(hp2m); p2m_lock(ap2m); @@ -596,7 +596,7 @@ int p2m_altp2m_propagate_change(struct domain *d, gfn_t= gfn, if ( d->arch.altp2m_eptp[i] =3D=3D mfn_x(INVALID_MFN) ) continue; =20 - p2m =3D d->arch.altp2m_p2m[i]; + p2m =3D d->altp2m_p2m[i]; =20 /* Check for a dropped page that may impact this altp2m */ if ( mfn_eq(mfn, INVALID_MFN) && @@ -679,7 +679,7 @@ int p2m_set_suppress_ve_multi(struct domain *d, return -EINVAL; =20 p2m =3D ap2m =3D - d->arch.altp2m_p2m[array_index_nospec(sve->view, d->nr_altp2m)= ]; + d->altp2m_p2m[array_index_nospec(sve->view, d->nr_altp2m)]; } =20 p2m_lock(host_p2m); @@ -746,7 +746,7 @@ int p2m_get_suppress_ve(struct domain *d, gfn_t gfn, bo= ol *suppress_ve, return -EINVAL; =20 p2m =3D ap2m =3D - d->arch.altp2m_p2m[array_index_nospec(altp2m_idx, d->nr_altp2m= )]; + d->altp2m_p2m[array_index_nospec(altp2m_idx, d->nr_altp2m)]; } else p2m =3D host_p2m; diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index 3d563b3bc2d1..6918a00a2a25 100644 --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -524,7 +524,7 @@ int hap_enable(struct domain *d, u32 mode) =20 for ( i =3D 0; i < d->nr_altp2m; i++ ) { - rv =3D p2m_alloc_table(d->arch.altp2m_p2m[i]); + rv =3D p2m_alloc_table(d->altp2m_p2m[i]); if ( rv !=3D 0 ) goto out; } @@ -548,7 +548,7 @@ void hap_final_teardown(struct domain *d) #ifdef CONFIG_ALTP2M if ( hvm_altp2m_supported() ) for ( i =3D 0; i < d->nr_altp2m; i++ ) - p2m_teardown(d->arch.altp2m_p2m[i], true, NULL); + p2m_teardown(d->altp2m_p2m[i], true, NULL); #endif =20 /* Destroy nestedp2m's first */ @@ -603,7 +603,7 @@ void hap_teardown(struct domain *d, bool *preempted) =20 for ( i =3D 0; i < d->nr_altp2m; i++ ) { - p2m_teardown(d->arch.altp2m_p2m[i], false, preempted); + p2m_teardown(d->altp2m_p2m[i], false, preempted); if ( preempted && *preempted ) return; } diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c index a9d6b081a523..e5548e64d8d0 100644 --- a/xen/arch/x86/mm/mem_access.c +++ b/xen/arch/x86/mm/mem_access.c @@ -319,7 +319,7 @@ long p2m_set_mem_access(struct domain *d, gfn_t gfn, ui= nt32_t nr, if ( !altp2m_is_eptp_valid(d, altp2m_idx) ) return -EINVAL; =20 - ap2m =3D d->arch.altp2m_p2m[array_index_nospec(altp2m_idx, d->nr_a= ltp2m)]; + ap2m =3D d->altp2m_p2m[array_index_nospec(altp2m_idx, d->nr_altp2m= )]; } #endif =20 @@ -375,7 +375,7 @@ long p2m_set_mem_access_multi(struct domain *d, if ( !altp2m_is_eptp_valid(d, altp2m_idx) ) return -EINVAL; =20 - ap2m =3D d->arch.altp2m_p2m[array_index_nospec(altp2m_idx, d->nr_a= ltp2m)]; + ap2m =3D d->altp2m_p2m[array_index_nospec(altp2m_idx, d->nr_altp2m= )]; } #endif =20 @@ -438,7 +438,7 @@ int p2m_get_mem_access(struct domain *d, gfn_t gfn, xen= mem_access_t *access, if ( !altp2m_is_eptp_valid(d, altp2m_idx) ) return -EINVAL; =20 - p2m =3D d->arch.altp2m_p2m[array_index_nospec(altp2m_idx, d->nr_al= tp2m)]; + p2m =3D d->altp2m_p2m[array_index_nospec(altp2m_idx, d->nr_altp2m)= ]; } #endif =20 @@ -457,7 +457,7 @@ void arch_p2m_set_access_required(struct domain *d, boo= l access_required) unsigned int i; for ( i =3D 0; i < d->nr_altp2m; i++ ) { - struct p2m_domain *p2m =3D d->arch.altp2m_p2m[i]; + struct p2m_domain *p2m =3D d->altp2m_p2m[i]; =20 if ( p2m ) p2m->access_required =3D access_required; diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c index 8319733b1bb6..b7d8fb9ad1aa 100644 --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -919,7 +919,7 @@ static int nominate_page(struct domain *d, gfn_t gfn, =20 for ( i =3D 0; i < d->nr_altp2m; i++ ) { - ap2m =3D d->arch.altp2m_p2m[i]; + ap2m =3D d->altp2m_p2m[i]; if ( !ap2m ) continue; =20 diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index ed850723f5fd..ddb4c7606be1 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -1311,7 +1311,7 @@ static void ept_set_ad_sync(struct domain *d, bool va= lue) if ( d->arch.altp2m_eptp[i] =3D=3D mfn_x(INVALID_MFN) ) continue; =20 - p2m =3D d->arch.altp2m_p2m[i]; + p2m =3D d->altp2m_p2m[i]; =20 p2m_lock(p2m); p2m->ept.ad =3D value; @@ -1579,7 +1579,7 @@ void __init setup_ept_dump(void) void p2m_init_altp2m_ept(struct domain *d, unsigned int i) { struct p2m_domain *p2m =3D - d->arch.altp2m_p2m[array_index_nospec(i, d->nr_altp2m)]; + d->altp2m_p2m[array_index_nospec(i, d->nr_altp2m)]; struct p2m_domain *hostp2m =3D p2m_get_hostp2m(d); struct ept_data *ept; =20 @@ -1603,7 +1603,7 @@ unsigned int p2m_find_altp2m_by_eptp(struct domain *d= , uint64_t eptp) if ( d->arch.altp2m_eptp[i] =3D=3D mfn_x(INVALID_MFN) ) continue; =20 - p2m =3D d->arch.altp2m_p2m[i]; + p2m =3D d->altp2m_p2m[i]; ept =3D &p2m->ept; =20 if ( eptp =3D=3D ept->eptp ) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 41517765c5ec..5bd426296f20 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -111,7 +111,7 @@ void p2m_change_entry_type_global(struct domain *d, { if ( d->arch.altp2m_eptp[i] !=3D mfn_x(INVALID_MFN) ) { - struct p2m_domain *altp2m =3D d->arch.altp2m_p2m[i]; + struct p2m_domain *altp2m =3D d->altp2m_p2m[i]; =20 p2m_lock(altp2m); change_entry_type_global(altp2m, ot, nt); @@ -157,7 +157,7 @@ bool p2m_memory_type_changed(struct domain *d) { if ( d->arch.altp2m_eptp[i] !=3D mfn_x(INVALID_MFN) ) { - struct p2m_domain *altp2m =3D d->arch.altp2m_p2m[i]; + struct p2m_domain *altp2m =3D d->altp2m_p2m[i]; =20 p2m_lock(altp2m); _memory_type_changed(altp2m); @@ -955,7 +955,7 @@ void p2m_change_type_range(struct domain *d, { if ( d->arch.altp2m_eptp[i] !=3D mfn_x(INVALID_MFN) ) { - struct p2m_domain *altp2m =3D d->arch.altp2m_p2m[i]; + struct p2m_domain *altp2m =3D d->altp2m_p2m[i]; =20 p2m_lock(altp2m); change_type_range(altp2m, start, end, ot, nt); @@ -1031,7 +1031,7 @@ int p2m_finish_type_change(struct domain *d, { if ( d->arch.altp2m_eptp[i] !=3D mfn_x(INVALID_MFN) ) { - struct p2m_domain *altp2m =3D d->arch.altp2m_p2m[i]; + struct p2m_domain *altp2m =3D d->altp2m_p2m[i]; =20 p2m_lock(altp2m); rc =3D finish_type_change(altp2m, first_gfn, max_nr); diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 458f2f260dd7..5d8ba2d2ab19 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -626,6 +626,7 @@ struct domain /* altp2m: allow multiple copies of host p2m */ bool altp2m_active; unsigned int nr_altp2m; /* Number of altp2m tables. */ + struct p2m_domain **altp2m_p2m; #endif =20 #ifdef CONFIG_VMTRACE --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720796; cv=pass; d=zohomail.com; s=zohoarc; b=Bv+p0du/xWwmAtEyKs5cU1aHnkiuRDkmI6h0ujhotEbiNrCHQMrTAmYl0gxFNLnM9QUTLrK8F2yoWLwdWoTy0c2WludkoqWSHYwFp1H1wbIHm6ucdAyTJPlmNYaHvTgBYykXSZdjnfVZ/8lqQqyr43q/PYyL1lTFvs6wFnpJz2M= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720796; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=HCpfUimCCQkOtqeuUzULZSjqPkZv/1OumHTvfODlnj8=; b=WPEtmFVzWQ34/PmZLDHqqct6uDKOyTNh57kBXSHII/yM+xxr1fVr/At4oeqdkGw0PXZthqPi95TH7k6SP7FFn1Dl2lrFI6wilYqJNOAj8ktmBRaOTndliV9nSSKKDcsGoU2LBYne971FYjmVKdYw5zCTDJB8xUCHv8HjMg/LXmg= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720796095961.6622323658328; Mon, 20 Apr 2026 14:33:16 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287751.1568134 (Exim 4.92) (envelope-from ) id 1wEwEd-0007HK-UT; Mon, 20 Apr 2026 21:32:51 +0000 Received: by outflank-mailman (output) from mailman id 1287751.1568134; Mon, 20 Apr 2026 21:32:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEd-0007HB-PE; Mon, 20 Apr 2026 21:32:51 +0000 Received: by outflank-mailman (input) for mailman id 1287751; Mon, 20 Apr 2026 21:32:50 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEc-0007Fm-BI for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:32:50 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEb-00CD1J-O7 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:32:49 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b6b-2eae-0a2a0a5409dd-0a2a450289b2-26 for ; Mon, 20 Apr 2026 23:32:49 +0200 Received: from [40.93.195.106] (helo=SN4PR2101CU001.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b80-af86-0a2a45020019-285dc36a4869-4 for ; Mon, 20 Apr 2026 23:32:49 +0200 Received: from BL1P221CA0040.NAMP221.PROD.OUTLOOK.COM (2603:10b6:208:5b5::15) by LV3PR08MB10562.namprd08.prod.outlook.com (2603:10b6:408:280::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:43 +0000 Received: from BN2PEPF00004FBE.namprd04.prod.outlook.com (2603:10b6:208:5b5:cafe::b2) by BL1P221CA0040.outlook.office365.com (2603:10b6:208:5b5::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:41 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BN2PEPF00004FBE.mail.protection.outlook.com (10.167.243.184) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:41 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzGw2lKzz1wdP; Mon, 20 Apr 2026 14:32:40 -0700 (PDT) Received: from BL0PR07CU001.outbound.protection.outlook.com (mail-bl0pr07cu00107.outbound.protection.outlook.com [40.93.4.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:40 -0700 (PDT) Received: from SJ0PR05CA0148.namprd05.prod.outlook.com (2603:10b6:a03:33d::33) by BY1PR08MB8648.namprd08.prod.outlook.com (2603:10b6:a03:52c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:32:34 +0000 Received: from SJ1PEPF000026C5.namprd04.prod.outlook.com (2603:10b6:a03:33d:cafe::e) by SJ0PR05CA0148.outlook.office365.com (2603:10b6:a03:33d::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:34 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C5.mail.protection.outlook.com (10.167.244.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:34 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:30 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=rlbQ49LaJI6rkxKrc2sEJbiXaFzTCLpuOqr+GQtf5oVDFrTQhQTBYqpE9MrbfrbzmgIvQSH51OGkPOJ+1W/bwF3rOMaIagAWSQ5l2OLYXWOzM263yfY4XWCKfhIy2uwKCDIUr0EbzMS5yyGenE7Y+EexRNmBR1M8cQFiwn/4G6/Gw/zT+TXQhx8NkiuJgJ3pFjwNJIJkS18RDbkSVFAghUB47oxfvdzprDGKZevCWJypa6bo5oLC6g/t8Tmpyf3X5/B0MS9TKlGeM76TkJZ3pCo4y+Sqqj00VFdqRBhmnLe95FjShKEpwWT/Dn9h9e+VtGU8d88cllrRj9w8hCoXzA== ARC-Message-Signature: i=2; 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=HCpfUimCCQkOtqeuUzULZSjqPkZv/1OumHTvfODlnj8=; b=rlpxTKSP8g2kUSUm9s9gWhjpSncW22WR+cdmNu6OzJa4tqg9t1tiyTjY/L5G9+XLitTyvbw/p/PM94GH+h62GQl1LU9YHYsiM79BriyBZRA2rABp2SxxbiHzBEVqVZN6Ju6CvqpzhaYpZ6/TGlyFzLapuyAznIW9Z1xDjCiwLz2CZZyR//CuIDgR/Qaimm0988jBZpghBnNslbNCM932PEOn//zjRc/eU7yKDYHPbBIZVtvHqYm8/oj53bKpIaXYnQjlfSw+ZZpPc/YP4W2PA3mT4BKKHO/nVyL/e7EVbyZXj2tkXd4O1clp95DsqjlNuXpGEpnIrK37I8JAZRJPCg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.4.7) smtp.rcpttodomain=citrix.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HCpfUimCCQkOtqeuUzULZSjqPkZv/1OumHTvfODlnj8=; b=jeu0OhaoCf+q0bPqxLVpXaxi6HaMGWyowygsgrWZXaFp63l4FP/0WfV7jJk9G8xQS7Q5+N0LG5iSTmhCemlgX+R6m9k2j13/Cx5/Jqkq0Nr8c16BgJe9BkFxoSDmXwb+T0OUXuaHTNHKIdivaBITiG/JNWigxvzeEN5wnjX9GqE= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.4.7) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.4.7 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.4.7; helo=BL0PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Wt01L8HO9pSI/wszbQ9PN1DPynGos8sTvg8NIWObebQRB+b3qPN0AmZnNRd6oDtJiTCQeRqo1yFCKGJEIqr/9QhM06FFqIwrfMW4JjmHXYHVOfvQyMhjitLtWdQfsRm484HwTTncQuCpo1VI6pKHdzAYH/RlTArWjzSSwCLXsb10eCd+shFmOAXjYNPL9x1682t4psBO/3Y4UMr8ay8qGL/LZYIfEX05b0cF8RYAhcJK98YGVQrJf+EZ6CGv8XIMx7JDYzONg/aKeTM+uZ+XNF+02T/Zv14REv3KCxThkuGlWZCvtYXcldWAL9oDeQbLgb6zUOFdPvcjZ8VzarijfA== 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=HCpfUimCCQkOtqeuUzULZSjqPkZv/1OumHTvfODlnj8=; b=ixi9DsRK715nH4YVMvb54YugxVKb1eY39tHFhm2fr9F7sQUry6xJ/Mp9bl0zDGJysbOpzjfCarLb68OWgSzTVUDt20yY4Ldqp6lFwxFEN0XB5qMSzo8Wxy1hnbtq4ccy57fkjglEo339HWH7dfLd6+1GRNrDhnpygvDL1oyu082wsD+NbnsMZlJNWg4OSrQkkx0bU7xGd0uo8vnJJTr3ZBMPZDclrB9er0FydUjgFvR5xlikYSbi5AhB2oarMLf8KPSAcPECdQ5YH98xEfHJh4QDy1NyI/dO1iwExqdOIuNYcmqHB+MMtxV91pxWYQSoE3LzXUsxmMFqfV8R6iLw2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HCpfUimCCQkOtqeuUzULZSjqPkZv/1OumHTvfODlnj8=; b=jeu0OhaoCf+q0bPqxLVpXaxi6HaMGWyowygsgrWZXaFp63l4FP/0WfV7jJk9G8xQS7Q5+N0LG5iSTmhCemlgX+R6m9k2j13/Cx5/Jqkq0Nr8c16BgJe9BkFxoSDmXwb+T0OUXuaHTNHKIdivaBITiG/JNWigxvzeEN5wnjX9GqE= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie Subject: [RFC PATCH v6 04/43] x86/altp2m: Rename hvm_altp2m_supported to altp2m_supported Date: Mon, 20 Apr 2026 17:31:27 -0400 Message-ID: <20260420213206.208750-5-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C5:EE_|BY1PR08MB8648:EE_|BN2PEPF00004FBE:EE_|LV3PR08MB10562:EE_ X-MS-Office365-Filtering-Correlation-Id: 9553204c-2db9-4b80-569a-08de9f245a4a X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704161311799003|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?8M3rLOVpK7O0IptY1TqlQZwHn1PJi/9JX0xizO+TyQ44h1BkprxEybksccce?= =?us-ascii?Q?95DUBbr9AID5SZcBKXl/04D/nxg1nAzmMrfj/YImFDEY+rmpYFPLEKezn6sQ?= =?us-ascii?Q?aaiIySnidovQzEHWPWWmcEXaqRS6uBRxUpAo10bSgUUEED52ZvBNWLw/34fR?= =?us-ascii?Q?BOi/RhFiTM6cU+Ta1mvyWnUFxTeLEAqMYgmk9A6+SA3q4eyr6zJWHKkmQagJ?= =?us-ascii?Q?K2LSJGqDYQDjVVpwjbqAJWXe1pKeWD+Rx+9LzGweWAJDPZ5f6ZgtHNDGdrrk?= =?us-ascii?Q?DxOggOVexNCzCEFY80kmRBmKsJd0trS1Msf7lyt8WTEe5uRQvBuyacrhZ9Sb?= =?us-ascii?Q?6SScMZ4mOqwzg6/nl4/bDpEQ+bjQQxb/OwnZA4TyY8ikpUv5zA3QcKFVyElU?= =?us-ascii?Q?JhDPwGFBzNrkL8ATRCOuoqk80AoWZDFfeQiKKj8iYQE2/ni1GSl6yNhnXk/m?= =?us-ascii?Q?PRTYyOwfPEUq1fYtSeNoLChYRoEo+XEJhygJqP01DDw0A2tivzv2oUPWbpnM?= =?us-ascii?Q?p/MHu44/tqEIAZntefxZ8XzpFkIvYQJgeZyBJdi6ZKJRW/8qlhIUQn3AOhhl?= =?us-ascii?Q?904dsNDebdaYIUZL0xhwAMEyB7OoxZiHiuHXNhF/6ZC5DspUSxTZ59BVMcQU?= =?us-ascii?Q?jjY2ygL/rKXNq92e11VrzOB21l077ppGrUbu0nk0Jy9oqBZzMBBwhGN3ATPR?= =?us-ascii?Q?PfqnQ7GxtJFgvmiwEJgJP0yBl6n9sfuPoJW1PU3e2AvV8m/ZEsQktJ2Buk6h?= =?us-ascii?Q?yqLyJo5ms4nN3L7h0lX6pklJAzWrlrbXK1AOQilZ+a93O5t3Z4G0sKli0F4Z?= =?us-ascii?Q?cPxCrr5OWHswQfqWZkNFB2Ph3pDRP4N7Ql3TcW/A05TgZUwjSyG5ve8+fhVp?= =?us-ascii?Q?y7qZnWel2ascY7RmjrI6y1gEW33l72fs76nb8EWVEWx0ImA0qniECFjmda5X?= =?us-ascii?Q?BEUNoXoNKLRID5QwY3puQKMQARe/ywGg0SXpUCi8RipTIKD22tyc7HKqL7ca?= =?us-ascii?Q?WVtS7KpUpvDpnnnJfJQ36KOIaaoyrxnuV4u7Qe1ZwV7ZrMzXd29Y4uXpEx5v?= =?us-ascii?Q?RSIGoITs90nlTLKmuWpJ9r3HGorNF/FUo/JYdjV9L/nCZqv76GdzYeYPWMBo?= =?us-ascii?Q?2VnlYCLv3sRB69UfKhTI4W4vTVh6947/uwmnDHsHme9ffQQcvMxRHhqXcOQr?= =?us-ascii?Q?b7mBef5tmQuUXDvTEpTo49z5h1rMugJa0fj5LNm3eg/eOVe6iHlb+ka535Y?= =?us-ascii?Q?=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704161311799003)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: Gq9OKQaEsJfEbY/UJBAGGxzhXztRrX12uy6oh14k9wZCH2hli+gEqrrUnw0TTWxDYbtewsLkOxfUdh0eI26VmpH8yMQ014ZhHf3t9wfozEaeVMSr6KaDCZYZ8FEF9kx/yFu3P2ceRs9ppv2R8q3wquFCV1jRwCiriogtmwWiYEpK/KcRYYxB5nFhvJcwIbdH0JL+7vOubrTE4D7Akytd8czld6qwH/Du17dLUx4+w1AXMEAwDbby1r056Z4Z6j15GX62RgJHRh+wjwwIx9pg74Bvs1C5N2EroqPzmanvfGlLPGaKEVJv24otuKz5/LriLax7ZkkiRgpNegoaLLosGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR08MB8648 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.4.7];domain=BL0PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.4.7];domain=BL0PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN2PEPF00004FBE.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ccea4e16-5152-426a-4fe8-08de9f245632 X-Microsoft-Antispam: BCL:0;ARA:13230040|704161311799003|156008|376014|36860700016|1800799024|35042699022|82310400026|14060799003|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?gRR7I+ABSdZi35XFXcIpBxxFcpeZTRZPy4LD+7zup0pbVCqHs9ly0mwZ338e?= =?us-ascii?Q?OLxlZSfOu/dIa5HnfjS92g6hrNGotvudP3Azhz9dBt0mUCc3+KxMVI4M2n5s?= =?us-ascii?Q?wBTs3fy5qcPbadrjaJ9Vz9vTHRbQXipUZMoWFunFm5sRnoXZK9wVBvqPNXnN?= =?us-ascii?Q?KoR99wVSWE3+Xexty4B8I1HCI7PIVzLWVlcMsJYS75sNFBWRSXcvkJ9u81I7?= =?us-ascii?Q?LW+AZBVWcefHspOYiMla5VbajPotq4VZlLGX4ye23z6HT8fIOUmkpsLdhP37?= =?us-ascii?Q?5ksoxr9HieIsanyCG/LTOA/U7r38zpN0LxY+QEug814+oS5iyBD7F6L7Osly?= =?us-ascii?Q?EkoE4j4lAE6clPmhJl2JBYRSgoBidW2j5IovKiLZFzdIoSimuY/DiZUAcmrK?= =?us-ascii?Q?hol8nfSPZlMvai+znf6xNpHmXx2Zy2HOzd6p/KCLcPzADVgeEM8ldGhLG/Lv?= =?us-ascii?Q?DOzybVJkFMpvdXvXpEoMXe0v8sFHRK9sP4aPd0STQ+ZFuka39cuwFm9c+fRF?= =?us-ascii?Q?iDhXYpipjRQy9nObwIYsdFN3RkmT+HQQUCCp2tZJ36hEw6wLV6129B8MwCpc?= =?us-ascii?Q?aHi+Mn4ZqVsbXdI/AxmE+KXwnoW8PqPkGUgDIp2zehgITk//BWPeELX0Fhn8?= =?us-ascii?Q?Ro8wSe1iw/N9lFhnCyDjJbISgC7bEYX3vbWnIfDaCmBJ1w6qB0Xfmd5RKCwR?= =?us-ascii?Q?DlLSvSZmEue2HXtiPRN+5kVf4pEpiqfc2h2YYoxEnIv+mRI+/l2nYcet/5Ws?= =?us-ascii?Q?OYAomSA9TCJQn0WFl9IVU9HisRTFv1egj7dM0Y2cix4Pk2mjeM6jBl1fG2p0?= =?us-ascii?Q?Ln5wl8XqzSZ8J8Np7Qel/7avJ7WmMawD2bie8LffKJhSWvOwCrbJPBaQIWX9?= =?us-ascii?Q?cIPZpxjMGJA5CDSc0j+V2jYdUGrG6i+iNrn3Z9sCatFBmqYmtqIuV5yK7jz4?= =?us-ascii?Q?Z1VY8828VK9yF4zK+ieORPANcezTgxqc1bmzdC099zpz4yc7Zj80RrdU4tGD?= =?us-ascii?Q?FOM57pf2pXkjVc8890e8P/xJmMdFWo8mh+PCD6Pgsug6pNrZ6N2o+L3AefP2?= =?us-ascii?Q?d+GA+elurRTCeUDr+KXYB/vnGKtW808ZyTdzHeZ6NzWIvUtKfoleGNdU2pO4?= =?us-ascii?Q?TAT89z9XYX54qVy9f4pCxZO49pWOoAVx9Z9UHaiNDGRmyZ+0l161tynxFdlc?= =?us-ascii?Q?fhkA+skCtCx0oVoAdKozUpTgsqNqtSnJOI21TxOfMenZYqI22NaQAeXyeiU?= =?us-ascii?Q?=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR07CU001.outbound.protection.outlook.com;PTR:mail-bl0pr07cu00107.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704161311799003)(156008)(376014)(36860700016)(1800799024)(35042699022)(82310400026)(14060799003)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nO2vQnDj+g67qkhl/vnsVjDzGEh4mUtED4k6uTv2NSfQlaLYZA8sUy3daxzJ2p6+U5517okDGSwxEcwlYpWbsV5ZYCyO4Rhaj25tnDK3kXnkcoIDTWOLKjgLtIPzR/O1dRpZycQA1FrIAP4Ume2J7CaOQIsihsxZ2W9IB2NzrM0xdNiMTt0FOqBVsghIVZOxX8+NLrfCNweC9yTRqgtLf0CVFyrfb6e6YcdU3etxVkvS65CouF3CYZrrPB9hrrbgYMb7ghhZZy9S0BvS9sjqo31a22Fll2DWqBYbp6Dtc8o8pRJoPSatkbfxsTgd2b3uixhFQK+DA0npfzN49ix0z6GI1ikD+IvSiZRUpaYSbma1Yapve9jlprMs7oMV3Yhub7kXanlSKsPDP/Cpqg/0OqlyP5215w24uMZPQcPajdUyz4dDVElrsgtLwi8ulxPn X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:41.2309 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9553204c-2db9-4b80-569a-08de9f245a4a X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN2PEPF00004FBE.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR08MB10562 X-purgate-ID: tlsNG-720697/1776720769-8336C161-4E52AD19/0/0 X-purgate-type: clean X-purgate-size: 5417 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720797216158500 Content-Type: text/plain; charset="utf-8" Using a generic name for altp2m_supported makes it possible to indicate whether altp2m is supported on other architectures as well. Even if other architectures always support altp2m at a hardware level (like ARM), altp2m might not be supported due to CONFIG_ALTP2M being disabled. Therefore, the altp2m_supported function can be implemented on all architectures to indicate if the hardware supports altp2m *and* if CONFIG_ALTP2M is enabled. This is commit 4/8 of the preparation phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/domain.c | 2 +- xen/arch/x86/hvm/hvm.c | 6 +++--- xen/arch/x86/include/asm/hvm/hvm.h | 4 ++-- xen/arch/x86/mm/hap/hap.c | 6 +++--- xen/arch/x86/mm/p2m-basic.c | 4 ++-- xen/arch/x86/mm/p2m-ept.c | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 1d458f1372e5..512b18d4010f 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -698,7 +698,7 @@ int arch_sanitise_domain_config(struct xen_domctl_creat= edomain *config) =20 if ( altp2m_mode ) { - if ( !hvm_altp2m_supported() ) + if ( !altp2m_supported() ) { dprintk(XENLOG_INFO, "altp2m is not supported\n"); return -EINVAL; diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 86c12c0d1ef4..bc35efdf2c02 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1692,7 +1692,7 @@ void hvm_vcpu_destroy(struct vcpu *v) =20 ioreq_server_remove_vcpu_all(v->domain, v); =20 - if ( hvm_altp2m_supported() ) + if ( altp2m_supported() ) altp2m_vcpu_destroy(v); =20 nestedhvm_vcpu_destroy(v); @@ -4566,7 +4566,7 @@ static int do_altp2m_op( int rc =3D 0; uint64_t mode; =20 - if ( !hvm_altp2m_supported() ) + if ( !altp2m_supported() ) return -EOPNOTSUPP; =20 if ( copy_from_guest(&a, arg, 1) ) @@ -4965,7 +4965,7 @@ static int compat_altp2m_op( struct xen_hvm_altp2m_op *altp2m_op; } nat; =20 - if ( !hvm_altp2m_supported() ) + if ( !altp2m_supported() ) return -EOPNOTSUPP; =20 if ( copy_from_guest(&a, arg, 1) ) diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/= hvm/hvm.h index e7c1364802f8..6406bb687718 100644 --- a/xen/arch/x86/include/asm/hvm/hvm.h +++ b/xen/arch/x86/include/asm/hvm/hvm.h @@ -702,7 +702,7 @@ static inline bool hvm_hap_supported(void) } =20 /* returns true if hardware supports alternate p2m's */ -static inline bool hvm_altp2m_supported(void) +static inline bool altp2m_supported(void) { return IS_ENABLED(CONFIG_ALTP2M) && hvm_funcs.caps.altp2m; } @@ -876,7 +876,7 @@ static inline bool hvm_hap_supported(void) return false; } =20 -static inline bool hvm_altp2m_supported(void) +static inline bool altp2m_supported(void) { return false; } diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index 6918a00a2a25..563eba3c0d36 100644 --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -501,7 +501,7 @@ int hap_enable(struct domain *d, u32 mode) } =20 #ifdef CONFIG_ALTP2M - if ( hvm_altp2m_supported() ) + if ( altp2m_supported() ) { /* Init alternate p2m data */ if ( (d->arch.altp2m_eptp =3D alloc_xenheap_page()) =3D=3D NULL ) @@ -546,7 +546,7 @@ void hap_final_teardown(struct domain *d) unsigned int i; =20 #ifdef CONFIG_ALTP2M - if ( hvm_altp2m_supported() ) + if ( altp2m_supported() ) for ( i =3D 0; i < d->nr_altp2m; i++ ) p2m_teardown(d->altp2m_p2m[i], true, NULL); #endif @@ -590,7 +590,7 @@ void hap_teardown(struct domain *d, bool *preempted) =20 #ifdef CONFIG_ALTP2M /* Leave the root pt in case we get further attempts to modify the p2m= . */ - if ( hvm_altp2m_supported() ) + if ( altp2m_supported() ) { if ( altp2m_active(d) ) for_each_vcpu ( d, v ) diff --git a/xen/arch/x86/mm/p2m-basic.c b/xen/arch/x86/mm/p2m-basic.c index e126fda26760..ce14066fedaf 100644 --- a/xen/arch/x86/mm/p2m-basic.c +++ b/xen/arch/x86/mm/p2m-basic.c @@ -128,7 +128,7 @@ int p2m_init(struct domain *d) return rc; } =20 - rc =3D hvm_altp2m_supported() ? p2m_init_altp2m(d) : 0; + rc =3D altp2m_supported() ? p2m_init_altp2m(d) : 0; if ( rc ) { p2m_teardown_hostp2m(d); @@ -197,7 +197,7 @@ void p2m_final_teardown(struct domain *d) { if ( is_hvm_domain(d) ) { - if ( hvm_altp2m_supported() ) + if ( altp2m_supported() ) p2m_teardown_altp2m(d); /* * We must tear down nestedp2m unconditionally because diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index ddb4c7606be1..84159198f3a0 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -995,7 +995,7 @@ out: if ( is_epte_present(&old_entry) ) ept_free_entry(p2m, &old_entry, target); =20 - if ( hvm_altp2m_supported() && entry_written && p2m_is_hostp2m(p2m) ) + if ( altp2m_supported() && entry_written && p2m_is_hostp2m(p2m) ) { ret =3D p2m_altp2m_propagate_change(d, _gfn(gfn), mfn, order, p2mt= , p2ma); if ( !rc ) --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720782; cv=pass; d=zohomail.com; s=zohoarc; b=hZnwIAttzvSD/Y2+2jYoN2xhmPdwxkhvk4xV3BP9J365xsqouSDXkpImdEE6U4x0b8IEs83tmeU71k3ee40uDGBkU2eEJ65AIPC8uUVPJQshVdsFSGpxYZQc467h5omzxksZ0gpEi7Vz0BV0IwWjU5AHa87gpI5MIbF6VThZ2jk= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720782; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9p9JopnflYJnPfdpu0O1EcjHiZAqSeSW4TS/vKusOYI=; b=F004phpgfhHMnxhotdAJMMjAF92Hz7+UIJ+LWLQHlgP7gVd+XFgBotPvn+Ja1B6dzg3AumNpZPc5T1cRf0iKPI8dD48pXTiK7qqthVHuxMxSAgg6OqFXJuJz8o/fnEtoVh/5c/5SDUCzQAw+kNfLOcS+lDCfIgS08+kfKWud/Os= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720782786715.1695857840604; Mon, 20 Apr 2026 14:33:02 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287750.1568123 (Exim 4.92) (envelope-from ) id 1wEwEa-00071z-JM; Mon, 20 Apr 2026 21:32:48 +0000 Received: by outflank-mailman (output) from mailman id 1287750.1568123; Mon, 20 Apr 2026 21:32:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEa-00071q-Gl; Mon, 20 Apr 2026 21:32:48 +0000 Received: by outflank-mailman (input) for mailman id 1287750; Mon, 20 Apr 2026 21:32:47 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEZ-00071J-GV for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:32:47 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEY-00Eg4Z-TC for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:32:46 +0200 Received: from [10.42.69.1] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b5b-e002-0a2a0a5209dd-0a2a450184ac-24 for ; Mon, 20 Apr 2026 23:32:46 +0200 Received: from [52.101.43.83] (helo=SJ2PR03CU001.outbound.protection.outlook.com) by tlsNG-d62444.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b7d-c1f2-0a2a45010019-34652b532e3f-3 for ; Mon, 20 Apr 2026 23:32:46 +0200 Received: from DM6PR02CA0124.namprd02.prod.outlook.com (2603:10b6:5:1b4::26) by SA1PR08MB7648.namprd08.prod.outlook.com (2603:10b6:806:1f7::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:41 +0000 Received: from SA2PEPF000015CB.namprd03.prod.outlook.com (2603:10b6:5:1b4:cafe::fe) by DM6PR02CA0124.outlook.office365.com (2603:10b6:5:1b4::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:40 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SA2PEPF000015CB.mail.protection.outlook.com (10.167.241.201) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:40 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzGv527Gz1wdM; Mon, 20 Apr 2026 14:32:39 -0700 (PDT) Received: from BYAPR08CU003.outbound.protection.outlook.com (mail-byapr08cu00300.outbound.protection.outlook.com [40.93.1.104]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:39 -0700 (PDT) Received: from SJ0PR05CA0130.namprd05.prod.outlook.com (2603:10b6:a03:33d::15) by CYXPR08MB9264.namprd08.prod.outlook.com (2603:10b6:930:d9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:32:35 +0000 Received: from SJ1PEPF000026C5.namprd04.prod.outlook.com (2603:10b6:a03:33d:cafe::a1) by SJ0PR05CA0130.outlook.office365.com (2603:10b6:a03:33d::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:35 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C5.mail.protection.outlook.com (10.167.244.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:35 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:32 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=QdjSeA68MxPOKb1Ita6nVIfnQ3kZC43XRdwWzmtlCotpewe/4FjhnhJh7XeoyLgvKlDEVw7ZAHxfGTZn3XydBJt4oByCvmX/mvPYkSdepoag5219nbpBwKXcmtqEOgDG04GXJ+iUvNm11gtyZ7XprrSyIE1S28MF3uqEspO6s4zSCI3th6ZEtN5RWMYbB58/ZSQNz1v2hYxSMYHHQb828a5xTRcfNB+XbycYuMNOzXUiUjip+lizlqA7MDKOWJVv/lLFPSeNzvSwPTS4KChQqNl7LQvG9mQJtL5MaEIKe0Z9Xx0NhIDMKkCNzx3oZ4gC3QRHuw3v7XSLsZl0vhDCjw== ARC-Message-Signature: i=2; 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=9p9JopnflYJnPfdpu0O1EcjHiZAqSeSW4TS/vKusOYI=; b=JgNbQOOH0xIdi5fx+MKboRB+ui+9rZvo76x+Vig/W8/8GW8k1TzoP5cIwWEZnKwREMFGeAHLihZhY/neYbNswirY7TB2gLf6e/XHxzOhDCkQbWUklokeuqmHpgd9OkZVBq46VxwbadoL13oW2Y06xptDK6cKLGx1c/ZGn94syBdH64OdEqaAhqP4+VwL5DerdLv0V46I0zQ78gu25TIhOGi+RmPNn+MWPouufbww2+fQ2ESxYZ2qkQuEHYUV1GuVpTOi9FcVasVDtFI6gyS0XKPUvmH9TzPcjMJfyu1DbZRwYY30FCs4hFf3v3Fbf2H8zZsDYyv8wATUj63etk8S/w== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.104) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9p9JopnflYJnPfdpu0O1EcjHiZAqSeSW4TS/vKusOYI=; b=SDJhjnRTU2iV8yMZrbYFjgT/IufbPdW+nMVqEYOMoR+xJyQbDk1QLgx6HwbtaVVDgakSA+gFnDkic2hyujWobgZtTvcziaaiuLlxS2PZzr1GVJzwM3zkVayt3GhVI6wyTRh8pjFz4d+teX0YGrK2yurBUoO20ZHjiyqXtyDn9wY= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.104) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.104 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.104; helo=BYAPR08CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X1UfyeHo8DrkFwD+fCG3AA/0efN+0LgFSmjaP14pXyw3XRZp8xOX4uTL8ZQdQyKyIJUO68/Tks87Jzm4aBCd+Up8PS5PllUWB6LTXxjV9k2jS6NJuYALHwHMjh+S4fbBlzmLBae89mb/jGMDKJlMG7v/9UR2rnTaxYS+VE+Ep23MKqdcv6DZ38ir45LwWC3XAc6o1hZzg8P3GHJQwnDoeuiYvkWinJMft5M91683udOgynoFQBgsv2TzKFiCIBlZ0Nh6EDacdOeU2MTaLn/N9s3eaB+AN4nsFEs91NVAOeXFMO1NUIdmoiFoL+td20BedE1yTx359dYXG833cJCyCw== 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=9p9JopnflYJnPfdpu0O1EcjHiZAqSeSW4TS/vKusOYI=; b=ss+x0oIIpF8ialTH1Ey6qw18chedtggedhDAh731GL7V9j3DIdSqa7A2PXs30C406YDn21MfMXFxeeAl/rnPnSgAH1768AtlrxHCN5PVPTXyYvlk3izZ6FfrOUJ4hNgkD+YJQiJOXR2K8LxMzwP+fTAUvILw/7xKniSbuoTTQSe6kO+jKLbCOFLbgdx6nE5ylTPRkemtrZgtH9SiTL1KWeL46J9BhGoDfmOdulvYYAbMcd8FLnxoSl8020QnrBfb2tFgNs1MebrR4Ln0dvDT6KVhQyGH2NyWu9YJIRNTD8woBBwmQ/xaQMLZm3ztF49AgZyevbA6s/g8sb29xkvhxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9p9JopnflYJnPfdpu0O1EcjHiZAqSeSW4TS/vKusOYI=; b=SDJhjnRTU2iV8yMZrbYFjgT/IufbPdW+nMVqEYOMoR+xJyQbDk1QLgx6HwbtaVVDgakSA+gFnDkic2hyujWobgZtTvcziaaiuLlxS2PZzr1GVJzwM3zkVayt3GhVI6wyTRh8pjFz4d+teX0YGrK2yurBUoO20ZHjiyqXtyDn9wY= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Anthony PERARD , "Michal Orzel" , Julien Grall , "Stefano Stabellini" Subject: [RFC PATCH v6 05/43] altp2m: Move altp2m_supported to arch header Date: Mon, 20 Apr 2026 17:31:28 -0400 Message-ID: <20260420213206.208750-6-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C5:EE_|CYXPR08MB9264:EE_|SA2PEPF000015CB:EE_|SA1PR08MB7648:EE_ X-MS-Office365-Filtering-Correlation-Id: 210e971f-44bf-4afa-497e-08de9f2459d6 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704160111799003|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?YapjJFlISmGKZSgy66PgR8woel+nzRZbrM7o4nDimuIp1bZ0opNJOk9UxYeY?= =?us-ascii?Q?nSTngINNY1cTzI1EjbWeobPK8ZjHZpxcIJz+I1GRfdbs8ndK0UmTzHsmllRw?= =?us-ascii?Q?M8wzxZTQRdghjaCoxxAhOGavk5oRyjUdCZ+4BjP73uMTqcS2ac0FDKQQU93k?= =?us-ascii?Q?9KPfT7IhBmuUqfZHgcVwr2A0WRMNr4973kiDxSOnZtcd4kcdkYN1z7eHTqcv?= =?us-ascii?Q?5gPv/GXOJiiL9oCFf0/HfXV4cboAaX4xtiJwF9XtLl1iDtdMiRD/W4O77r0K?= =?us-ascii?Q?7wJ2GyLeqMEaURGGUIKLGiiidOIaKZoN6oHBPyp7olp/LucsDjTkiS6Mx3hr?= =?us-ascii?Q?YLSzmykD1ULaMcljBubvK9hs8pGCf8skPBIjR6YeUinO9rCi6dFKY+10ndbs?= =?us-ascii?Q?rp3NHeR1MzAQT58qxN9EaRIkv8uIlgeEtD91aYJQu5E2RZa5pl1ciXyI/Tof?= =?us-ascii?Q?XOCMe8GwgSMW51h10ZbE3xCwg/4Evazd4ld2Sn2xeb3j5671zhjHDZ+ZiOMO?= =?us-ascii?Q?4ThU6B9XImcR6eK7pykSP/vfz/Kll0UQsh/zg07tuxhbO4xEuLQFdXtrBMs7?= =?us-ascii?Q?wtv0KKXnLIJxfm3g8GrZji2bKWtF/5Z5ldI0IpXyMSWCrqz1kvs6XpMmctCj?= =?us-ascii?Q?MOqCnHKThJxCdXuE9UaM1SBwThdCRVKishPXjv6FnHACw9eYsHUormkezxj8?= =?us-ascii?Q?e169VtH0mBwnFI+8pFvNHRdVAp9Xt+FRc5bhraneQJK5+vBLwXoo4Xpjj/61?= =?us-ascii?Q?2TZpo34dBJaOCeLn8+GQQ0IGn95Cu3/bNYT8MBXbSLVSmlHrD7sGXh8g2/Ji?= =?us-ascii?Q?T3KUoZZeseDspjKhU8Qy1uJ183KECJB/LcqFtDBsuc6UieLuERcDab3E5bEE?= =?us-ascii?Q?1vI7LiZsFLdmAbrBBsXDN2bDR2cPLvbzvZOSTPzbskQj4EZO2kdwL04PHH4S?= =?us-ascii?Q?chAAoJfB4K6jIsFf7qicSDpXguQ9l/hv/dGoNu7hqduybvOaERWaaPK/KvBr?= =?us-ascii?Q?SQXE75QHr62mXIuVrzbTcwBrjJAflX5YrMV0cWxaLbut678jf/O4xYD72mlW?= =?us-ascii?Q?pJDtPtv53tyXAWszsuSw/ywhvSIdY6N8ujrg27+OzEv8UVlWFEF3J+NaKrRa?= =?us-ascii?Q?uI2lXbtnUMghv1c2CzRi1hYn+AN6V5TREXdw/VLpqBrDYWxx19qoAZQ=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704160111799003)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: MTGb9X2Evjjt9wW8v4wUkaBy2tlHYcAPQbiax+2aRySG0SKwvPjG22uWr+z8R6+Pm0gFYTA37NipYL8CUib7xgusy9kVVT0zkDm8YhZX5EEZQVY3yFQBSy+5GLeHQosjYfxqKjD+z/YP6WIgJlGuz/ZPpTt1Be6CJhV5GOEeFgvUcR6yaqhNYoaOYrU8J+4uj2h7xxje+/ISx0xyWnifS0BzNhJVS9O8+9hHET8MhBYOFXleKXUsbLAokOAVIVKlbmBbi1xM70LalhZwwJWe17lrE8q9Y6yJ6iCr/dm7xUo+RRQ8WzosbxdWn+0OR27KR3Zt6SyfFVckzb8o4aP1OA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR08MB9264 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.104];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.104];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SA2PEPF000015CB.namprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 086e5153-1185-4f2e-24ed-08de9f2456b2 X-Microsoft-Antispam: BCL:0;ARA:13230040|704160111799003|36860700016|1800799024|376014|14060799003|35042699022|82310400026|156008|22082099003|18002099003|56012099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?7Ubvrq5jjoUUN5EGrTaq9fLsnQOyFhQ8Lev7Ay3NMFaxN8+/Zzdagrl/K41E?= =?us-ascii?Q?ckO7keMKVU0i1AZf1m086oMDXv1AfWFBojPSp4Lksve+ApvKSDWF/YiB5v4U?= =?us-ascii?Q?Cyo5v+VhLsSTQXyEgxKoc3ZzGJFJSS9ck5462kwk7a1/4t3ThKD4i/6aTjce?= =?us-ascii?Q?ktovDZQyBu8XYNYP4orCYgsg0EY2udon8p2RXBQYsP4jKBiCj5dGua9ywm7U?= =?us-ascii?Q?UtLnrCkFDBhSOUeWO+wYPqXmCSG27U1+KqSyIdF535x0XQ2ZEaTc6cOiaWKO?= =?us-ascii?Q?s7lLmntfj43iJ8X8dgaTAVRyK9JHrGRLhY1o/x6gBBD8uD+SyAUBaLhrfRwF?= =?us-ascii?Q?WmzKL5zEhXvsLZ2BDxHw7o/dRZOXzfkPWYaesmaVfwj2WSJ8Wxv7kylRRueG?= =?us-ascii?Q?OLbosll+c0iM+6k3uTIlTSTLQVTsH8K2lQuH1hgOIfaSVQPCnoE3GEH5Z7Qo?= =?us-ascii?Q?EA/sksvU/flbXQ3LEYw06LIFScgK2ViY28FQv5vrCaDLKV5GVFUSe6lHGhU1?= =?us-ascii?Q?V4WVQiDlnrBK53rJ3u5l5rtbZBjEBjbcxVJKUxqWlCEPh+DZ81yadkiAFGqK?= =?us-ascii?Q?ZuTKKTS4OGkkvvnLPqi4YrHnhq6kbMXz0a90ftW3dd+BtyFngVYGzFhGPZWa?= =?us-ascii?Q?E7NJUIa2IxJLkqI+G6qQ8xMc7m+OcjUSsIBnjalavF/g2F+0FFV2bFLBVWZ5?= =?us-ascii?Q?y2EbcS9R9ubepHM+aDuOz7f5FrUFLYzFOwZ3qGd7aYj8JkDHgtHu5NFsRiIW?= =?us-ascii?Q?+8x0mlqCeZJgI2nlHcg7ncfDMMJCoqslq6jdB2ykfkoaF1FW1jm5YTi6Q+mY?= =?us-ascii?Q?EmLAFLMuFzY05Ev0vfcSJmd/b/jO8EZO+Ag2kZc80nXFLS5xkp/SbqBgkY1h?= =?us-ascii?Q?598Zln3arW37D1HzBr5zfx5gr3zRcFAxFok7zaVzKtkSO4LobRh6ZzywpjK0?= =?us-ascii?Q?vu6F1HKuwmKgt0AdUx3Zhtl42ofyBdozl9yZ/5KyHTzVSjW0fDa1BIUioSrS?= =?us-ascii?Q?ET7IqScfEcCf3WnMNTpAE6nWCvbPDCgU8I5odB+NwdmtjxBuXQ9g0wV2t+Ld?= =?us-ascii?Q?vG1gz+ADaZkSLWt+U9ShJtSwK9pOo+FA+bgFgFop2bMZWnW5WIGyqxf4R6BF?= =?us-ascii?Q?7NhErnQ8em3peqAHSNtwFCnS1z5NwpiEsq6lima8IiAxryZZFNnpTUI=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR08CU003.outbound.protection.outlook.com;PTR:mail-byapr08cu00300.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704160111799003)(36860700016)(1800799024)(376014)(14060799003)(35042699022)(82310400026)(156008)(22082099003)(18002099003)(56012099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: s3gVEyP1N93JiQVVluCAdar2f5QkvGM7uc5t6etxB4W1KckpVlbXN3GG1KS814SL0T0mcjrJdRgYhx7R1GceqIaZGBLwakolucHko7uBTXQbW0o0j3flod2yqfaArOusFf05dllGP5gg29SYrY3D1Fote23m+nFzjYwAwwLu3wjQFiI59Ggmd9dO6PRudju15klxIc7xl5B03+P2WuFiKtnq/xb5VweA7Sz7AniBl/8f2fWgesmbOvhchID0Kxgl6rSk9Hrpxzvwnrjy98RQ+a7WxgIYXnGia3naAGN8vwbMpav+2VXACVPLyWZ+k6VkGxQ11qCj23m/Jpm9SE8s5NJMYJOZIKbb9u7QCkZtO+6tohNt9KKvG2hAeq9Vz/5JprxK1t5YQ/P55BLKXnqAFbBrBchaTJ4K90kWW+iclnTR4k3gLKs+uqR2r3V5e1L6 X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:40.4503 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 210e971f-44bf-4afa-497e-08de9f2459d6 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SA2PEPF000015CB.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR08MB7648 X-purgate-ID: tlsNG-d62444/1776720766-BF07EFF4-D04AEA16/0/0 X-purgate-type: clean X-purgate-size: 3203 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720783324158500 Content-Type: text/plain; charset="utf-8" Following from the previous commit, this commit makes altp2m_supported available through the asm/altp2m.h header. This is commit 5/8 of the preparation phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/domain.c | 1 + xen/arch/x86/include/asm/altp2m.h | 11 +++++++++++ xen/arch/x86/include/asm/hvm/hvm.h | 11 ----------- xen/include/asm-generic/altp2m.h | 7 +++++++ 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 512b18d4010f..e4f1cbf3b51e 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -39,6 +39,7 @@ #include #include =20 +#include #include #include #include diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index ad5ded833a75..07e760f60659 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -28,6 +28,12 @@ static inline bool altp2m_is_eptp_valid(const struct dom= ain *d, mfn_x(INVALID_MFN); } =20 +/* returns true if hardware supports alternate p2m's */ +static inline bool altp2m_supported(void) +{ + return hvm_funcs.caps.altp2m; +} + static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v) { return vcpu_altp2m(v).p2midx; @@ -58,6 +64,11 @@ static inline bool altp2m_is_eptp_valid(const struct dom= ain *d, return false; } =20 +static inline bool altp2m_supported(void) +{ + return false; +} + /* Only declaration is needed. DCE will optimise it out when linking. */ uint16_t altp2m_vcpu_idx(const struct vcpu *v); void altp2m_vcpu_initialise(struct vcpu *v); diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/= hvm/hvm.h index 6406bb687718..e6d8042831dc 100644 --- a/xen/arch/x86/include/asm/hvm/hvm.h +++ b/xen/arch/x86/include/asm/hvm/hvm.h @@ -701,12 +701,6 @@ static inline bool hvm_hap_supported(void) return hvm_funcs.caps.hap; } =20 -/* returns true if hardware supports alternate p2m's */ -static inline bool altp2m_supported(void) -{ - return IS_ENABLED(CONFIG_ALTP2M) && hvm_funcs.caps.altp2m; -} - /* Returns true if we have the minimum hardware requirements for nested vi= rt */ static inline bool hvm_nested_virt_supported(void) { @@ -876,11 +870,6 @@ static inline bool hvm_hap_supported(void) return false; } =20 -static inline bool altp2m_supported(void) -{ - return false; -} - static inline bool hvm_nested_virt_supported(void) { return false; diff --git a/xen/include/asm-generic/altp2m.h b/xen/include/asm-generic/alt= p2m.h index ecee6942f4e8..a3cdbdae9953 100644 --- a/xen/include/asm-generic/altp2m.h +++ b/xen/include/asm-generic/altp2m.h @@ -6,6 +6,13 @@ =20 struct vcpu; =20 +/* returns true if hardware supports alternate p2m's */ +static inline bool altp2m_supported(void) +{ + /* Not implemented on GENERIC. */ + return false; +} + /* Alternate p2m VCPU */ static inline unsigned int altp2m_vcpu_idx(const struct vcpu *v) { --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720789; cv=pass; d=zohomail.com; s=zohoarc; b=JV9AtbDpmosr6KfzMaA/W6st2bLU4flrlm0qvFOdxnmLAZujsl/ZGrdFCKlnpitJB5U24e1NapBeNOucwMrqMH5i6T3FYtoUL32BsDYkAQkU8xA/66+MP4V6C/v6WzLyloHZR285lrAI6NTRVrRVCjhsY4qpj9nnApg9a1km6Ow= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720789; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jRLoxsuohqR21r1f42+aEEmWEGpw45nncUOaZm3GjeU=; b=dTCTC7puJh3p2j6Yxu6nWCPypyuhQsAXfHX/tZVSBwKDlcQj3XLmQNLqCynsyLLoebtu86Ar7evPXddbeokw/5sW/WdfwdGwz600a8oEFIAlDoSiZ8x0wRTXo5FkWbep7BrX8jcc0yWZpjmpkwBArcHOZqLHKlNSeAM+kFIvb2s= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 177672078923755.93951074488564; Mon, 20 Apr 2026 14:33:09 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287752.1568138 (Exim 4.92) (envelope-from ) id 1wEwEe-0007KS-97; Mon, 20 Apr 2026 21:32:52 +0000 Received: by outflank-mailman (output) from mailman id 1287752.1568138; Mon, 20 Apr 2026 21:32:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEe-0007If-0I; Mon, 20 Apr 2026 21:32:52 +0000 Received: by outflank-mailman (input) for mailman id 1287752; Mon, 20 Apr 2026 21:32:50 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEc-0007GC-Nq for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:32:50 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEc-009kg1-4k for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:32:50 +0200 Received: from [10.42.69.6] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b21-5cb7-0a2a0a5109dd-0a2a4506a0cc-34 for ; Mon, 20 Apr 2026 23:32:50 +0200 Received: from [40.93.198.123] (helo=CY7PR03CU001.outbound.protection.outlook.com) by tlsNG-16d1c6.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b80-7371-0a2a45060019-285dc67b7ef8-3 for ; Mon, 20 Apr 2026 23:32:49 +0200 Received: from SJ0PR13CA0057.namprd13.prod.outlook.com (2603:10b6:a03:2c2::32) by MN2PR08MB6318.namprd08.prod.outlook.com (2603:10b6:208:1aa::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:45 +0000 Received: from CO1PEPF000066E9.namprd05.prod.outlook.com (2603:10b6:a03:2c2:cafe::82) by SJ0PR13CA0057.outlook.office365.com (2603:10b6:a03:2c2::32) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:43 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CO1PEPF000066E9.mail.protection.outlook.com (10.167.249.11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:42 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzGy4BbWz1wdM; Mon, 20 Apr 2026 14:32:42 -0700 (PDT) Received: from CO1PR08CU001.outbound.protection.outlook.com (mail-co1pr08cu00104.outbound.protection.outlook.com [40.93.10.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:42 -0700 (PDT) Received: from SJ0PR05CA0130.namprd05.prod.outlook.com (2603:10b6:a03:33d::15) by SJ0PR08MB8364.namprd08.prod.outlook.com (2603:10b6:a03:4d5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:36 +0000 Received: from SJ1PEPF000026C5.namprd04.prod.outlook.com (2603:10b6:a03:33d:cafe::2a) by SJ0PR05CA0130.outlook.office365.com (2603:10b6:a03:33d::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:36 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C5.mail.protection.outlook.com (10.167.244.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:36 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:33 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=CBku/OO9uCZfYzgquT9ALW8Jvi2QBUxOMb6L8RjFanCvZxlDeyiJlB86FjO9yZs177+UtS++9JCICv816RPNQZZC/Nz/JtaVMyGZlYIE7+xDrEaFuI56e5lft3aev35/Be722lXlr+o5J9nJuCqUGZpHerDEk6XKSnpLWS/S5NmUAR/05S/m+dhGdnlHdQLvEODfqZeajVQxtLzEqzkVH8cnLJ6rRfRhvDRRl4ZzRgOAhLagBNHpFLLW0poUePgkQC8atOXmxuLfc8MrgJOUowe/VybrEj9j21wmGh1mLkcF/YaG6WGBisqMmNSHWMQADXJUgdlrKHFGrTEkE4CMfQ== ARC-Message-Signature: i=2; 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=jRLoxsuohqR21r1f42+aEEmWEGpw45nncUOaZm3GjeU=; b=c5DkqDZoYTKO5tmso894USC4bJ/pHGtBEm8h1wKAQOfxjTO07WNahOtAOZAR8xOiZ7dpL1N+/5XPWI8Ze2+PT5KQaKpnOTIu45CiSdRWGpbHJYtzwBO1TckR/UKZvp+cyRmuQutq8XdWevpXaL0FwdB4ChcVl6ImhpyH6451GZiGYAyubWeG8UOdgTLrnopmRHLwRADN53eM1bQjWYaFwSZTfEZ2044OFo9SvkQnnJbqpXxaN73/v2wjib+Ilmgs/692noJ1ONsW8kYM5L2R79Quf+cR1Roh0a1T7U9FlT6UrE7/8yxdRlVX0EGx28egz7p9iAmMom4M2NJpjvI6AQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.10.100) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jRLoxsuohqR21r1f42+aEEmWEGpw45nncUOaZm3GjeU=; b=R35PpULPeDddnMBIoe7our9YNHU0NcZTmhHHr1RbudNoKQK2Qx5NvdPSAd+NXDVijO2jcZ3DD5D7XT9gzoZegRUplMDfwUVyZ9Sok6rPJSORuz+iJfb9sabQbwgsppZjLGUOcLvpARDEIrIwLKo/Bvdvl+hU4Aw4hBBiO9V3z+A= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.10.100) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.10.100 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.10.100; helo=CO1PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jAm8tTt5RUhiro3ZwwmjvZTP+sBGxTJbVh4XB+9qYrtaapYcx4oUSDjW4P4ygFEf/FNdrygb7LjJ9PLk2Tajb04WRIFTb8SIHcD7ahx3G4wP0FRVGP/aQu+F/w4j/2ztWCI30mg5nyX1yYYKPbRJZ7YPCsoRkinw2z70KF7eVeD/sjt5z7vY73yNlTW+heiFQ3naEF1nSAsXSPvtquJFSzJ0vm95QFi3K8YYbmAQWrC5d+vSqmQW6/A1TabxRpLzMqohzTOoFsq3zCF8HHZoFU1Q+ADDNs9MfpFlKSBzvoQiqpzH0Tdz2DViVLiFbvAHy+gDMahr5IN5CsxzJnLFUg== 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=jRLoxsuohqR21r1f42+aEEmWEGpw45nncUOaZm3GjeU=; b=q1yF3KDZwMkseeI5H+kHAV5Gqk9lj7gh4JukVIV0QLzhJ52TFPBC6MXkwJsx+bbF0ldMPFX+MUimPZLXsc/AQEpfksh1FFXgf1VD+jY/brdhPS7dSbxOGfgYHjF9xkl4zukgNwpbcJQ3CC6Ow0d4EYpor0zAQvq/Kl41QJKqsXzA9pFgwMnhkXuxoAHjBFiawJvmZ/FUY6BNZchZVGFeTJaFQMsNZQgFK0AAGj2a+11Nd48JdTSSGWyFTCDZexjHh2REUzEsbphjtJIcsw5NlTjOFD+09yfAJdfEGKaaXXBssrjIjH/QV6QpxUBL+pv9KKHvtBOJVlM2IN6GcnOuKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jRLoxsuohqR21r1f42+aEEmWEGpw45nncUOaZm3GjeU=; b=R35PpULPeDddnMBIoe7our9YNHU0NcZTmhHHr1RbudNoKQK2Qx5NvdPSAd+NXDVijO2jcZ3DD5D7XT9gzoZegRUplMDfwUVyZ9Sok6rPJSORuz+iJfb9sabQbwgsppZjLGUOcLvpARDEIrIwLKo/Bvdvl+hU4Aw4hBBiO9V3z+A= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Aqib Javaid Subject: [RFC PATCH v6 06/43] arm/altp2m: Add template arch-specific altp2m.c/altp2m.h Date: Mon, 20 Apr 2026 17:31:29 -0400 Message-ID: <20260420213206.208750-7-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C5:EE_|SJ0PR08MB8364:EE_|CO1PEPF000066E9:EE_|MN2PR08MB6318:EE_ X-MS-Office365-Filtering-Correlation-Id: 63dc7c5c-3c53-4d20-974d-08de9f245b16 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|36860700016|82310400026|1800799024|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?YKZal3zC4Tmx5cwbSRzEfHoSJ8pk2YnsGHXJaZ1Y5q58f0bQgqFz+ixTNdFD?= =?us-ascii?Q?c7EvHGM9tEn2k7/lRuXRoRF41JcADlh1r8ouW+FDGFl6h92DTcR81YOIa+2E?= =?us-ascii?Q?l4rSI/ANrUiyPLcZ1v44hiaBZ+Bn/cUC96W6CMm2M2So9np+B6wV1upqpo/4?= =?us-ascii?Q?HYn00csovB3jDu5NqYKEXCJvvRdB+OMKdmBoR79eUoDGdyf1uMl0g6tzUWQ9?= =?us-ascii?Q?Mkp72of68pEjf8zrORS16CE+XkQtBHoOmJ309F8d9ttFSnPARV+5hns72v4x?= =?us-ascii?Q?S9PpTpfakLVHDbMEHRJDNY74hAjDfLaxbvUmwtmWmDr60fBXHA58dDLtsFq+?= =?us-ascii?Q?nLPjnqhq1k6GY/PVI2zY2aL43TYLqkwRWSyIlQ+3YNxJw1usO7I8xOqEwFOQ?= =?us-ascii?Q?P1wtewKNPe4LQuXt+gBzafLS4TM+/ImXtwo9GF1Nkt5vRY/YucEL+47Hmb0h?= =?us-ascii?Q?QVaWN0foQmGoz0J6kaMr24VD7c8bsdjBFTVJGMbN6AOt4KSYOXmz908ugilq?= =?us-ascii?Q?maDEnIr2IOp4FDilPeTuKUzE2q7D9OWWgN3Ghaj2VjARGwLOR19X2i0sSRfu?= =?us-ascii?Q?rvQedmmlXNfkVG5paV3Uaghp/yXlyKLH5M/vxn1S9CNsqmeBqfAHzImXYa47?= =?us-ascii?Q?7B/+pjQMtncvxKrZUIzHhY0zOY7v67sQJ5z2aYKGOfo4lUqLBPJ46Axfb+52?= =?us-ascii?Q?E6uZVjdKPQlw8wgzk8b9WUi8X4tUsUq2xeE16s+/AGbdpCQ7MefOQtzIUFri?= =?us-ascii?Q?4vJrZ+4qj5+ZShlGqy8+o0DYkgNgIWSRpXCoG4ZR8x+6ydvD2GiKDgj8s/f5?= =?us-ascii?Q?pVAlSdfIlT0QGr7emyF/L6LikBGjnraefkhC/Z3a5L33wKuYCAhrwh8+469u?= =?us-ascii?Q?1bNXtVgwEycvkQKvcc4w0jqbG4slgQ4gT5aFk3TrtjfZGkIAUR0ZCZvw6k0d?= =?us-ascii?Q?R9ef1hdH3S8MAyKTRKjEVNkh4urTcYhkcNAQl2I7flKh5xdHgy9Af7y2b4ZH?= =?us-ascii?Q?SQ4ZJPgrb8iGYVuxZ5lIj/usO/y7/GTsEH66QgURrYemJj+7lCFRq1RpxDXx?= =?us-ascii?Q?k+2zZKiLAUvGk+imN3OU/3GzTS06rkVP2xnnF2KSKzdLZVgP8+GmPG58iyF4?= =?us-ascii?Q?gMsrSkOdr6P0U/nLR0glHCTPKozCqHzOp83Oq57b5XPEB3xvIuTAQw1EFBAR?= =?us-ascii?Q?cYAGC9g7EOGBlUHLLL0VdbqoswFWWF7l9WHEokOWKBbN7yFM2gOcZFjzO7lr?= =?us-ascii?Q?yxw6suc/FZMKwa6SM8Ja?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(376014)(36860700016)(82310400026)(1800799024)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: MycgCjajMjhVkSakchecivUEnVXLyvZs5w/CJF7fYEXodr21CrqpliHE1HODqP09UHLKTFRnOVuZKxSMM+kHfMme3pR8uutuwfMJZVy6p8PFW5VGY5vKHId/D9M+Md59PY5BT5E0Aqfcr4+x+yWPr+ZuG5/Hvm7l/pqxJ+QKzoftnv8GaOu1td617UeF0na4z9DigVyYg73hJ/Iypl+ZSSV5cIHOLeg8jo2r1vw/58TLsGPTd4Emwm7TiCKiBiyR7lgwSmnNLGQF8mzYedZhzOEbi68XtG8TdUIf/8YIU/B6R8LvDbc6LnEtv5aQpITKHH+8PVAPOMXYJ7fI4eweuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR08MB8364 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.10.100];domain=CO1PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.10.100];domain=CO1PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CO1PEPF000066E9.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 170bd0f8-1e92-487a-ea2e-08de9f245745 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|14060799003|36860700016|35042699022|156008|82310400026|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?GC6DODuAa5ayRO8wnTHeqtDjNPix+7XbRe4elvYCAckhriE+lJoHBDb7ccRs?= =?us-ascii?Q?5bFC5lsEsgVIUepD52hJV8J6Wa/3hVKuLP68FJO7iCBG1fUdwfBlvXhdGKzY?= =?us-ascii?Q?935B5KWZYRzvJw4bpkgub/mcqK6uhOESpY/Py4W4jVvUwDb7ORi3OyBwxq/A?= =?us-ascii?Q?Ve6zAGucOrnfds+FC/fbsfzembJvT/kFhTHxACi5eSRJD+i7ISZZJ3HH3cmS?= =?us-ascii?Q?zlBtsB5LhUGbDP5DMFA4nQ3U2AEcfsN1g2AlMSAOHlNhTuygt9vyHMvmdXlq?= =?us-ascii?Q?hzdke0vaxYFGppQeU+m+GGSVpSoLmo3rGwELEKfXpiSZiuFQddRq0Kylp4Nl?= =?us-ascii?Q?VQbCOz4xLtELgYJ0riL+iGFsmRWkvXmI8uKm/sIlZ1wQAHSmHD5xF5AuZrk6?= =?us-ascii?Q?EiCKqV3245/YKFkuVL3ez3hs9sgUo/V0Kcg0yRQ2l1uh8UT6d37m3BDyh/XS?= =?us-ascii?Q?STbM6N9XfxxAz3GJ2GFqSQhDWeHCcaWbpNhhXKyzfebM8/2nlCr90soptoGp?= =?us-ascii?Q?oiYu5r6pBTCqYZuGGiO1JcBngCKWnAeibOO7hfqg2vUJ2OfFFUJY+0AQtfu4?= =?us-ascii?Q?K+GnLLY3LUWGeHKl+Hi53C1cYVZTzdgwAU7yffAwNR/YCC4SrD2RkoM6i9Bk?= =?us-ascii?Q?4aMKGrY4Cz5AJ2xcGb9GuzMGhj9ed3fpY7gAUV1mr1jS6Nv5LfR/8VVD7pAW?= =?us-ascii?Q?vm97yA+SexuceAiJ6Os7dQt7ObFrDm9YDb0G7MPeG6zyvU6rpKSBvA7cDakx?= =?us-ascii?Q?Jwwb1Ef+kH9EyMkw+LVg7bypZvnOtWSzzc5DM/Gxbg0QDKu6TF23we6PHwwd?= =?us-ascii?Q?QwvBw/7DHOk487u3AWqcr9f1BFEaNwdrs8MPnVz6ILC6y1B5C4j9BnkUaIIX?= =?us-ascii?Q?DXvZOO5iJymOxfYiujFHQt73nzhJADUlFlfa8mNpy+T+O7Ipr04fboi8PEnd?= =?us-ascii?Q?LNy/leHcuKuCqjLTZt9isD/c1TLpqtgUP/EN76SEVqAqs7KDbRZe1FVQy6kk?= =?us-ascii?Q?bBSfkEy4UYK3fzdFXEKbzpfCUyJRtAIbM6Db3O5ri24ip1ZHZE44eQDqWFjb?= =?us-ascii?Q?yIAPza0gZLktW7eSLNyOELzCk1gTK1e5OrZ2awIcZna/FVuFozhP4p8IGxAp?= =?us-ascii?Q?tqPPGkNJpv94QCY5+qBf/WQB9v39vZnnFFR9iDS0IMsjUDZNaDQUslZhv2zU?= =?us-ascii?Q?dUY6Aaouzo5xTCilMfkJhiZsgfFzxA8SNcKvndVsL4CN7qIA1VLCFA87JLrd?= =?us-ascii?Q?BRn9DnovGw9xI06KjtVI?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR08CU001.outbound.protection.outlook.com;PTR:mail-co1pr08cu00104.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(376014)(14060799003)(36860700016)(35042699022)(156008)(82310400026)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Xm1I5Yn9BfF1DzY92L8Z6JFNBxMCI3KjEmZP6dVKZRmwSKZhbNwpuV/+ph2AKssr1tHRnI/TKTJcEkLQWVwDHG9mDGwQweTSewr+762dAN98Z4RrXYqbMoenE5aWQ1myRsLMdxgByLGFhgWJEmyZKfz7fZ9YjWcHJda2+Ba/2OPe6rE7ZdZMhBh5LqXnQUh0uYQc3Rl0j2c9h8fhiqAkOwMrX1E165noC5EBdNGKMHRiY2VTXTQNCiIsyEB4J/IueuXx+ozNQEC+EkBnMw/iu+RIIn/ZK9AUdR65KXJPevVWq4LOtKACL/TlDvlo92jOF9zFMrrrrb9fSf7a6ItXFaPqFXSGogOH7wd9CUdSUupaqk4LHhOx2aolj6dPijzVxIw44IA+sYEMmvoAXz02/ZPq7cNcKLG+BsnxLN/X3OKllKe41bcurun4z295cwDB X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:42.8117 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63dc7c5c-3c53-4d20-974d-08de9f245b16 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CO1PEPF000066E9.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR08MB6318 X-purgate-ID: tlsNG-16d1c6/1776720770-CE369D75-CCC67E82/0/0 X-purgate-type: clean X-purgate-size: 3218 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720791197158500 Content-Type: text/plain; charset="utf-8" Similarly to the earlier common altp2m.c/altp2m.h commit, this commit adds a template altp2m.c and altp2m.h file for ARM to be added to in later commits. Creating a commit with just the template file additions makes it easier to reorder later commits which add to these files. This commit can be squashed into the first commit which actually adds something to altp2m.c/altp2m.h for the actual submission if that would be preferred. This is commit 6/8 of the preparation phase. Signed-off-by: Rose Spangler Signed-off-by: Aqib Javaid --- v6: Introduced this patch. --- xen/arch/arm/Makefile | 1 + xen/arch/arm/altp2m.c | 16 +++++++++++++ xen/arch/arm/include/asm/Makefile | 1 - xen/arch/arm/include/asm/altp2m.h | 37 +++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 xen/arch/arm/altp2m.c create mode 100644 xen/arch/arm/include/asm/altp2m.h diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 69200b27280d..d995d4ff7aa1 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_TEE) +=3D tee/ obj-$(CONFIG_HAS_VPCI) +=3D vpci.o =20 obj-$(CONFIG_HAS_ALTERNATIVE) +=3D alternative.o +obj-$(CONFIG_ALTP2M) +=3D altp2m.o obj-y +=3D cpuerrata.o obj-y +=3D cpufeature.o obj-y +=3D decode.o diff --git a/xen/arch/arm/altp2m.c b/xen/arch/arm/altp2m.c new file mode 100644 index 000000000000..2bd1ff4df223 --- /dev/null +++ b/xen/arch/arm/altp2m.c @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * altp2m.c: Alternate p2m + * + * Copyright (c) 2016 Sergej Proskurin + */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index 4565baca6a4d..fef4dd42b6cb 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -1,5 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -generic-y +=3D altp2m.h generic-y +=3D device.h generic-y +=3D hardirq.h generic-y +=3D iocap.h diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h new file mode 100644 index 000000000000..ca836bae7330 --- /dev/null +++ b/xen/arch/arm/include/asm/altp2m.h @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * altp2m.h: Alternate p2m + * + * Copyright (c) 2014, Intel Corporation. + * Copyright (c) 2016, Sergej Proskurin . + */ + +#ifndef __ASM_ARM_ALTP2M_H +#define __ASM_ARM_ALTP2M_H + +#include + +static inline bool altp2m_supported(void) +{ + /* Not implemented yet */ + return false; +} + +/* Alternate p2m VCPU */ +static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v) +{ + /* Not implemented yet */ + BUG(); + return 0; +} + +#endif /* __ASM_ARM_ALTP2M_H */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720796; cv=pass; d=zohomail.com; s=zohoarc; b=YTQs1rkqCB8SDhHFN86sB5u286G2s6qm7Fpzzfttq4iS6akQZOO3NVUpyLQGO7CaZukRW18KpLKRnypFZY/OMxpL3QqY0w2HTuAFWTyAs8RWJxIqNjWUSCbpWCg+nDgkTOgMkAxPTAJDJH80FnJeF7OHUpXQ4g8vYwla3Tl+EnE= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720796; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mUHlmqTGoOfpLiPTAGkw3ZzBrGFd58Ji7foro+DAZoU=; b=guZ2Kzy+K81pe9p/t+h4LVbBkCMkwvt8onS/C9yubJ+NdSVJq+g3Sqrf0yW16Ui+IU4cGOnHC1NTIHI+6lfSo8K4ci+9jwvLKBJfdW4+2XmBbklrljw1U3dOZc0Tc6RstE0wre6yUoPnF4Id7B3bG6cftKPQJCjvPSIaRdwdN0c= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720796937653.1766163494127; Mon, 20 Apr 2026 14:33:16 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287755.1568151 (Exim 4.92) (envelope-from ) id 1wEwEi-0007pD-Ho; Mon, 20 Apr 2026 21:32:56 +0000 Received: by outflank-mailman (output) from mailman id 1287755.1568151; Mon, 20 Apr 2026 21:32:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEi-0007p2-E7; Mon, 20 Apr 2026 21:32:56 +0000 Received: by outflank-mailman (input) for mailman id 1287755; Mon, 20 Apr 2026 21:32:54 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEg-0007lx-HV for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:32:54 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEf-00Eg4Z-UJ for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:32:53 +0200 Received: from [10.42.69.1] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b5b-e002-0a2a0a5209dd-0a2a450184ac-38 for ; Mon, 20 Apr 2026 23:32:53 +0200 Received: from [40.107.201.120] (helo=CH4PR04CU002.outbound.protection.outlook.com) by tlsNG-d62444.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b84-c1f2-0a2a45010019-286bc9781fe6-3 for ; Mon, 20 Apr 2026 23:32:53 +0200 Received: from BN1PR14CA0029.namprd14.prod.outlook.com (2603:10b6:408:e3::34) by BN8PR08MB6178.namprd08.prod.outlook.com (2603:10b6:408:7c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.25; Mon, 20 Apr 2026 21:32:50 +0000 Received: from BN2PEPF0000449D.namprd02.prod.outlook.com (2603:10b6:408:e3:cafe::67) by BN1PR14CA0029.outlook.office365.com (2603:10b6:408:e3::34) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:50 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BN2PEPF0000449D.mail.protection.outlook.com (10.167.243.148) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:49 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzH42vXqz1wdM; Mon, 20 Apr 2026 14:32:48 -0700 (PDT) Received: from BL2PR08CU001.outbound.protection.outlook.com (mail-bl2pr08cu00100.outbound.protection.outlook.com [40.93.4.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:48 -0700 (PDT) Received: from SJ0PR13CA0195.namprd13.prod.outlook.com (2603:10b6:a03:2c3::20) by SA1PR08MB8386.namprd08.prod.outlook.com (2603:10b6:806:334::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:39 +0000 Received: from SJ1PEPF000026C7.namprd04.prod.outlook.com (2603:10b6:a03:2c3:cafe::a7) by SJ0PR13CA0195.outlook.office365.com (2603:10b6:a03:2c3::20) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:39 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C7.mail.protection.outlook.com (10.167.244.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:38 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:35 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Vz8dN5cmCD803/A1a4IB/le34IIjZf4xOdmvK2lxSolKDJUJXfnIUujRp5ZCCZDKXAPm+R2F/bFgVhaJGzS6Tm5WEpOzgWLvrYhqqVp0oGB/GoT6SUUw9KosHCgGSFjlz9CXlm+AR7gupYNEPe6RUrDdTrrZ6cJOjrVoxWaLt/ZoZ9x3XQjWGj9gPn/pAWoO6V54Z94qgGL3tqdOiGN56vdd7y01h0k3AR5KhljrzqTW7ydq/f7kc8e/c4pVp/yrcFV0ShBhCqLR8XaA3KzJIbvnPbga3DczlsiGWCA05iaj8ePV2RMhpiLBYBQ/OT/VjAp41ZZZqB6K34pIAGmXzA== ARC-Message-Signature: i=2; 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=mUHlmqTGoOfpLiPTAGkw3ZzBrGFd58Ji7foro+DAZoU=; b=cvILFjd/VdBmQWUjxb1CbatR1BWJWsiEKOL37XOQrqipV7/nJYPR7uplZWyboxDBGZy/N2YFTZA02H6HLd6R29ph6JHtf5KyX8pxxv/39zyAJDEJy1EL2hWjZI4oI4wg75Ux2f1nuVRlyjPs2gVV1HWOiyvraOHfLM3wyYYI44nxH+CCYrpuwliikxetNgmiQzM+fhEz982b/9m7esY0i9e1SGfVTIb7jnIgeh7N5mXUuC5QpazR8OvCuk6OtWy/5FhlvkG69kRHmtP3HPG047tgfpEWxBIGK3J4tgMo0I4LWKiiFm3BRDYzkkRgVPwo518EMyqAU/1iDZG5r/P8qQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.4.8) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mUHlmqTGoOfpLiPTAGkw3ZzBrGFd58Ji7foro+DAZoU=; b=rECi2S5S0zPwEEXEvZw9594wZnyk/FIO8dr7X4mhzgOLlaHQF0f9BtigtweCgNfOZG9c0Obf2Ccw3eu2vguO8fm5itkEpA3IKevYiAFew2Xqrz7u5F6JsoU5D/NOLhfEKEhF0xRyG4H0toC6dV9m7a4tj4ePDyYqNaf0F2Pn0OA= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.4.8) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.4.8 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.4.8; helo=BL2PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=y+maNGCt62v0NqFOWkafvLojA64pCTyVwWZn4K0Y/a44TFNEOVDTe3lAZkm0oSxJWA4XLD2wEvY77WCseab4j4ZCJNam8APzew9mpY2Jm1wL4l5/Ky41mzPdyDBvbLcpzsCJMH/EFjoJiQh3QXkjirWrnt/Hsvg2KD6t1Qu1kZgkhMCe7TTDfG8l2LnaIGw/ug/92VWmnkFCf7rUmC0NLjHza3dMzks1IB/QTKAIa59+XEUWXOHBijNQlRBjCXkIzXwsjJ7vOTE/gQU+N0P0q4Yckf705WJlfdVlcqKjc7vMsB9H/VCj+4H+DFIK9pxho+OGXLm2Qs2lquAHU1+/yg== 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=mUHlmqTGoOfpLiPTAGkw3ZzBrGFd58Ji7foro+DAZoU=; b=p8mY0arhJZr9DcMGrS3fxDPi+bi3IsikPH9ixQcXlDpUhrNI4HsCoE4ccS/5ko7+oRLoWTzjn41EzJv9F8LUiBx9p4Gqk9KHZCnwP5sgJSz6ArkikSMCbYvv4W601rdr07hJMIQmoLBPAd7IVxMm4/krFBWQOqA4eUbT6kJL2j6EqDn2uccOwXyHwT9PN5XE/UjTu8WjU0PZKo7bqtbiVfj979x+hVXdeMFVcsWQtGkP7Q1Le0hRUiTlkSy4jonmITlhgR1wYv4xu1I6r2MHN/UhuN92NGMs2AIGbCqpSh9e20rF2am71E+QdBYO66AdkO8Brwwpw/jYguE34OJOAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mUHlmqTGoOfpLiPTAGkw3ZzBrGFd58Ji7foro+DAZoU=; b=rECi2S5S0zPwEEXEvZw9594wZnyk/FIO8dr7X4mhzgOLlaHQF0f9BtigtweCgNfOZG9c0Obf2Ccw3eu2vguO8fm5itkEpA3IKevYiAFew2Xqrz7u5F6JsoU5D/NOLhfEKEhF0xRyG4H0toC6dV9m7a4tj4ePDyYqNaf0F2Pn0OA= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Aqib Javaid Subject: [RFC PATCH v6 07/43] arm/altp2m: Introduce CONFIG_ALTP2M Kconfig option Date: Mon, 20 Apr 2026 17:31:30 -0400 Message-ID: <20260420213206.208750-8-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C7:EE_|SA1PR08MB8386:EE_|BN2PEPF0000449D:EE_|BN8PR08MB6178:EE_ X-MS-Office365-Filtering-Correlation-Id: 5be98c0a-f33f-4396-7038-08de9f245f27 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?0fCBQ4/EiNw0buV3b20csTDfytL7oWXBQ7Subug3IPJyNor5p6kjEFNR/e1I?= =?us-ascii?Q?TQr2xtNUljuJMrIkiamRQyfKi8WZBGvMUJs9nGI/ennMm7680mCfb3a315qH?= =?us-ascii?Q?WlEa4NVcykQuN0h8zp7cFCxPHXlVaa1l3GS/PQtAEdswR/4fPV+W91CNCwke?= =?us-ascii?Q?omlFH58V50ZOCcL/di9KpMKPz5XXXogkdcXmawfusI3m+iJscRadXAgdivpv?= =?us-ascii?Q?o3iPiRIavpTxSwUFVWtgFzu6NDuL8dJ28KGjxZnBXG/9TPU/HFI9PWVk00Rl?= =?us-ascii?Q?5WEQHe2s7ipJYg8yHju94w3ajR5DyZVpb/lPbE3GKQOfjptI+gkoS6luK1UZ?= =?us-ascii?Q?Jmldcak67WzBgUY4s2JMo3i1QHg/WMGBxbvzzeCurrvOXYRwW1bYOu1wr77h?= =?us-ascii?Q?RPl6g3R5qFNvV9W3Lk9q2jFOxhvFCi6lQPNqZKlWD++ClYXueVHWvnrfab9O?= =?us-ascii?Q?U3tLqZo5YCN0LMa4ZTBy/HSTxGAV5M7+OnNzmbqLXpk7MaifFelxnGxPnRnh?= =?us-ascii?Q?pTX7lBdr49EL67jx4NDSEFzlTDjx398mg3RaVC6sXS2zJ1OmlLxlMKZJuT4m?= =?us-ascii?Q?nkDgwAcf+yQeezLxQevGwTnJN9SeOGJGEgT7BqWaPfOlFkdoNnKQ6xNjaXzP?= =?us-ascii?Q?JfEYuxSPDuwNRiJEPnWznQ80ZIoG4QR39yMkmB7xmEJWx/V9rk6T5kyPPSSU?= =?us-ascii?Q?sdJD9spAVEToIPcOL2cHBUkcV5Oa530PlXD9SaJYWoWxON/DaRmiRkmjWuQR?= =?us-ascii?Q?Q8NUaGufF7uyfYHvL5eH1gGnOolU25EKP1cA5l8uX40xsCAFewMamS2Jx9qd?= =?us-ascii?Q?5izZ5sjnW1hvmhGKCqLl2RTRk/HbmbfKBGUIK4qzfor/D/0JyuNeL6/a2c14?= =?us-ascii?Q?U5A0lKPIg3CqhnozJvH1dR2obCrHDjO/piQ50CsZN7YeuPw+zdTwSouRblm5?= =?us-ascii?Q?yvPWwOgh/MhociQGSWfZ47KWt53idflxIUwfiPJvAxqGUk78kySC30PPnt7q?= =?us-ascii?Q?TvQ2jmFn+uwraYIJnMBNjVRp6Cko2wi5pyoKggcJcv+0YpkIxaA4+S3lNcfs?= =?us-ascii?Q?y2vi1R7q2SaqE31VyDhHd+VVorxcP8o+Eqno0CWZCqWWe5/dabZtgyudZqYW?= =?us-ascii?Q?5J4zME2yZZsOO/OQY+XWEEvZG6VsY/Gf3lKOd7wPE5HnuH9tsnQtd82Zcqv7?= =?us-ascii?Q?jwsUCmbWQrv0pXOaMAEx/Dd+7gEu9tjF+ABqR4CMTEg+TAA/0uiZbJlAVher?= =?us-ascii?Q?t+D8c6tgMcPg6c4P5P/yU2mZW/bngsSMPv0iRXH5gg=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: MziLwSTCnsACNdN3VOgopeaSV5+rrfJWRE1WGf9BFDmR6SGeAHE/0AK/pmcsz+AFl63VFLO1jRd5QB8EeUoosOLke90axvbyNx4J2m14U8tvrKV8SYnIztSmf2UFi+Y49lp0fKh/IIOj7TMfdVZ89GrW30r2roF4QjZagyHfNaELKqFDT99AmZ61mPSMC3AvLNtXZx4nF5OoIoNClZDUhmu1+R4MafZ/5xYzE1Qu4P+8JkH6P50tmFKeNgLLNOZp+R+btpWWf0TLKGHpfFaeQHF9Yp+uq/oXZzD23ZU+megjkdjH7AUwRXpINHyHs1oxa42HbnSXAxDXTKmxI6yYiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR08MB8386 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.4.8];domain=BL2PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.4.8];domain=BL2PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN2PEPF0000449D.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e5b4eddc-89cb-4cf1-cc5a-08de9f2458c5 X-Microsoft-Antispam: BCL:0;ARA:13230040|35042699022|82310400026|14060799003|156008|36860700016|376014|1800799024|18002099003|56012099003|22082099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?q+DlfxjGpiIlk4j/+0F8NVnbcyZrafQflFQKy3hgKfBSTlYecP/ic9P+1B4D?= =?us-ascii?Q?0GWZHiCAFnUtH5Mj6vnncJcSLI+C6S9jMICm5a2ioCJTbA1VE65Mgt7mw39C?= =?us-ascii?Q?ZYPTegqWMNEXiedm9ACyFfCS4/vlCn8bkkrladZ4l8mHXc3rtFxAnVCbTGsK?= =?us-ascii?Q?wmnhSKLOG81DYRPqNfTt3AkrUtUWcd5h27Z2YeZC2xwxA7ncSaxR7yHsXJD/?= =?us-ascii?Q?9OGnCFNdPgiVD5BjhS0bEycwreDw1aSDsT/NVz5rPcBWQYNarhqR1reYa6Rp?= =?us-ascii?Q?HdAIT7ZmzsWyybzgYDlFGzXj+S+Qo5HCuYyLLC6h2e7tmNF76ZzOQ+2r4GZB?= =?us-ascii?Q?DjTD1HxBTJP01PG8yQgseX1Xp5RPU6DeAykY6wOKL94j43nyvdfuHxlx5iE6?= =?us-ascii?Q?P+8xpGBgfXOXwgUYWUil/tt5iWuvQ/YmXelTjwwsiKvvysxFZbPkT932/h6d?= =?us-ascii?Q?x1uGByoPzzcpzMDRR/nKLhOsHiLMKqrT+MY7EZ7yjQDqxD1hOztkbR5aWy7q?= =?us-ascii?Q?jBfVNf4ACK1lrN0NfVQr1DpyauwvbOexhHGWng31biYgLNcUbwdI7OrmctOB?= =?us-ascii?Q?tGyl6gE+Ir6d7rFIbsxZMnALD7vM7NGHMbG/PfKRCXpboseHvvbeNeqLvxyO?= =?us-ascii?Q?RhtQWCEqodzG6pULb9YLkMDYWFn+Z3hQwvdJiX0IBbRqyp4OLqEeKFnVWm00?= =?us-ascii?Q?CwqKKI3gyD7LerhBb5JmJqd1pRDgTjxuWz1UXNsJVS4UcrVdTt7Aqf9vm7jS?= =?us-ascii?Q?q3EZzaRNfUx6lLPBeHm6zs/DVQaq9W1rMndwEzCCBhFcdXcPagfMvMtOhuZR?= =?us-ascii?Q?CciDysEA1GCxoIpkjHPwz3txfWxXdaoQSpNR/XWjHBxqS0E90lrPdaU+N1Dw?= =?us-ascii?Q?cq6sbXa+Bx4du0Hwn1zGcgewUctFqqqAB2EYhlKGjL4YvDWp6/13n4hGPvda?= =?us-ascii?Q?GJt9SPJ9Q2ytRigqSay3MsNAP4sd4+/wRHrHm0p2XFk8bnvcREb3gCPew5RS?= =?us-ascii?Q?COQqrWyNJ27kxK3BYQc8Sjl6mnETSAu/6zNeOiAXq3aOi2ivHi9MrvjfKOYc?= =?us-ascii?Q?BSGn9WcXfMevy8pwrpdCWcfxtzNNbuX+d3wEMxrbVv+F4LE4RrQlhWPoWqTu?= =?us-ascii?Q?7M1AN6addmpsjZOjH5Iy2XOJ60Nf0/uMuk5Fh5cQcsv2DJnQ5ictbEQy0imb?= =?us-ascii?Q?9P0Gq7R0zlHss8sTdVRbq1dLnDARCWMFvCzQ4BwcouAlaChGMXJ6nISHnE5a?= =?us-ascii?Q?w7UEnkYps4edniUkKYDuogYGqgmO2zS1akGNLzIAAA=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL2PR08CU001.outbound.protection.outlook.com;PTR:mail-bl2pr08cu00100.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(35042699022)(82310400026)(14060799003)(156008)(36860700016)(376014)(1800799024)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: f9/3lskek/6N57ArqSJVC3wyIJqrMK8K1GpoHtb58FpL9CbKU2JMKE0vKuaE6RfadrOZ0grXiqT3u60e/pJGnUX97KhMyA5QjLaQHQSEQ6hLpYhElKmRd48zxMyRd4pWRxI6Fk6pz2+08l6YA3C/BWIC4lTXH8QQUSFSrWN9vrpRQLZY1EcbPPbxcHH7SOxzMnCD2fpdQkH8xW+5siUE54cMIDijil4WtsO0FfNJhmvKJvA5nQeHfCzJjTMfyZTsz67IWaxrZSASoTCdaqBb7ApGhNImoV9deOu2XMmGoxL5Shqt8Js5nIk2SJlQtxTTkyLQ4CYQjfD7HxXp1WGw7AKgFVhc9QU+3KUL3YXvd4pDgL8bpABuNa8daAw1toKE0cY26YaIJ0ot0L0kMzBzixnQAUwITjsuqOAruqAzWZ5o0PQ4t+riDNKF6j/xGKsZ X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:49.3255 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5be98c0a-f33f-4396-7038-08de9f245f27 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN2PEPF0000449D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR08MB6178 X-purgate-ID: tlsNG-d62444/1776720773-BF67FFF4-BEF9941C/0/0 X-purgate-type: clean X-purgate-size: 2817 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720797186158500 Content-Type: text/plain; charset="utf-8" Following the x86 implementation in commit e96831ece819, this commit adds the CONFIG_ALTP2M Kconfig option for ARM. This makes it possible to build Xen without building altp2m code. This commit also implements a stub for p2m_altp2m_check, as some implementation is needed when CONFIG_ALTP2M is enabled. This is due to a call to p2m_altp2m_check in vm_event.c which is gated by CONFIG_ALTP2M. This is commit 7/8 of the preparation phase. Signed-off-by: Rose Spangler Signed-off-by: Aqib Javaid --- v6: Introduced this patch. --- xen/arch/arm/Kconfig | 11 +++++++++++ xen/arch/arm/altp2m.c | 9 +++++++++ xen/arch/arm/include/asm/altp2m.h | 18 ++++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index 2f2b501fdac4..fdf0721c3c03 100644 --- a/xen/arch/arm/Kconfig +++ b/xen/arch/arm/Kconfig @@ -98,6 +98,17 @@ config MPU systems supporting EL2. (UNSUPPORTED) endchoice =20 +config ALTP2M + bool "Alternate P2M support" if EXPERT + depends on MMU + default y + help + Alternate-p2m allows a guest to manage multiple p2m guest physical + "memory views" (as opposed to a single p2m). + Useful for memory introspection. + + If unsure, stay with defaults. + source "arch/Kconfig" =20 config ACPI diff --git a/xen/arch/arm/altp2m.c b/xen/arch/arm/altp2m.c index 2bd1ff4df223..8bd174ea8f37 100644 --- a/xen/arch/arm/altp2m.c +++ b/xen/arch/arm/altp2m.c @@ -5,6 +5,15 @@ * Copyright (c) 2016 Sergej Proskurin */ =20 +#include + +/* Check to see if vcpu should be switched to a different p2m. */ +void p2m_altp2m_check(struct vcpu *v, uint16_t idx) +{ + /* Not yet implemented */ + BUG(); +} + /* * Local variables: * mode: C diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h index ca836bae7330..698c35427e75 100644 --- a/xen/arch/arm/include/asm/altp2m.h +++ b/xen/arch/arm/include/asm/altp2m.h @@ -11,10 +11,12 @@ =20 #include =20 +#ifdef CONFIG_ALTP2M + +/* Hardware always supports altp2m on ARM */ static inline bool altp2m_supported(void) { - /* Not implemented yet */ - return false; + return true; } =20 /* Alternate p2m VCPU */ @@ -25,6 +27,18 @@ static inline uint16_t altp2m_vcpu_idx(const struct vcpu= *v) return 0; } =20 +#else /* CONFIG_ALTP2M */ + +static inline bool altp2m_supported(void) +{ + return false; +} + +/* Only declaration is needed. DCE will optimise it out when linking. */ +uint16_t altp2m_vcpu_idx(const struct vcpu *v); + +#endif /* CONFIG_ALTP2M */ + #endif /* __ASM_ARM_ALTP2M_H */ =20 /* --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720804; cv=pass; d=zohomail.com; s=zohoarc; b=bRkWfY9/UHfpYSgjXQ8N458yuNvD7P4u+ciYbDNZGI6FOSbkVhW3iUKNYVXUGOrMDzRkogK/3gvqMB0JcnR5s/xe8d+glVXF6gppFxFkzngF7kw49ZjxWUKBvZeDhTl3ySD26+g0lbTyBEKQrTpmvHT/oZyRvBZmqMjhPJXdsSI= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720804; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2Xr6LLXjzqnGjZ+q/CL1Op56Lgquh9rAvy51mivO1rA=; b=JqDbUNmt3/6yUPcCVtK+9xIDxzckbqp5qteROpKdYmiONjKg5OXLo8fy0MQScjQl5FAzR0m9O2lxJaGC/QcLDacjfzSy4HhVSu0vTvyelrBVxbTs+7VuglgKRPToLO6kluBMNHo2QGrF6zZ+Vc1ZLXOZOXofjuyjA1NkHu7F0YU= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720804457203.86439041469646; Mon, 20 Apr 2026 14:33:24 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287764.1568178 (Exim 4.92) (envelope-from ) id 1wEwEp-0000H1-0H; Mon, 20 Apr 2026 21:33:03 +0000 Received: by outflank-mailman (output) from mailman id 1287764.1568178; Mon, 20 Apr 2026 21:33:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEo-0000GG-SU; Mon, 20 Apr 2026 21:33:02 +0000 Received: by outflank-mailman (input) for mailman id 1287764; Mon, 20 Apr 2026 21:33:01 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEn-0008Pq-3m for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:01 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEm-00CCKM-Gw for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:00 +0200 Received: from [10.42.69.10] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b69-bab6-0a2a0a5309dd-0a2a450a8c08-16 for ; Mon, 20 Apr 2026 23:33:00 +0200 Received: from [52.101.56.99] (helo=BN1PR04CU002.outbound.protection.outlook.com) by tlsNG-4011c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b8a-56b3-0a2a450a0019-346538632a9f-3 for ; Mon, 20 Apr 2026 23:33:00 +0200 Received: from IA1P220CA0016.NAMP220.PROD.OUTLOOK.COM (2603:10b6:208:464::10) by SJ2PR08MB8837.namprd08.prod.outlook.com (2603:10b6:a03:564::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:32:50 +0000 Received: from BL6PEPF0001AB4D.namprd04.prod.outlook.com (2603:10b6:208:464:cafe::5e) by IA1P220CA0016.outlook.office365.com (2603:10b6:208:464::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:50 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BL6PEPF0001AB4D.mail.protection.outlook.com (10.167.242.71) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:49 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzH454z6z1wdP; Mon, 20 Apr 2026 14:32:48 -0700 (PDT) Received: from SN1PR07CU001.outbound.protection.outlook.com (mail-sn1pr07cu00107.outbound.protection.outlook.com [40.93.14.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:48 -0700 (PDT) Received: from SJ0PR13CA0185.namprd13.prod.outlook.com (2603:10b6:a03:2c3::10) by SA3PR08MB8827.namprd08.prod.outlook.com (2603:10b6:806:37f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:32:40 +0000 Received: from SJ1PEPF000026C7.namprd04.prod.outlook.com (2603:10b6:a03:2c3:cafe::28) by SJ0PR13CA0185.outlook.office365.com (2603:10b6:a03:2c3::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:40 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C7.mail.protection.outlook.com (10.167.244.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:39 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:36 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=GN8IGpfUZKXiGY7c9btOQDr+GoZ9NhAHKxKGZApqy4Z+6Tthj8fq3U7jDU8dakJgTPnIhdW3KBoQ0zcxnhEatHbKICUQDBxdDlswf/kM1kaVvn/sOA/CJphfCq3ggtmM0qBxBNdp2HIHrsr4s0kNhRwE4O7rVk+ZNQA5N3oPRyQ4bR1wJqF/p5/qimckHPnceR0zymOSEsYmxeKHVNNBe1f38rH226E/Iayef8/+FE2JMVfXJzaNDzGvrmDfg5B1uSHHquRBkYQchbR5+GhiVALBaT9MInLtVbQ8P2523VP+clCXrQ3WWkEEl2s5qqqwLyTph74YC9ujVmi44DJEtQ== ARC-Message-Signature: i=2; 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=2Xr6LLXjzqnGjZ+q/CL1Op56Lgquh9rAvy51mivO1rA=; b=HXw4XFvnQA3/7yanLk0roDwMWU8a76QaiblqQCEnw5OP+vRvCe1HGAQv9sFDsWeowUAzkTgDxNxFLR49zjBCIELe64GIzdLUidzvG9Ulo1FTX4a0yTuPdRtcAd/9rP+mmvZ2atVt4BSynqpynLoByV0czsxqfijlFUtkaDB9l1kAIUqr8XLQF0rjoSsqYeK2dlJlNnNNF9c3n7Wmnu30jvKAtsbG+Fzx5E/mUIdmzJ7IfxpjHAW/gGm4GVD5qeYsE0zrR3C4+x4PAmWH/TaRWZTpBvr/K+O+0ehuYX4hIRpkNuRmNBKSiwSA+ZuReK7JygOl3jRUGX097CKA+bP+5Q== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.14.103) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2Xr6LLXjzqnGjZ+q/CL1Op56Lgquh9rAvy51mivO1rA=; b=qiO5/zCMqmeA5lbuxL9krbMOEb73xOg7AJaPX1XbKRo60LPPjL2lS1m7AEBxphlkiadTrbkwznHeLVD01cI1dGxROazNdjZ4cM2tvzjsIF/AlXbu5pb/rI9shVst6Zjb2QmWUtxy6LIDX0sKyVp/K9vDcqQ8V2sBvZVKDgkFbZI= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.14.103) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.14.103 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.14.103; helo=SN1PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Y6THxcZhbHOnZTXDmfiYtmfXKPFOUElAYwWhBP/7UPTV5n+FjHHwzHqlgPQeojAoUCYXcUQIUxtf2E5K+T/TvIuHJdXM8QEJxQd8q080ZSI6qtkwlHT/86PvEVcrz6UGh4jHxs6djzbYaamcygHGs6dap4CrYED4Bd2AV1TIX+Og/VaPgAXlmwLJK69tHyglL1xme0PEMSW2u/n9nFMsCXTr4jBTQI1GNmBi0SujJ14w05AtGc8MjIgB0NXtwvB1f5GU0/9dsBDQZXEfPRbE0t1BCg8W0MgRKX5RGSSIrBYJ/bh1MgAHmZfKw0ji2d/l9tnW5aMzHN5P16KZiQ8Lig== 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=2Xr6LLXjzqnGjZ+q/CL1Op56Lgquh9rAvy51mivO1rA=; b=Lm+FvvBi1KkUsChrTLrtvq08TlzmUBhR0mcZ2u5GeQTnn7SIBnRB+8NWqWgzvB1qv8tnjaK3e8fdzJQHbwDBDKQJWhNBrJ7mzjrATpplMcZD0Fby25TvE3eMw8ZMwzqaKF5ragtmY0hStT5hTega3r3oFeC/+dJv4t9h5XOf1oW3nA7u1STVF4/B2RUu0CR5TUOxn+IoW6wwQSO2nGVgQHdTE6f/+te4aEWIPr5dIYBYHtHg6y5AOvygf8jluOSOh1brg3PM2X8yQ7kItEMqGbpa9XkQMnuGB6vdxXqJcZN5KoVBU61rOeqimNZri7uxLykZQWcEkO8cJi2dIPlrXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2Xr6LLXjzqnGjZ+q/CL1Op56Lgquh9rAvy51mivO1rA=; b=qiO5/zCMqmeA5lbuxL9krbMOEb73xOg7AJaPX1XbKRo60LPPjL2lS1m7AEBxphlkiadTrbkwznHeLVD01cI1dGxROazNdjZ4cM2tvzjsIF/AlXbu5pb/rI9shVst6Zjb2QmWUtxy6LIDX0sKyVp/K9vDcqQ8V2sBvZVKDgkFbZI= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Andrew Cooper , Anthony PERARD , "Jan Beulich" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Tamas K Lengyel Subject: [RFC PATCH v6 08/43] altp2m: Rename p2m_*_altp2m functions and move declarations out of p2m.h Date: Mon, 20 Apr 2026 17:31:31 -0400 Message-ID: <20260420213206.208750-9-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C7:EE_|SA3PR08MB8827:EE_|BL6PEPF0001AB4D:EE_|SJ2PR08MB8837:EE_ X-MS-Office365-Filtering-Correlation-Id: 80cac74d-727e-469d-773a-08de9f245f42 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|36860700016|1800799024|7416014|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?YDXCrlzhw+5E+4mRzkAVrN2MWVlW4Yupi+CYHIbVNMq0ihxZIZL28VOSG49i?= =?us-ascii?Q?XvQSOS91sTfg5X+hTNftuPTp0r3XL3SSj9Yx77nB3Wp82QJIK91h539tcwK7?= =?us-ascii?Q?8iytmJ4zJVg/RtamGVyFZMUWVcbo1gNROOxixLPpP3z23mmfs4jjWelCxHUm?= =?us-ascii?Q?0xm4WWBdfSroa4B1/cbqH6K7OSv71/ZaCr7UJ1beuGBb71QIJz57b69YEGuk?= =?us-ascii?Q?fRkufjKywUazvgA/TBjjJh46nuWwEY5LFL2I6RIPbNt/F/rmrbLtt1eS8SE+?= =?us-ascii?Q?QcYfjeJUkCzANo3H2LK033GBPSYI9Xu2wyoud2y+g6sjSkQgOyCRKIg5NLCg?= =?us-ascii?Q?TgyY5/IR++lFu6/90ImRoN2LBhR8MA8kIC3V9PsO5odQkcwefKsvL4q4ovtF?= =?us-ascii?Q?SYBRQwRtfuBo3YpwG9Fx3CQRdcPD0ZdOBKVgwmf1fvm+6Io7UxpGd9EJ0nZM?= =?us-ascii?Q?siCQ4x1/P9ZjnGUE5NY+N+nDCqegH5VdNwcNxrpgdamg4BGVDEifyqgUyUBd?= =?us-ascii?Q?gFO7cYSJ0QhUEPI6ZzTWv/fBdc7meo+DIhJ8pmiRb82WyDgUuCkU3dESlfHG?= =?us-ascii?Q?yVq4NhN924XpSXq0uPrObrlKH+g3t/zHO+ByVvlnaRodqvN1WOMokJSakM22?= =?us-ascii?Q?+DPwEYA2V2ILrmRqxoYhsCdq5VgQqw+LwSNQCH6AxtTFZ2ZHIf+Udyv+aiBS?= =?us-ascii?Q?u36dnuqlIvgLgc7Ek9K5RPgw12oVO6sRP4UrTXggTnn8jkDweHmjmU1SeX2I?= =?us-ascii?Q?kwz+8eXRx21VBvBLVDkp5egNNwcTIWmpIwzRRxuv3NS/qY0MgdAkhyh/efZk?= =?us-ascii?Q?6puoMIQX4417jOZyWYiDVgIRqQfT+Qipcqa4mtuBe0VJ3TCHfJj0yFZNem8/?= =?us-ascii?Q?6gRVTxUp5nP9ygZ4aUlw6OHfhUo8sGb8vk2Qdv3BX/IfciwM6UJDqOpDaGdn?= =?us-ascii?Q?QzlqnM765ntrWiIpkAgSmGFQi8xCUe8Lv6i21WTRoW716Hv5PN/siAUBfoYd?= =?us-ascii?Q?S128z4gyAGWJ0R2vy3nQ1nKzQKXdjs4oDu/8W8WnHOIg4mTKKPNIzluRshWV?= =?us-ascii?Q?RYcRecYxjWcTnC9HWy8SAh2EIu40ZSlggWiza1pT3n/lBSzbxtIcWYb9l24g?= =?us-ascii?Q?XHkL7tX+ehnLGfDDyissu2QxQrKJOyRJCadbYQyqZTNemChLx38ucxCXEBSz?= =?us-ascii?Q?xvtveDCQMZhOI1eWpc3Wfl473Swj1C6d7Tz//g=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(7416014)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: QxOZqGNcb7paGVJxIuWGfCynZUdsUllIrMA55a9MlNESC9eoPdxpiqKvPnJoba0AxHNzZyUMakCItYLoSVct/UIf1DB210QlWribOOSPj/migMq15ewoysuNrlQflbtdyY8gy1dvO9sD0RrbH24pY6oauu92aJBANeV+8J+UCkH+0CHrvmNpWLSfOSq0WPWnt0Vkb76oRwmHWLabiJJjpGcKfMpzpzmDMEp5E49RrGA4VL3soRJB0RPefrYkGyDRYB2IE4RxA5OxaiGRiGV5WuGWgH2fAbMtAC43kbaPw2wzHruBNC2XDdh3xvSrRg2xyzYMhogY6RMOAblaj6xSAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR08MB8827 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.14.103];domain=SN1PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.14.103];domain=SN1PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BL6PEPF0001AB4D.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 719c4f26-f580-4e99-2fe9-08de9f245972 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|376014|7416014|14060799003|35042699022|82310400026|156008|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Prvmx+lx90P58KIkTqTGnmhCtmegLIJkImUoZx8S+SY4ei7iqXxRafkSeiUQ?= =?us-ascii?Q?eA3H6obowB2cI7XLNqLFhE0n9bayrw+Xz9jx8sIMmUGfOjp/05ohwPMjVZjZ?= =?us-ascii?Q?YlkfGMiTQfTNp9XMuynRHjyHOmJ2XCbsBcCIWQyV8sHdDu/i2/fhE69o3ZHn?= =?us-ascii?Q?3dEQZLVjIEoOugjEr03Pr/v45dTLDUJSa1cRKJ3/9cWyHYNB63npXWCmsoXk?= =?us-ascii?Q?s2ndrZNfYbKh8MBaxPXgYdrcaeHw+B7WoqbgBM6ADTGQ9IMYQYpgWQRvainw?= =?us-ascii?Q?iJ6I8hKZRYHFdR5Pybz2ofETh/1HoukLw/GJnaAs/PQUCRNSrGLGaGwO+DCK?= =?us-ascii?Q?goZlnRDscJSJe/OJMrwj8u8MHbB6ftc+1lw3Cl5ofVbRQRI7w7ahFGJ0h/5E?= =?us-ascii?Q?dMwF19C9UN5NuHDbBczJ1B/PduBRozmKsqUhrPQH0zUTgImr3V5IPm4m/NGD?= =?us-ascii?Q?RqE0xlVa9a+fF2mnYXLi3yCooQxSWNavuwiXvtZwAjL6TJfMxP5rW6nj0dwG?= =?us-ascii?Q?gK559xegsfD9ENZQ5ixh712tkucfLiTbFC4xw/qsjOjbcGUczQUMfpPx/fbL?= =?us-ascii?Q?NJyFMkfHCI6PM1Dwpr2T1jZCbz4g90f+HIjo+ULXAj3Je2Ws1UeTjVxevmzG?= =?us-ascii?Q?9yaCnEi09fttaCKuj9PRLfDfUMf6FgUNdSEwXv68A4ncHdmK0FNWU4XuxZTb?= =?us-ascii?Q?j4TMtshID+zWOZHElBmE2K9znNZHOTaAV8mr8MgRUDTv1G0Uo8BvBAEojP5u?= =?us-ascii?Q?3rqhAuSE22WaLBDgl+nrL4BfqIg7+U3KxaDdM05D33A8JJD+MUQ7MUFnvcHw?= =?us-ascii?Q?FIqhgPu5ojXO+Ky/bOoRT2+XR+h4MwYxfZoP7HNCchLoggjgWV41HDc4WXHQ?= =?us-ascii?Q?cILctgAlqo+thPnlQprmCo8nKH10Ompfxhuo0MoEYY29p1nHgmE30EfaXOXi?= =?us-ascii?Q?xdPR/A5tvHLXuK0BkjQaalKx7g5/IkVkKBImkw3n6hXUfimdVuC/mrXIbYFN?= =?us-ascii?Q?SVXOfoaDGIe+xU4a6jcpWEKtXjTE1VQblsEnCdNwu1BPPDNU2mpqBMZiY7J9?= =?us-ascii?Q?b+gn/NOpHTCTWAGwbjYcAoeilpQlvI0614r0Sh5Sy9kSjY12JHPmj+k83ZQ0?= =?us-ascii?Q?OkVRJmgvo7QpZMgXtxvP7De5v28dcL6HlQq8ExVy9uttU4sf3M3ommDCsd7f?= =?us-ascii?Q?iBbjgNrRXi+h4T7nLwmqtxrkVEIZ0MkKElNfMw=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN1PR07CU001.outbound.protection.outlook.com;PTR:mail-sn1pr07cu00107.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(376014)(7416014)(14060799003)(35042699022)(82310400026)(156008)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZjekY8MFl0nXFrjGpv9K0LoMduEov5ssr96fU6DEHfseF+iCh0exQjhFqNZ2W06QSYvWk5ninQEl1+c4cYigKoD5v/eWCCD6N0uzi0KX4cPu8TtuLHcsNoOStOO744oZvpIPorK/BFK3k7AhxQ5EDTVZGvtyOGmKiqWnkjcaWmOwAuYMPXOOgYSwefEu30KOxMw4WjkuUgy/M0I2mWbyPYCcnTjQRHRj/Ih5UpRXsdstJiXyxCl2SnVRfk2wCwQZ6YBpb9GmN+vf+ZSvTcE9bU4YaKcE4887HiTXqnkOz4Ny+A3MECXQlY4abfkYf70WFYKsRwwQnx3FeHXmXLSgzEtyaFDpZ6Ijog+OKxJQQP3B6jwe8ATUwmoN6rxfeHVcmKN3mWvzlL8IiSrLnSaHnmVyiSXB2iC16n/DpHsWSg324s4Xb9H+BvY5/pOxvtZb X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:49.5644 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 80cac74d-727e-469d-773a-08de9f245f42 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BL6PEPF0001AB4D.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR08MB8837 X-purgate-ID: tlsNG-4011c0/1776720780-4777D8B7-72F31C00/0/0 X-purgate-type: clean X-purgate-size: 32242 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720805340158500 Content-Type: text/plain; charset="utf-8" This commit renames altp2m functions with a p2m prefix. These functions were originally defined in p2m.c, hence the p2m prefix. When they were moved to altp2m.c in commit ae7584f63678, the function names were kept and the declarations remained in p2m.h. This commit finishes that move by renaming these functions to have an altp2m prefix and moving the declarations to altp2m.h. Since these functions will either be moved to the common altp2m.c, or implemented separately for ARM, it doesn't seem to make sense to continue with this naming convention. Therefore, this commit preemptively renames the x86 implementations of these functions so they can later be implemented with altp2m function name prefixes in common code or for ARM. For convenience, here is the full list of renames: - p2m_init_altp2m -> altp2m_init - p2m_teardown_altp2m -> altp2m_teardown - p2m_flush_altp2m -> altp2m_flush - p2m_altp2m_get_or_propagate -> altp2m_get_or_propagate - p2m_altp2m_propagate_change -> altp2m_propagate_change - p2m_get_altp2m -> altp2m_get_altp2m - p2m_set_altp2m -> altp2m_set_altp2m - p2m_reset_altp2m -> altp2m_reset_altp2m - p2m_activate_altp2m -> altp2m_activate_altp2m - p2m_init_altp2m_by_id -> altp2m_init_by_id - p2m_init_next_altp2m -> altp2m_init_next_available - p2m_destroy_altp2m_by_id -> altp2m_destroy_by_id - p2m_switch_domain_altp2m_by_id -> altp2m_switch_domain_altp2m_by_id - p2m_change_altp2m_gfn -> altp2m_change_gfn - p2m_set_altp2m_view_visibility -> altp2m_set_view_visibility This commit contains only function renames and code movement, and no functional change is intended. This is commit 8/8 of the preparation phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/arm/altp2m.c | 2 +- xen/arch/x86/hvm/hvm.c | 30 ++++---- xen/arch/x86/hvm/monitor.c | 2 +- xen/arch/x86/hvm/vmx/vmx.c | 6 +- xen/arch/x86/include/asm/altp2m.h | 116 +++++++++++++++++++++++++++++- xen/arch/x86/include/asm/p2m.h | 109 ---------------------------- xen/arch/x86/mm/altp2m.c | 76 ++++++++++---------- xen/arch/x86/mm/mem_access.c | 13 ++-- xen/arch/x86/mm/p2m-basic.c | 4 +- xen/arch/x86/mm/p2m-ept.c | 4 +- xen/arch/x86/mm/p2m.h | 3 - xen/common/vm_event.c | 2 +- xen/include/xen/p2m-common.h | 2 +- 13 files changed, 186 insertions(+), 183 deletions(-) diff --git a/xen/arch/arm/altp2m.c b/xen/arch/arm/altp2m.c index 8bd174ea8f37..339f82835caf 100644 --- a/xen/arch/arm/altp2m.c +++ b/xen/arch/arm/altp2m.c @@ -8,7 +8,7 @@ #include =20 /* Check to see if vcpu should be switched to a different p2m. */ -void p2m_altp2m_check(struct vcpu *v, uint16_t idx) +void altp2m_check(struct vcpu *v, uint16_t idx) { /* Not yet implemented */ BUG(); diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index bc35efdf2c02..5b6e91adce17 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1885,15 +1885,15 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned= long gla, =20 if ( altp2m_active(currd) ) { - p2m =3D p2m_get_altp2m(curr); + p2m =3D altp2m_get_altp2m(curr); =20 /* * Get the altp2m entry if present; or if not, propagate from * the host p2m. NB that this returns with gfn locked in the * altp2m. */ - if ( p2m_altp2m_get_or_propagate(p2m, gfn, &mfn, &p2mt, - &p2ma, &page_order) ) + if ( altp2m_get_or_propagate(p2m, gfn, &mfn, &p2mt, &p2ma, + &page_order) ) { /* Entry was copied from host -- retry fault */ rc =3D 1; @@ -2036,7 +2036,7 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned l= ong gla, paging_mark_pfn_dirty(currd, _pfn(gfn)); /* * If p2m is really an altp2m, unlock it before changing the t= ype, - * as p2m_altp2m_propagate_change() needs to acquire the + * as altp2m_propagate_change() needs to acquire the * altp2m_list lock. */ if ( p2m !=3D hostp2m ) @@ -4663,7 +4663,7 @@ static int do_altp2m_op( =20 /* If the alternate p2m state has changed, handle appropriately */ if ( d->altp2m_active !=3D ostate && - (ostate || !(rc =3D p2m_init_altp2m_by_id(d, 0))) ) + (ostate || !(rc =3D altp2m_init_by_id(d, 0))) ) { for_each_vcpu( d, v ) { @@ -4674,7 +4674,7 @@ static int do_altp2m_op( } =20 if ( ostate ) - p2m_flush_altp2m(d); + altp2m_flush(d); } else if ( rc ) d->altp2m_active =3D false; @@ -4729,17 +4729,18 @@ static int do_altp2m_op( } =20 case HVMOP_altp2m_create_p2m: - if ( !(rc =3D p2m_init_next_altp2m(d, &a.u.view.view, - a.u.view.hvmmem_default_access)) ) + rc =3D altp2m_init_next_available(d, &a.u.view.view, + a.u.view.hvmmem_default_access); + if ( !rc ) rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; break; =20 case HVMOP_altp2m_destroy_p2m: - rc =3D p2m_destroy_altp2m_by_id(d, a.u.view.view); + rc =3D altp2m_destroy_by_id(d, a.u.view.view); break; =20 case HVMOP_altp2m_switch_p2m: - rc =3D p2m_switch_domain_altp2m_by_id(d, a.u.view.view); + rc =3D altp2m_switch_domain_altp2m_by_id(d, a.u.view.view); break; =20 case HVMOP_altp2m_set_suppress_ve: @@ -4871,9 +4872,9 @@ static int do_altp2m_op( if ( a.u.change_gfn.pad1 || a.u.change_gfn.pad2 ) rc =3D -EINVAL; else - rc =3D p2m_change_altp2m_gfn(d, a.u.change_gfn.view, - _gfn(a.u.change_gfn.old_gfn), - _gfn(a.u.change_gfn.new_gfn)); + rc =3D altp2m_change_gfn(d, a.u.change_gfn.view, + _gfn(a.u.change_gfn.old_gfn), + _gfn(a.u.change_gfn.new_gfn)); break; =20 case HVMOP_altp2m_get_p2m_idx: @@ -4906,8 +4907,7 @@ static int do_altp2m_op( else if ( !altp2m_active(d) ) rc =3D -EOPNOTSUPP; else - rc =3D p2m_set_altp2m_view_visibility(d, idx, - a.u.set_visibility.visible= ); + rc =3D altp2m_set_view_visibility(d, idx, a.u.set_visibility.v= isible); break; } =20 diff --git a/xen/arch/x86/hvm/monitor.c b/xen/arch/x86/hvm/monitor.c index 84c1c2234ca9..78137220b22a 100644 --- a/xen/arch/x86/hvm/monitor.c +++ b/xen/arch/x86/hvm/monitor.c @@ -182,7 +182,7 @@ int hvm_monitor_debug(unsigned long rip, enum hvm_monit= or_debug_type type, #ifdef CONFIG_ALTP2M if ( curr->arch.hvm.fast_single_step.enabled ) { - p2m_altp2m_check(curr, curr->arch.hvm.fast_single_step.p2midx); + altp2m_check(curr, curr->arch.hvm.fast_single_step.p2midx); curr->arch.hvm.single_step =3D false; curr->arch.hvm.fast_single_step.enabled =3D false; curr->arch.hvm.fast_single_step.p2midx =3D 0; diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 0909929c00e0..f2cf95ee500e 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2452,7 +2452,7 @@ static void cf_check vmx_vcpu_update_eptp(struct vcpu= *v) struct ept_data *ept; =20 if ( altp2m_active(d) ) - p2m =3D p2m_get_altp2m(v); + p2m =3D altp2m_get_altp2m(v); if ( !p2m ) p2m =3D p2m_get_hostp2m(d); =20 @@ -2521,7 +2521,7 @@ static int cf_check vmx_vcpu_emulate_vmfunc(const str= uct cpu_user_regs *regs) =20 if ( !cpu_has_vmx_vmfunc && altp2m_active(curr->domain) && regs->eax =3D=3D 0 && - p2m_switch_vcpu_altp2m_by_id(curr, regs->ecx) ) + altp2m_switch_vcpu_by_id(curr, regs->ecx) ) rc =3D X86EMUL_OKAY; =20 return rc; @@ -4277,7 +4277,7 @@ void asmlinkage vmx_vmexit_handler(struct cpu_user_re= gs *regs) } } =20 - p2m_set_altp2m(v, idx); + altp2m_set_altp2m(v, idx); } =20 if ( vm_event_is_enabled(v) && diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index 07e760f60659..9c58a396448d 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -7,12 +7,33 @@ #ifndef __ASM_X86_ALTP2M_H #define __ASM_X86_ALTP2M_H =20 -#ifdef CONFIG_ALTP2M =20 #include #include /* for struct vcpu, struct domain */ + +#include #include /* for vcpu_altp2m */ =20 +/* + * Common alternate p2m declarations that need to be visible + * regardless of CONFIG_ALTP2M + */ + +/* Alternate p2m paging */ +bool altp2m_get_or_propagate(struct p2m_domain *ap2m, unsigned long gfn_l, + mfn_t *mfn, p2m_type_t *p2mt, p2m_access_t *p= 2ma, + unsigned int *page_order); + +/* Propagate a host p2m change to all alternate p2m's */ +int altp2m_propagate_change(struct domain *d, gfn_t gfn, mfn_t mfn, + unsigned int page_order, p2m_type_t p2mt, + p2m_access_t p2ma); + +#ifdef CONFIG_ALTP2M + +#define AP2MGET_prepopulate true +#define AP2MGET_query false + static inline bool altp2m_is_eptp_valid(const struct domain *d, unsigned int idx) { @@ -39,6 +60,85 @@ static inline uint16_t altp2m_vcpu_idx(const struct vcpu= *v) return vcpu_altp2m(v).p2midx; } =20 +/* + * Alternate p2m: shadow p2m tables used for alternate memory views + */ + +/* get current alternate p2m table */ +static inline struct p2m_domain *altp2m_get_altp2m(struct vcpu *v) +{ + unsigned int index =3D vcpu_altp2m(v).p2midx; + + if ( index =3D=3D INVALID_ALTP2M ) + return NULL; + + BUG_ON(index >=3D v->domain->nr_altp2m); + + return v->domain->altp2m_p2m[index]; +} + +/* set current alternate p2m table */ +static inline bool altp2m_set_altp2m(struct vcpu *v, unsigned int idx) +{ + struct p2m_domain *orig; + + BUG_ON(idx >=3D v->domain->nr_altp2m); + + if ( idx =3D=3D vcpu_altp2m(v).p2midx ) + return false; + + orig =3D altp2m_get_altp2m(v); + BUG_ON(!orig); + atomic_dec(&orig->active_vcpus); + + vcpu_altp2m(v).p2midx =3D idx; + atomic_inc(&v->domain->altp2m_p2m[idx]->active_vcpus); + + return true; +} + +/* Initialize altp2m views */ +int altp2m_init(struct domain *d); + +/* Free altp2m views */ +void altp2m_teardown(struct domain *d); + +/* Switch alternate p2m for a single vcpu */ +bool altp2m_switch_vcpu_by_id(struct vcpu *v, unsigned int idx); + +/* Flush all the alternate p2m's for a domain */ +void altp2m_flush(struct domain *d); + +/* Make a specific alternate p2m valid */ +int altp2m_init_by_id(struct domain *d, unsigned int idx); + +/* Find an available alternate p2m and make it valid */ +int altp2m_init_next_available(struct domain *d, uint16_t *idx, + xenmem_access_t hvmmem_default_access); + +/* Make a specific alternate p2m invalid */ +int altp2m_destroy_by_id(struct domain *d, unsigned int idx); + +/* Switch alternate p2m for entire domain */ +int altp2m_switch_domain_altp2m_by_id(struct domain *d, unsigned int idx); + +/* Change a gfn->mfn mapping */ +int altp2m_change_gfn(struct domain *d, unsigned int idx, gfn_t old_gfn, + gfn_t new_gfn); + +/* Set a specific p2m view visibility */ +int altp2m_set_view_visibility(struct domain *d, unsigned int altp2m_idx, + uint8_t visible); + +/* + * Looks up altp2m entry. If the entry is not found it looks up the entry = in + * hostp2m. + * The prepopulate param is used to set the found entry in altp2m. + */ +int altp2m_get_effective_entry(struct p2m_domain *ap2m, gfn_t gfn, mfn_t *= mfn, + p2m_type_t *t, p2m_access_t *a, + bool prepopulate); + /* Alternate p2m VCPU */ void altp2m_vcpu_initialise(struct vcpu *v); void altp2m_vcpu_destroy(struct vcpu *v); @@ -69,7 +169,21 @@ static inline bool altp2m_supported(void) return false; } =20 +static inline int _altp2m_get_effective_entry(struct p2m_domain *ap2m, + gfn_t gfn, mfn_t *mfn, + p2m_type_t *t, p2m_access_t *= a) +{ + ASSERT_UNREACHABLE(); + return -EOPNOTSUPP; +} +#define altp2m_get_effective_entry(ap2m, gfn, mfn, t, a, prepopulate) \ + _altp2m_get_effective_entry(ap2m, gfn, mfn, t, a) + /* Only declaration is needed. DCE will optimise it out when linking. */ +int altp2m_init(struct domain *d); +void altp2m_teardown(struct domain *d); +struct p2m_domain *altp2m_get_altp2m(struct vcpu *v); +bool altp2m_set_altp2m(struct vcpu *v, unsigned int idx); uint16_t altp2m_vcpu_idx(const struct vcpu *v); void altp2m_vcpu_initialise(struct vcpu *v); void altp2m_vcpu_destroy(struct vcpu *v); diff --git a/xen/arch/x86/include/asm/p2m.h b/xen/arch/x86/include/asm/p2m.h index ec871717a9e4..5110b3e77807 100644 --- a/xen/arch/x86/include/asm/p2m.h +++ b/xen/arch/x86/include/asm/p2m.h @@ -582,30 +582,6 @@ static inline gfn_t mfn_to_gfn(const struct domain *d,= mfn_t mfn) return _gfn(mfn_x(mfn)); } =20 -#ifdef CONFIG_ALTP2M -#define AP2MGET_prepopulate true -#define AP2MGET_query false - -/* - * Looks up altp2m entry. If the entry is not found it looks up the entry = in - * hostp2m. - * The prepopulate param is used to set the found entry in altp2m. - */ -int altp2m_get_effective_entry(struct p2m_domain *ap2m, gfn_t gfn, mfn_t *= mfn, - p2m_type_t *t, p2m_access_t *a, - bool prepopulate); -#else -static inline int _altp2m_get_effective_entry(struct p2m_domain *ap2m, - gfn_t gfn, mfn_t *mfn, - p2m_type_t *t, p2m_access_t *= a) -{ - ASSERT_UNREACHABLE(); - return -EOPNOTSUPP; -} -#define altp2m_get_effective_entry(ap2m, gfn, mfn, t, a, prepopulate) \ - _altp2m_get_effective_entry(ap2m, gfn, mfn, t, a) -#endif - /* Init the datastructures for later use by the p2m code */ int p2m_init(struct domain *d); =20 @@ -885,91 +861,6 @@ void shadow_p2m_init(struct p2m_domain *p2m); void cf_check nestedp2m_write_p2m_entry_post( struct p2m_domain *p2m, unsigned int oflags); =20 -#ifdef CONFIG_ALTP2M - -/* - * Alternate p2m: shadow p2m tables used for alternate memory views - */ - -/* get current alternate p2m table */ -static inline struct p2m_domain *p2m_get_altp2m(struct vcpu *v) -{ - unsigned int index =3D vcpu_altp2m(v).p2midx; - - if ( index =3D=3D INVALID_ALTP2M ) - return NULL; - - BUG_ON(index >=3D v->domain->nr_altp2m); - - return v->domain->altp2m_p2m[index]; -} - -/* set current alternate p2m table */ -static inline bool p2m_set_altp2m(struct vcpu *v, unsigned int idx) -{ - struct p2m_domain *orig; - - BUG_ON(idx >=3D v->domain->nr_altp2m); - - if ( idx =3D=3D vcpu_altp2m(v).p2midx ) - return false; - - orig =3D p2m_get_altp2m(v); - BUG_ON(!orig); - atomic_dec(&orig->active_vcpus); - - vcpu_altp2m(v).p2midx =3D idx; - atomic_inc(&v->domain->altp2m_p2m[idx]->active_vcpus); - - return true; -} - -/* Switch alternate p2m for a single vcpu */ -bool p2m_switch_vcpu_altp2m_by_id(struct vcpu *v, unsigned int idx); - -/* Flush all the alternate p2m's for a domain */ -void p2m_flush_altp2m(struct domain *d); - -/* Make a specific alternate p2m valid */ -int p2m_init_altp2m_by_id(struct domain *d, unsigned int idx); - -/* Find an available alternate p2m and make it valid */ -int p2m_init_next_altp2m(struct domain *d, uint16_t *idx, - xenmem_access_t hvmmem_default_access); - -/* Make a specific alternate p2m invalid */ -int p2m_destroy_altp2m_by_id(struct domain *d, unsigned int idx); - -/* Switch alternate p2m for entire domain */ -int p2m_switch_domain_altp2m_by_id(struct domain *d, unsigned int idx); - -/* Change a gfn->mfn mapping */ -int p2m_change_altp2m_gfn(struct domain *d, unsigned int idx, - gfn_t old_gfn, gfn_t new_gfn); - -/* Set a specific p2m view visibility */ -int p2m_set_altp2m_view_visibility(struct domain *d, unsigned int altp2m_i= dx, - uint8_t visible); - -#else /* !CONFIG_ALTP2M */ -struct p2m_domain *p2m_get_altp2m(struct vcpu *v); -bool p2m_set_altp2m(struct vcpu *v, unsigned int idx); -#endif /* CONFIG_ALTP2M */ - -/* - * Common alternate p2m declarations that need to be visible - * regardless of CONFIG_ALTP2M - */ - -/* Alternate p2m paging */ -bool p2m_altp2m_get_or_propagate(struct p2m_domain *ap2m, unsigned long gf= n_l, - mfn_t *mfn, p2m_type_t *p2mt, - p2m_access_t *p2ma, unsigned int *page_or= der); - =20 -/* Propagate a host p2m change to all alternate p2m's */ -int p2m_altp2m_propagate_change(struct domain *d, gfn_t gfn, - mfn_t mfn, unsigned int page_order, - p2m_type_t p2mt, p2m_access_t p2ma); #endif /* CONFIG_HVM */ =20 /* p2m access to IOMMU flags */ diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index 8dd3c0f96be0..2dc84b76b8c1 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -24,7 +24,7 @@ altp2m_vcpu_initialise(struct vcpu *v) vcpu_pause(v); =20 vcpu_altp2m(v).p2midx =3D 0; - atomic_inc(&p2m_get_altp2m(v)->active_vcpus); + atomic_inc(&altp2m_get_altp2m(v)->active_vcpus); =20 altp2m_vcpu_update_p2m(v); =20 @@ -43,7 +43,7 @@ altp2m_vcpu_destroy(struct vcpu *v) if ( v !=3D current ) vcpu_pause(v); =20 - if ( (p2m =3D p2m_get_altp2m(v)) ) + if ( (p2m =3D altp2m_get_altp2m(v)) ) atomic_dec(&p2m->active_vcpus); =20 altp2m_vcpu_disable_ve(v); @@ -123,7 +123,7 @@ void altp2m_vcpu_disable_ve(struct vcpu *v) } } =20 -int p2m_init_altp2m(struct domain *d) +int altp2m_init(struct domain *d) { unsigned int i; struct p2m_domain *p2m; @@ -140,7 +140,7 @@ int p2m_init_altp2m(struct domain *d) d->altp2m_p2m[i] =3D p2m =3D p2m_init_one(d); if ( p2m =3D=3D NULL ) { - p2m_teardown_altp2m(d); + altp2m_teardown(d); return -ENOMEM; } p2m->p2m_class =3D p2m_alternate; @@ -151,7 +151,7 @@ int p2m_init_altp2m(struct domain *d) return 0; } =20 -void p2m_teardown_altp2m(struct domain *d) +void altp2m_teardown(struct domain *d) { unsigned int i; struct p2m_domain *p2m; @@ -207,13 +207,13 @@ int altp2m_get_effective_entry(struct p2m_domain *ap2= m, gfn_t gfn, mfn_t *mfn, return 0; } =20 -void p2m_altp2m_check(struct vcpu *v, uint16_t idx) +void altp2m_check(struct vcpu *v, uint16_t idx) { if ( altp2m_active(v->domain) ) - p2m_switch_vcpu_altp2m_by_id(v, idx); + altp2m_switch_vcpu_by_id(v, idx); } =20 -bool p2m_switch_vcpu_altp2m_by_id(struct vcpu *v, unsigned int idx) +bool altp2m_switch_vcpu_by_id(struct vcpu *v, unsigned int idx) { struct domain *d =3D v->domain; bool rc =3D false; @@ -225,7 +225,7 @@ bool p2m_switch_vcpu_altp2m_by_id(struct vcpu *v, unsig= ned int idx) =20 if ( d->arch.altp2m_eptp[idx] !=3D mfn_x(INVALID_MFN) ) { - if ( p2m_set_altp2m(v, idx) ) + if ( altp2m_set_altp2m(v, idx) ) altp2m_vcpu_update_p2m(v); rc =3D 1; } @@ -246,9 +246,9 @@ bool p2m_switch_vcpu_altp2m_by_id(struct vcpu *v, unsig= ned int idx) * the host's entry to the altp2m (retaining page order), and indicate * that the caller should re-try the faulting instruction. */ -bool p2m_altp2m_get_or_propagate(struct p2m_domain *ap2m, unsigned long gf= n_l, - mfn_t *mfn, p2m_type_t *p2mt, - p2m_access_t *p2ma, unsigned int *page_or= der) +bool altp2m_get_or_propagate(struct p2m_domain *ap2m, unsigned long gfn_l, + mfn_t *mfn, p2m_type_t *p2mt, p2m_access_t *p= 2ma, + unsigned int *page_order) { p2m_type_t ap2mt; p2m_access_t ap2ma; @@ -319,8 +319,8 @@ enum altp2m_reset_type { ALTP2M_DEACTIVATE }; =20 -static void p2m_reset_altp2m(struct domain *d, unsigned int idx, - enum altp2m_reset_type reset_type) +static void altp2m_reset_altp2m(struct domain *d, unsigned int idx, + enum altp2m_reset_type reset_type) { struct p2m_domain *p2m; =20 @@ -344,7 +344,7 @@ static void p2m_reset_altp2m(struct domain *d, unsigned= int idx, p2m_unlock(p2m); } =20 -void p2m_flush_altp2m(struct domain *d) +void altp2m_flush(struct domain *d) { unsigned int i; =20 @@ -352,7 +352,7 @@ void p2m_flush_altp2m(struct domain *d) =20 for ( i =3D 0; i < d->nr_altp2m; i++ ) { - p2m_reset_altp2m(d, i, ALTP2M_DEACTIVATE); + altp2m_reset_altp2m(d, i, ALTP2M_DEACTIVATE); d->arch.altp2m_eptp[i] =3D mfn_x(INVALID_MFN); d->arch.altp2m_visible_eptp[i] =3D mfn_x(INVALID_MFN); } @@ -360,8 +360,8 @@ void p2m_flush_altp2m(struct domain *d) altp2m_list_unlock(d); } =20 -static int p2m_activate_altp2m(struct domain *d, unsigned int idx, - p2m_access_t hvmmem_default_access) +static int altp2m_activate_altp2m(struct domain *d, unsigned int idx, + p2m_access_t hvmmem_default_access) { struct p2m_domain *hostp2m, *p2m; int rc; @@ -399,9 +399,9 @@ static int p2m_activate_altp2m(struct domain *d, unsign= ed int idx, p2m_unlock(p2m); =20 return rc; -} + } =20 -int p2m_init_altp2m_by_id(struct domain *d, unsigned int idx) +int altp2m_init_by_id(struct domain *d, unsigned int idx) { int rc =3D -EINVAL; struct p2m_domain *hostp2m =3D p2m_get_hostp2m(d); @@ -413,14 +413,14 @@ int p2m_init_altp2m_by_id(struct domain *d, unsigned = int idx) =20 if ( d->arch.altp2m_eptp[array_index_nospec(idx, MAX_EPTP)] =3D=3D mfn_x(INVALID_MFN) ) - rc =3D p2m_activate_altp2m(d, idx, hostp2m->default_access); + rc =3D altp2m_activate_altp2m(d, idx, hostp2m->default_access); =20 altp2m_list_unlock(d); return rc; } =20 -int p2m_init_next_altp2m(struct domain *d, uint16_t *idx, - xenmem_access_t hvmmem_default_access) +int altp2m_init_next_available(struct domain *d, uint16_t *idx, + xenmem_access_t hvmmem_default_access) { int rc =3D -EINVAL; unsigned int i; @@ -438,7 +438,7 @@ int p2m_init_next_altp2m(struct domain *d, uint16_t *id= x, if ( d->arch.altp2m_eptp[i] !=3D mfn_x(INVALID_MFN) ) continue; =20 - rc =3D p2m_activate_altp2m(d, i, a); + rc =3D altp2m_activate_altp2m(d, i, a); =20 if ( !rc ) *idx =3D i; @@ -450,7 +450,7 @@ int p2m_init_next_altp2m(struct domain *d, uint16_t *id= x, return rc; } =20 -int p2m_destroy_altp2m_by_id(struct domain *d, unsigned int idx) +int altp2m_destroy_by_id(struct domain *d, unsigned int idx) { struct p2m_domain *p2m; int rc =3D -EBUSY; @@ -472,7 +472,7 @@ int p2m_destroy_altp2m_by_id(struct domain *d, unsigned= int idx) =20 if ( !_atomic_read(p2m->active_vcpus) ) { - p2m_reset_altp2m(d, idx, ALTP2M_DEACTIVATE); + altp2m_reset_altp2m(d, idx, ALTP2M_DEACTIVATE); d->arch.altp2m_eptp[array_index_nospec(idx, MAX_EPTP)] =3D mfn_x(INVALID_MFN); d->arch.altp2m_visible_eptp[array_index_nospec(idx, MAX_EPTP)]= =3D @@ -488,7 +488,7 @@ int p2m_destroy_altp2m_by_id(struct domain *d, unsigned= int idx) return rc; } =20 -int p2m_switch_domain_altp2m_by_id(struct domain *d, unsigned int idx) +int altp2m_switch_domain_altp2m_by_id(struct domain *d, unsigned int idx) { struct vcpu *v; int rc =3D -EINVAL; @@ -506,7 +506,7 @@ int p2m_switch_domain_altp2m_by_id(struct domain *d, un= signed int idx) if ( d->arch.altp2m_visible_eptp[idx] !=3D mfn_x(INVALID_MFN) ) { for_each_vcpu( d, v ) - if ( p2m_set_altp2m(v, idx) ) + if ( altp2m_set_altp2m(v, idx) ) altp2m_vcpu_update_p2m(v); =20 rc =3D 0; @@ -519,8 +519,8 @@ int p2m_switch_domain_altp2m_by_id(struct domain *d, un= signed int idx) return rc; } =20 -int p2m_change_altp2m_gfn(struct domain *d, unsigned int idx, - gfn_t old_gfn, gfn_t new_gfn) +int altp2m_change_gfn(struct domain *d, unsigned int idx, gfn_t old_gfn, + gfn_t new_gfn) { struct p2m_domain *hp2m, *ap2m; p2m_access_t a; @@ -571,11 +571,11 @@ int p2m_change_altp2m_gfn(struct domain *d, unsigned = int idx, p2m_unlock(ap2m); p2m_unlock(hp2m); return rc; -} + } =20 -int p2m_altp2m_propagate_change(struct domain *d, gfn_t gfn, - mfn_t mfn, unsigned int page_order, - p2m_type_t p2mt, p2m_access_t p2ma) +int altp2m_propagate_change(struct domain *d, gfn_t gfn, mfn_t mfn, + unsigned int page_order, p2m_type_t p2mt, + p2m_access_t p2ma) { struct p2m_domain *p2m; unsigned int i; @@ -605,7 +605,7 @@ int p2m_altp2m_propagate_change(struct domain *d, gfn_t= gfn, { if ( !reset_count++ ) { - p2m_reset_altp2m(d, i, ALTP2M_RESET); + altp2m_reset_altp2m(d, i, ALTP2M_RESET); last_reset_idx =3D i; } else @@ -617,7 +617,7 @@ int p2m_altp2m_propagate_change(struct domain *d, gfn_t= gfn, d->arch.altp2m_eptp[i] =3D=3D mfn_x(INVALID_MFN) ) continue; =20 - p2m_reset_altp2m(d, i, ALTP2M_RESET); + altp2m_reset_altp2m(d, i, ALTP2M_RESET); } =20 ret =3D 0; @@ -768,8 +768,8 @@ int p2m_get_suppress_ve(struct domain *d, gfn_t gfn, bo= ol *suppress_ve, return rc; } =20 -int p2m_set_altp2m_view_visibility(struct domain *d, unsigned int altp2m_i= dx, - uint8_t visible) +int altp2m_set_view_visibility(struct domain *d, unsigned int altp2m_idx, + uint8_t visible) { int rc =3D 0; =20 diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c index e5548e64d8d0..0492356d99ad 100644 --- a/xen/arch/x86/mm/mem_access.c +++ b/xen/arch/x86/mm/mem_access.c @@ -81,7 +81,7 @@ bool p2m_mem_access_emulate_check(struct vcpu *v, struct p2m_domain *p2m =3D NULL; =20 if ( altp2m_active(d) ) - p2m =3D p2m_get_altp2m(v); + p2m =3D altp2m_get_altp2m(v); if ( !p2m ) p2m =3D p2m_get_hostp2m(d); =20 @@ -145,7 +145,7 @@ bool p2m_mem_access_check(paddr_t gpa, unsigned long gl= a, int rc; =20 if ( altp2m_active(d) ) - p2m =3D p2m_get_altp2m(v); + p2m =3D altp2m_get_altp2m(v); if ( !p2m ) p2m =3D p2m_get_hostp2m(d); =20 @@ -252,9 +252,10 @@ bool p2m_mem_access_check(paddr_t gpa, unsigned long g= la, return (p2ma !=3D p2m_access_n2rwx); } =20 -static int p2m_set_altp2m_mem_access(struct domain *d, struct p2m_domain *= hp2m, - struct p2m_domain *ap2m, p2m_access_t= a, - gfn_t gfn) +static int altp2m_set_altp2m_mem_access(struct domain *d, + struct p2m_domain *hp2m, + struct p2m_domain *ap2m, p2m_acces= s_t a, + gfn_t gfn) { mfn_t mfn; p2m_type_t t; @@ -281,7 +282,7 @@ static int set_mem_access(struct domain *d, struct p2m_= domain *p2m, =20 if ( ap2m ) { - rc =3D p2m_set_altp2m_mem_access(d, p2m, ap2m, a, gfn); + rc =3D altp2m_set_altp2m_mem_access(d, p2m, ap2m, a, gfn); /* If the corresponding mfn is invalid we will want to just skip i= t */ if ( rc =3D=3D -ESRCH ) rc =3D 0; diff --git a/xen/arch/x86/mm/p2m-basic.c b/xen/arch/x86/mm/p2m-basic.c index ce14066fedaf..433e7d08b78f 100644 --- a/xen/arch/x86/mm/p2m-basic.c +++ b/xen/arch/x86/mm/p2m-basic.c @@ -128,7 +128,7 @@ int p2m_init(struct domain *d) return rc; } =20 - rc =3D altp2m_supported() ? p2m_init_altp2m(d) : 0; + rc =3D altp2m_supported() ? altp2m_init(d) : 0; if ( rc ) { p2m_teardown_hostp2m(d); @@ -198,7 +198,7 @@ void p2m_final_teardown(struct domain *d) if ( is_hvm_domain(d) ) { if ( altp2m_supported() ) - p2m_teardown_altp2m(d); + altp2m_teardown(d); /* * We must tear down nestedp2m unconditionally because * we initialise it unconditionally. diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index 84159198f3a0..a6f61a9dd3d7 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -773,7 +773,7 @@ bool ept_handle_misconfig(uint64_t gpa) int rc; =20 if ( altp2m_active(curr->domain) ) - p2m =3D p2m_get_altp2m(curr); + p2m =3D altp2m_get_altp2m(curr); =20 p2m_lock(p2m); =20 @@ -997,7 +997,7 @@ out: =20 if ( altp2m_supported() && entry_written && p2m_is_hostp2m(p2m) ) { - ret =3D p2m_altp2m_propagate_change(d, _gfn(gfn), mfn, order, p2mt= , p2ma); + ret =3D altp2m_propagate_change(d, _gfn(gfn), mfn, order, p2mt, p2= ma); if ( !rc ) rc =3D ret; } diff --git a/xen/arch/x86/mm/p2m.h b/xen/arch/x86/mm/p2m.h index 635f5a7f45cd..64218878067e 100644 --- a/xen/arch/x86/mm/p2m.h +++ b/xen/arch/x86/mm/p2m.h @@ -19,9 +19,6 @@ static inline int p2m_init_logdirty(struct p2m_domain *p2= m) { return 0; } static inline void p2m_free_logdirty(struct p2m_domain *p2m) {} #endif =20 -int p2m_init_altp2m(struct domain *d); -void p2m_teardown_altp2m(struct domain *d); - void p2m_flush_table_locked(struct p2m_domain *p2m); int __must_check p2m_remove_entry(struct p2m_domain *p2m, gfn_t gfn, mfn_t= mfn, unsigned int page_order); diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c index cf0258223f50..77e0c8a0b240 100644 --- a/xen/common/vm_event.c +++ b/xen/common/vm_event.c @@ -433,7 +433,7 @@ static int vm_event_resume(struct domain *d, struct vm_= event_domain *ved) /* Check for altp2m switch */ if ( IS_ENABLED(CONFIG_ALTP2M) && rsp.flags & VM_EVENT_FLAG_ALTERNATE_P2M ) - p2m_altp2m_check(v, rsp.altp2m_idx); + altp2m_check(v, rsp.altp2m_idx); =20 if ( rsp.flags & VM_EVENT_FLAG_SET_REGISTERS ) vm_event_set_registers(v, &rsp); diff --git a/xen/include/xen/p2m-common.h b/xen/include/xen/p2m-common.h index f0bd9a6b9896..6da330acca1f 100644 --- a/xen/include/xen/p2m-common.h +++ b/xen/include/xen/p2m-common.h @@ -25,7 +25,7 @@ int unmap_mmio_regions(struct domain *d, mfn_t mfn); =20 /* Check to see if vcpu should be switched to a different p2m. */ -void p2m_altp2m_check(struct vcpu *v, uint16_t idx); +void altp2m_check(struct vcpu *v, uint16_t idx); =20 /* * Populate-on-Demand --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776721530; cv=pass; d=zohomail.com; s=zohoarc; b=C+iR5BQf94rMGEFZChYWN8f7cPdAh0rpjqGBV+soB30IC7Pz8cUT3tizYF15WXInRC+m/xRcaq3yXvhSFkJJ5ivcaoEySvGHMffx0SZiJzk3HMgteA9ugvfzlS+CEOFC/G42l1nf3iIKEiIAOJuepSnSvXzzCNzrSfqaBaAHg8c= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776721530; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=55tm/2wld/ywUdSampZbkiV4LluAQpXTHs92fXHMAOY=; b=XPiWuMgmNEjG+Ja373ub27xQ5EivlKTCY7/y3xpk+5ytiabZCcvDBO1FquPMqHBkt+rFMNkU33AgOa2OFRYvJFHwSBLv0lpJL1YvKiSzOx4dOmFvuRjvDULY+znF96nEzNq5XANkWKN1QyAImQfwEIpstai3lJhCTUOH1lAImR0= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 177672153041553.14449433616426; Mon, 20 Apr 2026 14:45:30 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1288185.1568501 (Exim 4.92) (envelope-from ) id 1wEwQY-00085W-4A; Mon, 20 Apr 2026 21:45:10 +0000 Received: by outflank-mailman (output) from mailman id 1288185.1568501; Mon, 20 Apr 2026 21:45:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwQY-00085P-1G; Mon, 20 Apr 2026 21:45:10 +0000 Received: by outflank-mailman (input) for mailman id 1288185; Mon, 20 Apr 2026 21:45:08 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwQV-00085F-MX for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:45:08 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwQV-00EhI8-2k for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:45:07 +0200 Received: from [10.42.69.11] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69e5e-bab6-0a2a0a5309dd-0a2a450b817c-8 for ; Mon, 20 Apr 2026 23:45:07 +0200 Received: from [52.101.57.77] (helo=BN8PR05CU002.outbound.protection.outlook.com) by tlsNG-42698a.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b8f-212f-0a2a450b0019-3465394d8112-3 for ; Mon, 20 Apr 2026 23:33:04 +0200 Received: from BN9PR03CA0286.namprd03.prod.outlook.com (2603:10b6:408:f5::21) by CO1PR08MB6817.namprd08.prod.outlook.com (2603:10b6:303:9c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:53 +0000 Received: from BN3PEPF0000B070.namprd21.prod.outlook.com (2603:10b6:408:f5:cafe::f8) by BN9PR03CA0286.outlook.office365.com (2603:10b6:408:f5::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:53 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BN3PEPF0000B070.mail.protection.outlook.com (10.167.243.75) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9870.4 via Frontend Transport; Mon, 20 Apr 2026 21:32:52 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzH774ysz1wdM; Mon, 20 Apr 2026 14:32:51 -0700 (PDT) Received: from BL2PR08CU001.outbound.protection.outlook.com (mail-bl2pr08cu00105.outbound.protection.outlook.com [40.93.4.13]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:51 -0700 (PDT) Received: from BY1P220CA0046.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::8) by DM8PR08MB7271.namprd08.prod.outlook.com (2603:10b6:8:22::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:44 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::72) by BY1P220CA0046.outlook.office365.com (2603:10b6:a03:59e::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:44 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:43 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:39 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=pnyppxpAA3E7zRPcVFx6M91T4j8AsaHdNvq5ZUIIflMQ8ZOBCJkpUTYIfDA9BPkMKozd1bIPKD4SkgsMmvqwzUhdkXNAK5mpZTSrNS3k8DD6j7IdTtI8drMfZ0B/J65f3Qr9BljBSueCqEnLfjSLqqmHlZno5EhV0TsTOF1aYBNKQZELNuHjF5bwM8VvxwNanSjUiGB+dj0WApHbPRIqmh1TJTkOz8/qEXdaweWuURkhT6W9xjOP7YDcfwVF4FAAqAIjRTrFYbTJZ8cUOJKFfIrXPUrhSvm3acLLkpZNHNbLXOCQFqNeLEKtao0njCxc+5j3SxOuXeznfyLGzvbWiA== ARC-Message-Signature: i=2; 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=55tm/2wld/ywUdSampZbkiV4LluAQpXTHs92fXHMAOY=; b=gRISS/cFL0qpEyI6pTTxim4jik+LLlLp/u2B+FIhUZpod+Kv6Wn5fYDYXhoa5lUZtojkAulTWW1ELqS5k2VMsvQJySAznZGBNtrAL0HyxhoyOWlN9hpw/enL8gLkZCVjIJLkhUB36gA70aDC/92hWCTw4Kfq0NwbLLaPtyBNw6ZjET3C/7IbAEjc2epJkujj7E48LBmGRwlXxBoQzWLcT+UWsv7oaX+gjZtBWMhYXcTK8/vQp+hyIcr4qhG05/rn4Y9wrerQpt9NIaG/ZEXOqMTlt4h20gLo2LryqQ7QQJtDqgvyxI6fshq7/sPLppMqAcvEuvg1kUgECSt8BUusEg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.4.13) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=55tm/2wld/ywUdSampZbkiV4LluAQpXTHs92fXHMAOY=; b=SiTLjSx1ykHdZF28raPtmnOKKxizfDxxpy2vDyLOE/2YmCvmek9zKPdle87OsVa7v3uhSndpDeVYRceDqQMXuS3Ph0RAx2mZNx2QYzQvHPu5L5tFuTYyfTv/1llDgUT0jmKoHOKZs/ewbuQpxYnzSyWMu9fY876pw805+5RsBDE= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.4.13) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.4.13 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.4.13; helo=BL2PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Rp45S8N4WhXSQ5x/KRV2UADsLQ8IF9DIWn+IeKyxwVYtCIKPjPMHMbJwhx7Rko55NX0/dfILYuoyRGLtFGsgE8gvCRwCh9kdvsE9EJQRrsZSTi5xNW20HZhT/tfPMebUT9cvYpo9PYIFcEC79zSscLHCJxl2DcRIbPc5uF9gfNYuJWPqnzIf35JZKjfBvV6y1hwguiT91qEMJ9Od4T0snqzTD/fOaUDHY9pn0FCXARQGPBlHmWGS7GyJQDICVZPDiDafe3hh2I1fBUGvkO2M7CHSE8Z/iD6e+KyhxzgxxhjZr3YHthGYx4wVb4ledK+9aUrttM7O8SrrcmC2mJ2LfQ== 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=55tm/2wld/ywUdSampZbkiV4LluAQpXTHs92fXHMAOY=; b=VSKicZh+8sPFO9i5ZrgVYsWkxHjypGOhrl0bVmJIiEaTYwdGO7klCmvJlhLjKobVVgG6uINiZOR5BxU4o5aV8lakdETTvGpz1HRQXfNbUjbf5RTZeqQDrzD4PTZgFun///LPb0QRauX4/6ocSubBp1ECJu6/FCBbUaqjvZmIE6dzKb7lSPScUYMCS6BdIrKnzciQCCdcwDp9WIHnnW5DQ6+HL8TMaMNQi7WGccXHykSDQjArW+V/1nZ0LZXxItWUh0DoBWcKBD4zgiCeKywgR7ZksDgcUQo2FZjqvYToPJVv5gqWQenj8DJcdN2n0Ltfr2nFxDLgts4cErj6dEHS0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=55tm/2wld/ywUdSampZbkiV4LluAQpXTHs92fXHMAOY=; b=SiTLjSx1ykHdZF28raPtmnOKKxizfDxxpy2vDyLOE/2YmCvmek9zKPdle87OsVa7v3uhSndpDeVYRceDqQMXuS3Ph0RAx2mZNx2QYzQvHPu5L5tFuTYyfTv/1llDgUT0jmKoHOKZs/ewbuQpxYnzSyWMu9fY876pw805+5RsBDE= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Anthony PERARD , "Michal Orzel" , Julien Grall , "Stefano Stabellini" , "Daniel P. Smith" , Aqib Javaid Subject: [RFC PATCH v6 09/43] altp2m: Move do_altp2m_op to common code Date: Mon, 20 Apr 2026 17:31:32 -0400 Message-ID: <20260420213206.208750-10-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|DM8PR08MB7271:EE_|BN3PEPF0000B070:EE_|CO1PR08MB6817:EE_ X-MS-Office365-Filtering-Correlation-Id: 47507922-bb98-4df0-2e62-08de9f246136 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704162011799003|82310400026|36860700016|7416014|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?SHUEldrYkAhFQ+nVB9DhSRyKpjWwDtEbjlykvRdGcbtansw/6piyHsFjOFLa?= =?us-ascii?Q?olKRgJfTvpwHyqCpBubvqS/p9hj6dlQqbsA6qilnNJAEY9YYOlZo4YPSScT5?= =?us-ascii?Q?zfXOULt1z0oMr8S7GjEAZumazMQ4ze/LESh0JroiC2PecFc3QiFm+/A7ze5M?= =?us-ascii?Q?RrFS9os0/DJKVI4B2F9nV64hW6xCd0D4JNabV8keiKnd8Hj3XsKxbXQZffUf?= =?us-ascii?Q?6Mti1up6lV6kFO1gilUVGXaqjr2refJiEIEn8hulAyOqTYw3a6lhN27PdJy1?= =?us-ascii?Q?lE00WzpKwf4lAiKBCTzprq+PsFsgXWSiNJb3jvnsrV2nwYpvox8qADewOvsD?= =?us-ascii?Q?3VKYNWgxNVundOMHAzDtaYSt4qJNtxd6N5Au/TaW8HMoeCH7EAFoSzE42FIl?= =?us-ascii?Q?ynNc9HqL/lPgCYdsl0/tWrL6CMrIMpAfj6rMGBMS3dgUxBgZQYCtMJLTIzRF?= =?us-ascii?Q?KZM3uoRWANBpS8Ol1CSS9kVZX24kWctTEp+yqKm215EHBuuPDwRzjUz/Qkd2?= =?us-ascii?Q?TQ3jusOIhlNfvP+TWZVHPe7Iy5BJDXn3LarFT5buaADpQSUeBYtWrLF2BY72?= =?us-ascii?Q?Iza0aDo1zdx3r1Nw1gZ++GtCVP/j7ofCkVZikcbm26SAayScwkTGNO8u9L7u?= =?us-ascii?Q?Q78HileowASVOmig6ZC4VuIG2TNYWG/MYSXq5cYISZp599xDWFjlxmEw9Vat?= =?us-ascii?Q?5GSEr5KL62q+/J0fih1KTFsg3fK/YgEWJCjhsaBRYR60o8fa6s6FzAK0eReT?= =?us-ascii?Q?Vo8qXctLLe2n3E2AcB676XQd3viKROSPm32evUjPzX9gLpuBkeYR9IU+YPyR?= =?us-ascii?Q?bVOW8J4iR8ZJZt2jZHz/aMRmLqU1aQlYca7UoGjT88Alzt4mjrGCBB5qvk5B?= =?us-ascii?Q?fICkheaSHvQeKk2qxvWm7g4t3uci3BaM0jSYoDqNqe4YnWT9NsvuMM4Dsf80?= =?us-ascii?Q?iPXrvvafD0rWXGk0QphjDo8HIvlSJe/81BnW+Mdkrt+huYtdGqt2sOzRSuXe?= =?us-ascii?Q?vViZLf5Jehww3jRQC0Gfv+2a1U/C2bsAwSp1uwlm/wrcaWktRRLmH7XsEo1I?= =?us-ascii?Q?AxwLdnCTxqk+CbVHFyJK/rq/O4alD1seYLueb9Mjexdgk1jzHIkYHB2RyOVV?= =?us-ascii?Q?ki/liqJWJ0q5WHtOAeb6pWSheoGoq/WnXQ=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704162011799003)(82310400026)(36860700016)(7416014)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: BLjFGyhl2K9k0t7gY774NSPZU2JXQuDbcFeusIilE6LgEPgzAYnY6VERNirFz4bceaJmoyXnfF0qpqt2jSfRZyDyElcOWvUr8j9olC83LuyoJwgiMPt/epnzAmGUUNSqAuFybi8gKWVQkuegD9zwUs4FxsfIDIl2gOOGCtenX/977xOq0a+PHuvjr/eJXqY+fyZVWm43sSGztg4GvzLDi7jOiZUMtTKbIC3JgXyYjmrDelSBz8UIA1zwvjUeRzuIaCsd4GeDZ4AkJb6U/cVkL+u223SK2WVkeJNYV63eJ720i6Rmy/tymXDdpB4TIZevjwGLE3T950J3qB3TjvS+oQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR08MB7271 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.4.13];domain=BL2PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.4.13];domain=BL2PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN3PEPF0000B070.namprd21.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 174e58aa-364c-42b9-a31d-08de9f245b72 X-Microsoft-Antispam: BCL:0;ARA:13230040|704162011799003|156008|82310400026|35042699022|14060799003|36860700016|7416014|376014|1800799024|18002099003|56012099003|22082099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?83jfayWjlb6NtX0//b/KFfzyMS9Crw4UIO/skIF09D7sme/wcVGRxc96V4u3?= =?us-ascii?Q?vwmRZmnYuMBHQA3krFwHNaJ7QiOAq8coJtYXQpnDXprimjyBmI47/9mptJX3?= =?us-ascii?Q?VSGPkCeKdV5tUjsRfa7XOboOd/IANQCYJLAZDXg6Cg+/Nxz5ognKoQR92C2J?= =?us-ascii?Q?3/yhupbG85VarcOE6vE/mB9v+zAXQ/hXp8k/qZxDQ+6++rflkoufYax36GbK?= =?us-ascii?Q?2fKqDOazXW9rGgO6Nk6ZTtnu0JR5F3jJFbzerGq+tIgJmjXfAqK2xDb2rzuI?= =?us-ascii?Q?Vn313ThPuH1qeBDV0TXjwtPn/tNkAklL1Ut7xCm9hDRDC0mN0pkz4nEEC46E?= =?us-ascii?Q?k3gsqnl7J2toGnO4ZQ3tP2wMH4cNoEuUbGsaflX4HrmB1/So72PdMG2Fjz5j?= =?us-ascii?Q?0Q3VsY+d0IS9a9PCDHkdX/nFcHxGTxQvt11dpzJkvn8L3fI1LA5bBkewfEPX?= =?us-ascii?Q?wVkRZKC8TlS/z6/9Otkz/jjHQucGEVCuUE1v6j9T1xSoY0XuRAS2p4HsaemK?= =?us-ascii?Q?rebeWiPRQ40lLEoaaKv6jIG7jchEVDG/DCjnePdPsWfrjypuC9Q+JV3Gfarp?= =?us-ascii?Q?YGW5EOZIMgMbAU1+x9/sjohhjjflARZr5eVwCjYNIqXzIcRm8MG+BmZFToUf?= =?us-ascii?Q?w9LPrfDgxyLM3G0L7QFcUdPXQFMhIRn2glKm9lUwUpXbuGZMDmazADpqeC2q?= =?us-ascii?Q?QZEOvc17YWE8r/9YzbuV5D6mftIc7lp2yNqJn9ft0zlEq6oI9srJVN/jxGzr?= =?us-ascii?Q?0Mp8G1E9mC25wZ8gJQRvIcReqU0YGwNwAA5IGeyG9eU4pl3uaZtbz3FYEQLs?= =?us-ascii?Q?OhjMe3oHXNyWZoG458/fIIilZiKm8FSVljXew6eRPyOKx3Gi7JMjlBpFAsWr?= =?us-ascii?Q?wX5pRb+gtfql+QDsCOdtKSGb5FWiq2dwXVG7jFZRwDkfGfSoo1znVMHULavm?= =?us-ascii?Q?mU2ONsn58Dj0ZkfVASy/5N5OdWrNjbZoetNmmVsW366e2gEFl/9SUBElKroE?= =?us-ascii?Q?ti18+qv9BSReJhBoUtDVLPlEu0XL0HTaZAWWGL/u0idfZ2dgEs4we9GTTYbW?= =?us-ascii?Q?/AhA8u74XQ++b7QQew0WC5pl2ZAqfvmtbgbcfMqDXCKvzVimaLXMxy6GAbEK?= =?us-ascii?Q?uhiEuEmc/QD2/BnyPISp00EK6Lkdj+LC9A=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL2PR08CU001.outbound.protection.outlook.com;PTR:mail-bl2pr08cu00105.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704162011799003)(156008)(82310400026)(35042699022)(14060799003)(36860700016)(7416014)(376014)(1800799024)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TOFnOmifBHmO1VS6QLW1+Si+aqCZQ6b5YGqmNFJL9R8/+I+5VLnBIGWxZqZRFIN24COdczVHvTgm82O0O+Jn5v3NdIsydxZfcxbYkTV4TD1PjpVt6QS+JMGwUdCaBDVdab4O6hk58b3Gf+MVF/fx28B7F7O2UcLZkv08Wjw2ADXVx3rt8TrqMsk77apAX2XBsVNxvo+t/QlZPSM6x81+mmRwzWdcnVtCvWGhzwBjtF//Tx8BwaS6WVlKwFF+IlIx6o/ugYxvuo15j/KL3vmaX9G7vYSdTn2mcGLdsflHeqebn02ygjJFCfqBN6HZQW99jqlssRNToE+yjrL5hxoiWH0vN6YBT7wMiiD3/Y9eVivMWm88gdtSmTSXVGJ3oLS/2CaBEaAg1CxuVFiXCxWfliV2+6z59MSRVIg6khyYmwqcNslFxOhy3jlD6b4VaACc X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:52.8449 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47507922-bb98-4df0-2e62-08de9f246136 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN3PEPF0000B070.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR08MB6817 X-purgate-ID: tlsNG-42698a/1776720784-07F7EF3B-1E434C2F/37/8714975798-1487109 X-purgate-type: bulk X-purgate-size: 26338 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776721531773154100 Content-Type: text/plain; charset="utf-8" This commit moves the altp2m HVMOP implementation to common code, making it possible to re-use it across architectures. In this commit, the entire implementation is gated behind CONFIG_X86, with no changes to the body of do_altp2m_op. A stub implementation is added for ARM, which will be removed once do_altp2m_op has been modified to add ARM support. This commit contains only code movement, and no change in functionality is intended. This is commit 1/2 of the common do_altp2m_op phase. Signed-off-by: Rose Spangler Signed-off-by: Aqib Javaid --- v6: Introduced this patch. --- xen/arch/x86/hvm/hvm.c | 400 ------------------------------------- xen/common/altp2m.c | 413 +++++++++++++++++++++++++++++++++++++++ xen/include/xen/altp2m.h | 11 ++ 3 files changed, 424 insertions(+), 400 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 5b6e91adce17..4adcc3c49d95 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -4526,406 +4526,6 @@ static int hvmop_get_param( return rc; } =20 -/* - * altp2m operations are envisioned as being used in several different - * modes: - * - * - external: All control and decisions are made by an external agent - * running domain 0. - * - * - internal: altp2m operations are used exclusively by an in-guest - * agent to protect itself from the guest kernel and in-guest - * attackers. - * - * - coordinated: An in-guest agent handles #VE and VMFUNCs locally, - * but makes requests of an agent running outside the domain for - * bigger changes (such as modifying altp2m entires). - * - * This corresponds to the three values for HVM_PARAM_ALTP2M - * (external, mixed, limited). All three models have advantages and - * disadvantages. - * - * Normally hypercalls made by a program in domain 0 in order to - * control a guest would be DOMCTLs rather than HVMOPs. But in order - * to properly enable the 'internal' use case, as well as to avoid - * fragmentation, all altp2m subops should come under this single - * HVMOP. - * - * Note that 'internal' mode (HVM_PARAM_ALTP2M =3D=3D XEN_ALTP2M_mixed) - * has not been evaluated for safety from a security perspective. - * Before using this mode in a security-critical environment, each - * subop should be evaluated for safety, with unsafe subops - * blacklisted in xsm_hvm_altp2mhvm_op(). - */ -static int do_altp2m_op( - XEN_GUEST_HANDLE_PARAM(void) arg) -{ -#ifdef CONFIG_ALTP2M - struct xen_hvm_altp2m_op a; - struct domain *d =3D NULL; - int rc =3D 0; - uint64_t mode; - - if ( !altp2m_supported() ) - return -EOPNOTSUPP; - - if ( copy_from_guest(&a, arg, 1) ) - return -EFAULT; - - if ( a.pad1 || a.pad2 || - (a.version !=3D HVMOP_ALTP2M_INTERFACE_VERSION) ) - return -EINVAL; - - switch ( a.cmd ) - { - case HVMOP_altp2m_get_domain_state: - case HVMOP_altp2m_set_domain_state: - case HVMOP_altp2m_vcpu_enable_notify: - case HVMOP_altp2m_vcpu_disable_notify: - case HVMOP_altp2m_create_p2m: - case HVMOP_altp2m_destroy_p2m: - case HVMOP_altp2m_switch_p2m: - case HVMOP_altp2m_set_suppress_ve: - case HVMOP_altp2m_set_suppress_ve_multi: - case HVMOP_altp2m_get_suppress_ve: - case HVMOP_altp2m_set_mem_access: - case HVMOP_altp2m_set_mem_access_multi: - case HVMOP_altp2m_get_mem_access: - case HVMOP_altp2m_change_gfn: - case HVMOP_altp2m_get_p2m_idx: - case HVMOP_altp2m_set_visibility: - break; - - default: - return -EOPNOTSUPP; - } - - d =3D rcu_lock_domain_by_any_id(a.domain); - - if ( d =3D=3D NULL ) - return -ESRCH; - - if ( !is_hvm_domain(d) ) - { - rc =3D -EOPNOTSUPP; - goto out; - } - - if ( (a.cmd !=3D HVMOP_altp2m_get_domain_state) && - (a.cmd !=3D HVMOP_altp2m_set_domain_state) && - !d->altp2m_active ) - { - rc =3D -EOPNOTSUPP; - goto out; - } - - mode =3D d->arch.hvm.params[HVM_PARAM_ALTP2M]; - - if ( XEN_ALTP2M_disabled =3D=3D mode ) - { - rc =3D -EINVAL; - goto out; - } - - if ( d->nr_altp2m =3D=3D 0 ) - { - rc =3D -EOPNOTSUPP; - goto out; - } - - if ( (rc =3D xsm_hvm_altp2mhvm_op(XSM_OTHER, d, mode, a.cmd)) ) - goto out; - - switch ( a.cmd ) - { - case HVMOP_altp2m_get_domain_state: - a.u.domain_state.state =3D altp2m_active(d); - rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; - break; - - case HVMOP_altp2m_set_domain_state: - { - struct vcpu *v; - bool ostate; - - if ( nestedhvm_enabled(d) ) - { - rc =3D -EINVAL; - break; - } - - rc =3D domain_pause_except_self(d); - if ( rc ) - break; - - ostate =3D d->altp2m_active; - d->altp2m_active =3D !!a.u.domain_state.state; - - /* If the alternate p2m state has changed, handle appropriately */ - if ( d->altp2m_active !=3D ostate && - (ostate || !(rc =3D altp2m_init_by_id(d, 0))) ) - { - for_each_vcpu( d, v ) - { - if ( !ostate ) - altp2m_vcpu_initialise(v); - else - altp2m_vcpu_destroy(v); - } - - if ( ostate ) - altp2m_flush(d); - } - else if ( rc ) - d->altp2m_active =3D false; - - domain_unpause_except_self(d); - break; - } - - case HVMOP_altp2m_vcpu_enable_notify: - { - struct vcpu *v; - - if ( a.u.enable_notify.pad || - a.u.enable_notify.vcpu_id >=3D d->max_vcpus ) - { - rc =3D -EINVAL; - break; - } - - if ( !cpu_has_vmx_virt_exceptions ) - { - rc =3D -EOPNOTSUPP; - break; - } - - v =3D d->vcpu[a.u.enable_notify.vcpu_id]; - - rc =3D altp2m_vcpu_enable_ve(v, _gfn(a.u.enable_notify.gfn)); - break; - } - - case HVMOP_altp2m_vcpu_disable_notify: - { - struct vcpu *v; - - if ( a.u.disable_notify.vcpu_id >=3D d->max_vcpus ) - { - rc =3D -EINVAL; - break; - } - - if ( !cpu_has_vmx_virt_exceptions ) - { - rc =3D -EOPNOTSUPP; - break; - } - - v =3D d->vcpu[a.u.enable_notify.vcpu_id]; - - altp2m_vcpu_disable_ve(v); - break; - } - - case HVMOP_altp2m_create_p2m: - rc =3D altp2m_init_next_available(d, &a.u.view.view, - a.u.view.hvmmem_default_access); - if ( !rc ) - rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; - break; - - case HVMOP_altp2m_destroy_p2m: - rc =3D altp2m_destroy_by_id(d, a.u.view.view); - break; - - case HVMOP_altp2m_switch_p2m: - rc =3D altp2m_switch_domain_altp2m_by_id(d, a.u.view.view); - break; - - case HVMOP_altp2m_set_suppress_ve: - if ( a.u.suppress_ve.pad1 || a.u.suppress_ve.pad2 ) - rc =3D -EINVAL; - else - { - gfn_t gfn =3D _gfn(a.u.suppress_ve.gfn); - unsigned int altp2m_idx =3D a.u.suppress_ve.view; - bool suppress_ve =3D a.u.suppress_ve.suppress_ve; - - rc =3D p2m_set_suppress_ve(d, gfn, suppress_ve, altp2m_idx); - } - break; - - case HVMOP_altp2m_set_suppress_ve_multi: - { - uint64_t max_phys_addr =3D (1UL << d->arch.cpuid->extd.maxphysaddr= ) - 1; - - a.u.suppress_ve_multi.last_gfn =3D min(a.u.suppress_ve_multi.last_= gfn, - max_phys_addr); - - if ( a.u.suppress_ve_multi.pad1 || - a.u.suppress_ve_multi.first_gfn > a.u.suppress_ve_multi.last_= gfn ) - rc =3D -EINVAL; - else - { - rc =3D p2m_set_suppress_ve_multi(d, &a.u.suppress_ve_multi); - if ( (!rc || rc =3D=3D -ERESTART) && __copy_to_guest(arg, &a, = 1) ) - rc =3D -EFAULT; - } - break; - } - - case HVMOP_altp2m_get_suppress_ve: - if ( a.u.suppress_ve.pad1 || a.u.suppress_ve.pad2 ) - rc =3D -EINVAL; - else - { - gfn_t gfn =3D _gfn(a.u.suppress_ve.gfn); - unsigned int altp2m_idx =3D a.u.suppress_ve.view; - bool suppress_ve; - - rc =3D p2m_get_suppress_ve(d, gfn, &suppress_ve, altp2m_idx); - if ( !rc ) - { - a.u.suppress_ve.suppress_ve =3D suppress_ve; - rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; - } - } - break; - - case HVMOP_altp2m_set_mem_access: - if ( !vm_event_is_enabled(current) ) - { - rc =3D -EOPNOTSUPP; - break; - } - - if ( a.u.mem_access.pad ) - rc =3D -EINVAL; - else - rc =3D p2m_set_mem_access(d, _gfn(a.u.mem_access.gfn), 1, 0, 0, - a.u.mem_access.access, - a.u.mem_access.view); - break; - - case HVMOP_altp2m_set_mem_access_multi: - if ( !vm_event_is_enabled(current) ) - { - rc =3D -EOPNOTSUPP; - break; - } - - if ( a.u.set_mem_access_multi.pad || - a.u.set_mem_access_multi.opaque > a.u.set_mem_access_multi.nr= ) - { - rc =3D -EINVAL; - break; - } - - /* - * Unlike XENMEM_access_op_set_access_multi, we don't need any bit= s of - * the 'continuation' counter to be zero (to stash a command in). - * However, 0x40 is a good 'stride' to make sure that we make - * a reasonable amount of forward progress before yielding, - * so use a mask of 0x3F here. - */ - rc =3D p2m_set_mem_access_multi(d, a.u.set_mem_access_multi.pfn_li= st, - a.u.set_mem_access_multi.access_list, - a.u.set_mem_access_multi.nr, - a.u.set_mem_access_multi.opaque, - 0x3F, - a.u.set_mem_access_multi.view); - if ( rc > 0 ) - { - a.u.set_mem_access_multi.opaque =3D rc; - rc =3D -ERESTART; - if ( __copy_field_to_guest(guest_handle_cast(arg, xen_hvm_altp= 2m_op_t), - &a, u.set_mem_access_multi.opaque) ) - rc =3D -EFAULT; - } - break; - - case HVMOP_altp2m_get_mem_access: - if ( !vm_event_is_enabled(current) ) - { - rc =3D -EOPNOTSUPP; - break; - } - - if ( a.u.mem_access.pad ) - rc =3D -EINVAL; - else - { - xenmem_access_t access; - - rc =3D p2m_get_mem_access(d, _gfn(a.u.mem_access.gfn), &access, - a.u.mem_access.view); - if ( !rc ) - { - a.u.mem_access.access =3D access; - rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; - } - } - break; - - case HVMOP_altp2m_change_gfn: - if ( a.u.change_gfn.pad1 || a.u.change_gfn.pad2 ) - rc =3D -EINVAL; - else - rc =3D altp2m_change_gfn(d, a.u.change_gfn.view, - _gfn(a.u.change_gfn.old_gfn), - _gfn(a.u.change_gfn.new_gfn)); - break; - - case HVMOP_altp2m_get_p2m_idx: - { - struct vcpu *v; - - if ( !altp2m_active(d) ) - { - rc =3D -EOPNOTSUPP; - break; - } - - if ( (v =3D domain_vcpu(d, a.u.get_vcpu_p2m_idx.vcpu_id)) =3D=3D N= ULL ) - { - rc =3D -EINVAL; - break; - } - - a.u.get_vcpu_p2m_idx.altp2m_idx =3D altp2m_vcpu_idx(v); - rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; - break; - } - - case HVMOP_altp2m_set_visibility: - { - unsigned int idx =3D a.u.set_visibility.altp2m_idx; - - if ( a.u.set_visibility.pad ) - rc =3D -EINVAL; - else if ( !altp2m_active(d) ) - rc =3D -EOPNOTSUPP; - else - rc =3D altp2m_set_view_visibility(d, idx, a.u.set_visibility.v= isible); - break; - } - - default: - ASSERT_UNREACHABLE(); - rc =3D -EOPNOTSUPP; - break; - } - - out: - rcu_unlock_domain(d); - - return rc; -#else /* !CONFIG_ALTP2M */ - return -EOPNOTSUPP; -#endif /* CONFIG_ALTP2M */ -} - DEFINE_XEN_GUEST_HANDLE(compat_hvm_altp2m_op_t); =20 /* diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index 1a4e102324d4..a43b3a3e34b3 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -1,5 +1,418 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include +#include + +#include + +#include + +#include + +#ifdef CONFIG_X86 +#include +/* + * altp2m operations are envisioned as being used in several different + * modes: + * + * - external: All control and decisions are made by an external agent + * running domain 0. + * + * - internal: altp2m operations are used exclusively by an in-guest + * agent to protect itself from the guest kernel and in-guest + * attackers. + * + * - coordinated: An in-guest agent handles #VE and VMFUNCs locally, + * but makes requests of an agent running outside the domain for + * bigger changes (such as modifying altp2m entires). + * + * This corresponds to the three values for HVM_PARAM_ALTP2M + * (external, mixed, limited). All three models have advantages and + * disadvantages. + * + * Normally hypercalls made by a program in domain 0 in order to + * control a guest would be DOMCTLs rather than HVMOPs. But in order + * to properly enable the 'internal' use case, as well as to avoid + * fragmentation, all altp2m subops should come under this single + * HVMOP. + * + * Note that 'internal' mode (HVM_PARAM_ALTP2M =3D=3D XEN_ALTP2M_mixed) + * has not been evaluated for safety from a security perspective. + * Before using this mode in a security-critical environment, each + * subop should be evaluated for safety, with unsafe subops + * blacklisted in xsm_hvm_altp2mhvm_op(). + */ +int do_altp2m_op( + XEN_GUEST_HANDLE_PARAM(void) arg) +{ + struct xen_hvm_altp2m_op a; + struct domain *d =3D NULL; + int rc =3D 0; + uint64_t mode; + + if ( !altp2m_supported() ) + return -EOPNOTSUPP; + + if ( copy_from_guest(&a, arg, 1) ) + return -EFAULT; + + if ( a.pad1 || a.pad2 || + (a.version !=3D HVMOP_ALTP2M_INTERFACE_VERSION) ) + return -EINVAL; + + switch ( a.cmd ) + { + case HVMOP_altp2m_get_domain_state: + case HVMOP_altp2m_set_domain_state: + case HVMOP_altp2m_vcpu_enable_notify: + case HVMOP_altp2m_vcpu_disable_notify: + case HVMOP_altp2m_create_p2m: + case HVMOP_altp2m_destroy_p2m: + case HVMOP_altp2m_switch_p2m: + case HVMOP_altp2m_set_suppress_ve: + case HVMOP_altp2m_set_suppress_ve_multi: + case HVMOP_altp2m_get_suppress_ve: + case HVMOP_altp2m_set_mem_access: + case HVMOP_altp2m_set_mem_access_multi: + case HVMOP_altp2m_get_mem_access: + case HVMOP_altp2m_change_gfn: + case HVMOP_altp2m_get_p2m_idx: + case HVMOP_altp2m_set_visibility: + break; + + default: + return -EOPNOTSUPP; + } + + d =3D rcu_lock_domain_by_any_id(a.domain); + + if ( d =3D=3D NULL ) + return -ESRCH; + + if ( !is_hvm_domain(d) ) + { + rc =3D -EOPNOTSUPP; + goto out; + } + + if ( (a.cmd !=3D HVMOP_altp2m_get_domain_state) && + (a.cmd !=3D HVMOP_altp2m_set_domain_state) && + !d->altp2m_active ) + { + rc =3D -EOPNOTSUPP; + goto out; + } + + mode =3D d->arch.hvm.params[HVM_PARAM_ALTP2M]; + + if ( XEN_ALTP2M_disabled =3D=3D mode ) + { + rc =3D -EINVAL; + goto out; + } + + if ( d->nr_altp2m =3D=3D 0 ) + { + rc =3D -EOPNOTSUPP; + goto out; + } + + if ( (rc =3D xsm_hvm_altp2mhvm_op(XSM_OTHER, d, mode, a.cmd)) ) + goto out; + + switch ( a.cmd ) + { + case HVMOP_altp2m_get_domain_state: + a.u.domain_state.state =3D altp2m_active(d); + rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; + break; + + case HVMOP_altp2m_set_domain_state: + { + struct vcpu *v; + bool ostate; + + if ( nestedhvm_enabled(d) ) + { + rc =3D -EINVAL; + break; + } + + rc =3D domain_pause_except_self(d); + if ( rc ) + break; + + ostate =3D d->altp2m_active; + d->altp2m_active =3D !!a.u.domain_state.state; + + /* If the alternate p2m state has changed, handle appropriately */ + if ( d->altp2m_active !=3D ostate && + (ostate || !(rc =3D altp2m_init_by_id(d, 0))) ) + { + for_each_vcpu( d, v ) + { + if ( !ostate ) + altp2m_vcpu_initialise(v); + else + altp2m_vcpu_destroy(v); + } + + if ( ostate ) + altp2m_flush(d); + } + else if ( rc ) + d->altp2m_active =3D false; + + domain_unpause_except_self(d); + break; + } + + case HVMOP_altp2m_vcpu_enable_notify: + { + struct vcpu *v; + + if ( a.u.enable_notify.pad || + a.u.enable_notify.vcpu_id >=3D d->max_vcpus ) + { + rc =3D -EINVAL; + break; + } + + if ( !cpu_has_vmx_virt_exceptions ) + { + rc =3D -EOPNOTSUPP; + break; + } + + v =3D d->vcpu[a.u.enable_notify.vcpu_id]; + + rc =3D altp2m_vcpu_enable_ve(v, _gfn(a.u.enable_notify.gfn)); + break; + } + + case HVMOP_altp2m_vcpu_disable_notify: + { + struct vcpu *v; + + if ( a.u.disable_notify.vcpu_id >=3D d->max_vcpus ) + { + rc =3D -EINVAL; + break; + } + + if ( !cpu_has_vmx_virt_exceptions ) + { + rc =3D -EOPNOTSUPP; + break; + } + + v =3D d->vcpu[a.u.enable_notify.vcpu_id]; + + altp2m_vcpu_disable_ve(v); + break; + } + + case HVMOP_altp2m_create_p2m: + rc =3D altp2m_init_next_available(d, &a.u.view.view, + a.u.view.hvmmem_default_access); + if ( !rc ) + rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; + break; + + case HVMOP_altp2m_destroy_p2m: + rc =3D altp2m_destroy_by_id(d, a.u.view.view); + break; + + case HVMOP_altp2m_switch_p2m: + rc =3D altp2m_switch_domain_altp2m_by_id(d, a.u.view.view); + break; + + case HVMOP_altp2m_set_suppress_ve: + if ( a.u.suppress_ve.pad1 || a.u.suppress_ve.pad2 ) + rc =3D -EINVAL; + else + { + gfn_t gfn =3D _gfn(a.u.suppress_ve.gfn); + unsigned int altp2m_idx =3D a.u.suppress_ve.view; + bool suppress_ve =3D a.u.suppress_ve.suppress_ve; + + rc =3D p2m_set_suppress_ve(d, gfn, suppress_ve, altp2m_idx); + } + break; + + case HVMOP_altp2m_set_suppress_ve_multi: + { + uint64_t max_phys_addr =3D (1UL << d->arch.cpuid->extd.maxphysaddr= ) - 1; + + a.u.suppress_ve_multi.last_gfn =3D min(a.u.suppress_ve_multi.last_= gfn, + max_phys_addr); + + if ( a.u.suppress_ve_multi.pad1 || + a.u.suppress_ve_multi.first_gfn > a.u.suppress_ve_multi.last_= gfn ) + rc =3D -EINVAL; + else + { + rc =3D p2m_set_suppress_ve_multi(d, &a.u.suppress_ve_multi); + if ( (!rc || rc =3D=3D -ERESTART) && __copy_to_guest(arg, &a, = 1) ) + rc =3D -EFAULT; + } + break; + } + + case HVMOP_altp2m_get_suppress_ve: + if ( a.u.suppress_ve.pad1 || a.u.suppress_ve.pad2 ) + rc =3D -EINVAL; + else + { + gfn_t gfn =3D _gfn(a.u.suppress_ve.gfn); + unsigned int altp2m_idx =3D a.u.suppress_ve.view; + bool suppress_ve; + + rc =3D p2m_get_suppress_ve(d, gfn, &suppress_ve, altp2m_idx); + if ( !rc ) + { + a.u.suppress_ve.suppress_ve =3D suppress_ve; + rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; + } + } + break; + + case HVMOP_altp2m_set_mem_access: + if ( !vm_event_is_enabled(current) ) + { + rc =3D -EOPNOTSUPP; + break; + } + + if ( a.u.mem_access.pad ) + rc =3D -EINVAL; + else + rc =3D p2m_set_mem_access(d, _gfn(a.u.mem_access.gfn), 1, 0, 0, + a.u.mem_access.access, + a.u.mem_access.view); + break; + + case HVMOP_altp2m_set_mem_access_multi: + if ( !vm_event_is_enabled(current) ) + { + rc =3D -EOPNOTSUPP; + break; + } + + if ( a.u.set_mem_access_multi.pad || + a.u.set_mem_access_multi.opaque > a.u.set_mem_access_multi.nr= ) + { + rc =3D -EINVAL; + break; + } + + /* + * Unlike XENMEM_access_op_set_access_multi, we don't need any bit= s of + * the 'continuation' counter to be zero (to stash a command in). + * However, 0x40 is a good 'stride' to make sure that we make + * a reasonable amount of forward progress before yielding, + * so use a mask of 0x3F here. + */ + rc =3D p2m_set_mem_access_multi(d, a.u.set_mem_access_multi.pfn_li= st, + a.u.set_mem_access_multi.access_list, + a.u.set_mem_access_multi.nr, + a.u.set_mem_access_multi.opaque, + 0x3F, + a.u.set_mem_access_multi.view); + if ( rc > 0 ) + { + a.u.set_mem_access_multi.opaque =3D rc; + rc =3D -ERESTART; + if ( __copy_field_to_guest(guest_handle_cast(arg, xen_hvm_altp= 2m_op_t), + &a, u.set_mem_access_multi.opaque) ) + rc =3D -EFAULT; + } + break; + + case HVMOP_altp2m_get_mem_access: + if ( !vm_event_is_enabled(current) ) + { + rc =3D -EOPNOTSUPP; + break; + } + + if ( a.u.mem_access.pad ) + rc =3D -EINVAL; + else + { + xenmem_access_t access; + + rc =3D p2m_get_mem_access(d, _gfn(a.u.mem_access.gfn), &access, + a.u.mem_access.view); + if ( !rc ) + { + a.u.mem_access.access =3D access; + rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; + } + } + break; + + case HVMOP_altp2m_change_gfn: + if ( a.u.change_gfn.pad1 || a.u.change_gfn.pad2 ) + rc =3D -EINVAL; + else + rc =3D altp2m_change_gfn(d, a.u.change_gfn.view, + _gfn(a.u.change_gfn.old_gfn), + _gfn(a.u.change_gfn.new_gfn)); + break; + + case HVMOP_altp2m_get_p2m_idx: + { + struct vcpu *v; + + if ( !altp2m_active(d) ) + { + rc =3D -EOPNOTSUPP; + break; + } + + if ( (v =3D domain_vcpu(d, a.u.get_vcpu_p2m_idx.vcpu_id)) =3D=3D N= ULL ) + { + rc =3D -EINVAL; + break; + } + + a.u.get_vcpu_p2m_idx.altp2m_idx =3D altp2m_vcpu_idx(v); + rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; + break; + } + + case HVMOP_altp2m_set_visibility: + { + unsigned int idx =3D a.u.set_visibility.altp2m_idx; + + if ( a.u.set_visibility.pad ) + rc =3D -EINVAL; + else if ( !altp2m_active(d) ) + rc =3D -EOPNOTSUPP; + else + rc =3D altp2m_set_view_visibility(d, idx, a.u.set_visibility.v= isible); + break; + } + + default: + ASSERT_UNREACHABLE(); + rc =3D -EOPNOTSUPP; + break; + } + + out: + rcu_unlock_domain(d); + + return rc; +} +#else +int do_altp2m_op( + XEN_GUEST_HANDLE_PARAM(void) arg) +{ + return -EOPNOTSUPP; +} +#endif =20 /* * Local variables: diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index b3b21124dd7e..be627152668a 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -2,8 +2,12 @@ #ifndef __XEN_ALTP2M_H__ #define __XEN_ALTP2M_H__ =20 +#include +#include #include =20 +#include + #ifdef CONFIG_ALTP2M =20 /* Alternate p2m HVM on/off per domain */ @@ -12,6 +16,8 @@ static inline bool altp2m_active(const struct domain *d) return d->altp2m_active; } =20 +int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(void) arg); + #else /* CONFIG_ALTP2M */ =20 static inline bool altp2m_active(const struct domain *d) @@ -19,6 +25,11 @@ static inline bool altp2m_active(const struct domain *d) return false; } =20 +static inline int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(void) arg) +{ + return -EOPNOTSUPP; +} + #endif /* CONFIG_ALTP2M */ =20 #endif /* __XEN_ALTP2M_H__ */ --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720805; cv=pass; d=zohomail.com; s=zohoarc; b=TWYX2cVoLuTfeMOEsWsM3IdYlHv9M6ZiWu4OwgYykI9PvY/QXFXPY57pPk5f0fpGiTBpke3C9Tc7WzCyihOcn+i1q+8e3EGsQs0IBMzDoxyYts5ItrCZoL6Af3t/gBsGsU+8kbB7kJbKxn8PL2byuZSLHRciDck/I2nwee1N52Q= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720805; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=920CLmPnDOg9eeLN7pE/1x+mVKc67Ab1k7o15fr+MnY=; b=b8sXzWrXC252EtvkQnwf/KM2BC50imU9Ie1uUYHKeBS+v/MeXPAbfcSGpRT7XnRelulBG1rmEtMPYmP6iW9P4dqaLeWhTbI6Uvaq7gOO1sSwbWB0WTOxONL1+rkCByMh5xkEAqh+AIA0EPzqqWSg0R5dxbgHa1iKbZh111O1iDA= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720805956469.14580046438266; Mon, 20 Apr 2026 14:33:25 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287763.1568169 (Exim 4.92) (envelope-from ) id 1wEwEn-0008R9-Cv; Mon, 20 Apr 2026 21:33:01 +0000 Received: by outflank-mailman (output) from mailman id 1287763.1568169; Mon, 20 Apr 2026 21:33:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEn-0008Qm-8O; Mon, 20 Apr 2026 21:33:01 +0000 Received: by outflank-mailman (input) for mailman id 1287763; Mon, 20 Apr 2026 21:32:59 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEl-0008Kp-FZ for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:32:59 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEk-00CD6F-Ss for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:32:58 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b6b-2eae-0a2a0a5409dd-0a2a450289b2-44 for ; Mon, 20 Apr 2026 23:32:58 +0200 Received: from [40.107.200.102] (helo=CH5PR02CU005.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b89-af86-0a2a45020019-286bc866b857-3 for ; Mon, 20 Apr 2026 23:32:58 +0200 Received: from DM6PR08CA0055.namprd08.prod.outlook.com (2603:10b6:5:1e0::29) by CYXPR08MB9432.namprd08.prod.outlook.com (2603:10b6:930:e5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:53 +0000 Received: from DS2PEPF00003446.namprd04.prod.outlook.com (2603:10b6:5:1e0:cafe::92) by DM6PR08CA0055.outlook.office365.com (2603:10b6:5:1e0::29) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:53 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by DS2PEPF00003446.mail.protection.outlook.com (10.167.17.73) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:53 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzH862xlz1wdP; Mon, 20 Apr 2026 14:32:52 -0700 (PDT) Received: from BN1PR07CU003.outbound.protection.outlook.com (mail-bn1pr07cu00301.outbound.protection.outlook.com [40.93.12.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:52 -0700 (PDT) Received: from BY1P220CA0042.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::17) by CH3PR08MB10119.namprd08.prod.outlook.com (2603:10b6:610:204::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:45 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::73) by BY1P220CA0042.outlook.office365.com (2603:10b6:a03:59e::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:45 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:44 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:41 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=m9eGN9MfZY4jzJW/Q1ya/Nqo4V+fD3/3Psh6avzXkYjiduiAHjKwQpk0CDBDKvf41uGrHUPEdMe6Af7BRG5e+Z6m4xdmzIE7MaBq6gyjtjPQz0nzQi4XOX5HAPhlCQi8mx+AjVyU34iV05BbKQb5XiQE2afPjD2oRpeAz7fzhdOXhCpJZMTooWUJUvakMoYZff9Br8ZReZU2M3E9XI+Qgll6Faxut1as9FK/GN9xnCXfDTApxdtUbRRwiTVbwcgRgl388lNugsbeFeWzM7M4MVBrTjlFpoevaD6BTqUqJFbOkf7YR0S1+BUEQPci0Zr6APTfewW+jUD/+sH+ekW49w== ARC-Message-Signature: i=2; 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=920CLmPnDOg9eeLN7pE/1x+mVKc67Ab1k7o15fr+MnY=; b=rDVlNmxozvjcFfzGiXWOEg03MQx+FxFYFO75js8+YfzYRkHBKr/BOva6mu1LoI34ELpP/xHpx0Ze/SOL9rVe8PqXw7W1gNsKlt9BlbfZ4+Kp+xmXZ2VMWX2iKV0/IW36HgrpMTSB1UV9clbzb7VdlUyBRWE3ucPnIpSQ9jcaXUhVZMeGfrN3ldsNDliXm2g/bCwsWrJBv7Hbc4S6CDfZQUXmC1jn6P8vdq0DVGTy8n+VgAzJZj0C7LTy9NahJLPopILv2+nwEu7eCe0DkN9EmTiszn0/eRVIPQqxAhfeaaRaFvduSOa+rYlIeDuJ/L269mFi/qM/FnsmWnLxgEF5og== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.12.1) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=920CLmPnDOg9eeLN7pE/1x+mVKc67Ab1k7o15fr+MnY=; b=MGbQ5OVBWcb5drSpAVR/SfX5Kj+JSilIpSA7to/A2YOyaT94+n/a2hUhqScStFQHgYH02bfSMidbdrPRH7mvGjYzLBAzUK34WsHQU0HHYC85CPDjR5GWkQKxEQa1pMWNVVg0pd6gVFrEbS1MDpqPpXhK+L1HxChYVj5kgRILKrw= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.12.1) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.12.1 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.12.1; helo=BN1PR07CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cFEGWW0wI9qQpB06cFpDqlShSGVnu2fRPELpc2L0ydiaTYkUHL2P5l9VY6xo37qlGMLIbPKyoNLpQw9R5j0U8Le/7EhTQRPlXtgsdldehssu7jBXm6z+DturYKUh0o4aA37DOke1nhoXMe6sCOtx6m5sAyofn9lL3Jiy/YK2zumoaeApdcJs4c9QzVdKOtf/8RgSRfmFvCMI6ADI/cm9627VBBcERFL4C1jzdd5WGOsyRXDi6X+AXAVWFYWX6zaULK2XBOJf3rmyAaLMjMugA1khvzIRY4zZh918GNaaMRYRQQlvh/Il7WoWgSCJTmDRNQ+9N6eAzPnnSq4L0Vylqg== 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=920CLmPnDOg9eeLN7pE/1x+mVKc67Ab1k7o15fr+MnY=; b=I+6212nDc5/GMI4iMb3rV/S7kelOltMzLg578Z8GTp/zZdMmE7NikHzWJfeiY0zvW5pmQqZL6z5uoV7CMnYQ2JA8/H7cVMl6bTITTvjZMBWS7l/MpP5J9ZjuiR3/cDDlW+ztVujwoeSvijuOIQQ22uaO9l7IND3scNxWLddUTXcy/TeVUudNNDyBff8A4nzQAChPZiVi3P58w48S2/rZG2YEeAnyZJD1d1mRzVffvmOJy3GgQhjnEnbrXMpfRND6t5eaGgL1IfyBHrH4AWv4WQSqyLCjmL2O48kK+diX7ghufWFyy+iYPzLODiJOcU6OaviBsRtZfN5PfJ8Y5foAKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=920CLmPnDOg9eeLN7pE/1x+mVKc67Ab1k7o15fr+MnY=; b=MGbQ5OVBWcb5drSpAVR/SfX5Kj+JSilIpSA7to/A2YOyaT94+n/a2hUhqScStFQHgYH02bfSMidbdrPRH7mvGjYzLBAzUK34WsHQU0HHYC85CPDjR5GWkQKxEQa1pMWNVVg0pd6gVFrEbS1MDpqPpXhK+L1HxChYVj5kgRILKrw= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Andrew Cooper , Anthony PERARD , "Jan Beulich" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Sergej Proskurin Subject: [RFC PATCH v6 10/43] altp2m: Add ARM support to do_altp2m_op Date: Mon, 20 Apr 2026 17:31:33 -0400 Message-ID: <20260420213206.208750-11-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|CH3PR08MB10119:EE_|DS2PEPF00003446:EE_|CYXPR08MB9432:EE_ X-MS-Office365-Filtering-Correlation-Id: df206c15-39c7-4774-c108-08de9f246197 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704161411799003|82310400026|36860700016|376014|7416014|1800799024|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?1NBB2UYWTz03qDBikJeCnBTcsbNFCQJny5w7frHSZz8svDc0uJlGXnYLGoTJ?= =?us-ascii?Q?+AA9pzme69Ig013a+I6+BqfeON5LY20LhyuDU0munH9K5ZDS7yWzx0n3VtMc?= =?us-ascii?Q?SRjKm6BnV40fXub0Hh0MZTtl8G8XKn63V+H/DFeZF/JaQA8zAMvseWC+cALX?= =?us-ascii?Q?HTeMC0Dc++8MGDN/r15q59Laj+y3vrPLopQcL9lCIfTk/iN1G0Gq69/yxD81?= =?us-ascii?Q?4FoOwNqNtuvXYHZaxgeoLBvK/I4hPUu2yHrhQw3zjseQcxkbvAEYLEec7Qy9?= =?us-ascii?Q?vClIcQOzMA8eiDMDU/2WnBnEhlh797CQm6JHhZ3WtZ5O6Yxk5bJwESy29J35?= =?us-ascii?Q?x1O8tb32dcxSICGvg5ghWJLz1tBflnQUYYveHtzCQNfI0SA69qpHgtJ5ue99?= =?us-ascii?Q?Sj2vsV4+9fZtWSy9TtcOUpEvIErCYtiyRKg9QgOJKPVNrYh1Y+/c42M2i25+?= =?us-ascii?Q?bSjhOGSNCeneR29WRmoBDzNwZITx93DEUgjhWgYTCp/X8yUycGta3sZfiqfr?= =?us-ascii?Q?ybkYfyKsGspRxn13E03z4NnLvMUFdU10xVRYTOSB/Ec/oAlS7wXNsIu2DOou?= =?us-ascii?Q?3C4nNgFY+qcXDG4DC4jzNDv6lUWWZ0kjYa8tsWWTExGyL7vhCy12zrb+O+4f?= =?us-ascii?Q?3+1FW6p0Un5rQ057yljU1CMNPrBnpvvDfsUQkitOREKicLJYoHkQqnhlOanO?= =?us-ascii?Q?HG/qe90dHj3PFr8GI9WrESLyNQQfkj+wezvZKJdFIWv1eBLj8NmPNv4bfynw?= =?us-ascii?Q?idkvN8P7ID5FOL4cXpNo4N+v5vbe82NixtTiI4xXIdfyeOt1M0xStZnqHiSc?= =?us-ascii?Q?mT5BTzysW+5y5E/d8p5wDIBrVrz6aLkL7tzq/kSHNQ78/wFNkXFaxhdZrfZ3?= =?us-ascii?Q?t6bUDvHdCxY+tOVFOkE8gPbCVW9c0KcTekES+jE6JGTNx+cihDL7bWuPj4YN?= =?us-ascii?Q?n3E1f06WYy8gvAcm5fb55432t1yII0TrjicGWJXcKAohF49UOyZp9meJWZ76?= =?us-ascii?Q?C6VIFTLJSSxcYSXnZOvnOru8DfyzUilEPt6fbmP3rz8IOckwhhi3lt9/vZyH?= =?us-ascii?Q?Wnkxq3JMEqhyJZM73TU7Gts6Zn3f1J1IKcIs9cbXosmOuJBTgeYmUN8gESmN?= =?us-ascii?Q?kQrBzTQ5tsvl/WR/MRdtIWBHR4JzFREvy2tNtphCQswu7X3R/HnlpEU=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704161411799003)(82310400026)(36860700016)(376014)(7416014)(1800799024)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: LDeCQf4qTWOWoLaKwLLRVvmfGam7q2i/AYJEwOkF8dXoWbU5p3rol4/8RNlmlMfflvFYPwZD919HBifAzz6xIgv6wohoozYpy4qRX5EOObzGHOafNFKnMF5+7CvE13uwcy6sJYTo8L8PLiXx3DrRJV3F+oGalsNYm0nx41yddk0jvpzadD12R1dych+Fxd8FdIIPKnfThabyDF97xcA7IYN33mIt7IqSAk/UlPpX0VDohtBsre6ZSCDaAY1jJ8IV/I1VFXCvVy9rdDqtVVRXKjONoDC83mSISIKte5bcDc8ecZPCP+1Zs5e5l7zrfUdM8AQB/zmdZRhsRpjJxO+c6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR08MB10119 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.12.1];domain=BN1PR07CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.12.1];domain=BN1PR07CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DS2PEPF00003446.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d28e0a32-d628-4f1b-e916-08de9f245c5a X-Microsoft-Antispam: BCL:0;ARA:13230040|704161411799003|82310400026|14060799003|35042699022|156008|36860700016|7416014|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?hW4Y/U/0ML1c5FgWw5wAZxjPl67OE4xjhcUpyv42HSDwZ9yHRsH1YN+Si/BR?= =?us-ascii?Q?S+y9J4P/skvWndMPtyCQng34IynII746wQ3GjfD12L1ggrRPapcO4gY0cO97?= =?us-ascii?Q?p0zD9USI+j3lG2vF1fGZMA20iCMfR5di+9NXidUeCiRKbpRP62mFCr+9n5Nk?= =?us-ascii?Q?K8nStKk3FVy1pSkcq2oCpz0nsgu0CXYN3/Uwt81WqsyagS7ScKoVrRAVkUPP?= =?us-ascii?Q?QUH0C3UcR6s3XKjmdPJCFhdNlf44n/rcBhwn54jnnsstRnB5HEaGdp+gSXQ3?= =?us-ascii?Q?hhcg2soxZHKM+1g3uZtZcSiiwcz1EAbFz9clYZYF6Mg0eUyBEIO0NxZtxXA6?= =?us-ascii?Q?KIxvO0TIOs7xNW3vcId2U5/H4Ez+k5UZWA2CeHTrkjiZByGm5mYyqerchmjo?= =?us-ascii?Q?NQJJSgPcFOkYGwUWOiEO+Cze/CapsWCZgyb12EJYm8lhtpuhguZ8aW2lxmmE?= =?us-ascii?Q?u/JBcgg6SBFazUC5qsGvaH5yXpDobMzrM7aVdZTPHti+h+V1BddWDifYLVHC?= =?us-ascii?Q?kn7KAOUUlKAEFLYGWEEDNVZ7IgGSJVUuzfI4OCSqL3+NgNxjjs4Vh6Rsbcrj?= =?us-ascii?Q?sNBCrq6Po0qGy5Gefq+NxwmomRx4l2+fyiin+NiFdMsl/TBv84KxPy7lglaY?= =?us-ascii?Q?LIq/FDnexBm19aSGi1zGQ35aGFcmTTonZh1KWj1bIKvESI6U49ciaqAY7Bqs?= =?us-ascii?Q?Mg/xTtGHiuog1CBhMnSZ3XHB9iHEdrvwPiywrz++qv0JCN6qXt4saJZP0ly4?= =?us-ascii?Q?bSiyG8uP/ueb4HpUn3s2hrzmyvfQq1rz7FwS+MGSeiCKhQxY9VIpvkfVexYS?= =?us-ascii?Q?mNiBeUTq3G+ufykqNtAlzJ1ZS/MGtUXOx+V5q6ecGP+VB76lgSCUdVaFY9sF?= =?us-ascii?Q?n7XaScljycaQHjn6sUUYb+dNiZLVfD+XxGjdxxt5TyK6Sy5XLq1eaKjc9mkV?= =?us-ascii?Q?lQ3SzBu9bIzP5l6wZlwgDVoDcqv9I2grN6Tt6sI0lUYo+I7xQWVCG8JJCSNf?= =?us-ascii?Q?EfS2XUz6userfYCtbJtuQfXiWYRR6LG+HwS3wfCOuOhWymQNJgef/ccRo4ip?= =?us-ascii?Q?9kMefjxrUY9q4V4uK/ehJtYItMlCbmQZz1e/wxihbZS5pRQyCeEpNQ7/Calb?= =?us-ascii?Q?ZH0tvmLsIwzdi/yIZpcgIiwBdJQW1GwV0u6FHu0gtA//qvUPjDQcq/A=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN1PR07CU003.outbound.protection.outlook.com;PTR:mail-bn1pr07cu00301.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704161411799003)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(7416014)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1Rx9VxvU+hxbFvdWGw0wXufeQuF9vAWlBbYjUHuaJfb3vfBHGONdSRyZsbvdako15TW10dw0iWM9iqb/cV2m80j803wB1xxKSfSvkUe4xMEeXUggeclkgTzN/mXi/C6GgEcn5YFOox9HFilv5thVAyzE6GcKWv5xylj5qop6BwRwWjtqQAvSlO041flG71YXTy+zJesrUoS+Sw3nnXPPhXHzwoUkHoLltA+A3a5ctYmGWJ/oGUuJrnJM87zU8OajRodCxhKXtlIRjeArC+eOzcK0I4zsSG7znjn2OTOJSrTjiv92LRZjAYaMYpaTVyxkydKSuD6x0ghV+cwYAgLTGsFU2cRVSK7f3F/OjEdLYRb/SVZtKIEYx4ByOxsFRcy9RtYiAU4N5ItPuSFPdTQOJ20B9UDJmNDFVoPMn9DM6gsTu0igaL/bot6oKoOTQlSm X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:53.4889 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df206c15-39c7-4774-c108-08de9f246197 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-DS2PEPF00003446.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR08MB9432 X-purgate-ID: tlsNG-720697/1776720778-B3961161-CEBE0834/0/0 X-purgate-type: clean X-purgate-size: 4450 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720807348158500 Content-Type: text/plain; charset="utf-8" This commit makes the minimum required changes necessary for do_altp2m_op to compile on ARM. All altp2m commands in the switch statement are gated by CONFIG_X86, with a default case of returning EOPNOTSUPP. This allows future commits to move the #ifdef CONFIG_X86 down as support for ARM is added. Additionally, a call to do_altp2m_op is added in the ARM HVMOP code. This is commit 2/2 of the common do_altp2m_op phase. Signed-off-by: Rose Spangler Signed-off-by: Sergej Proskurin --- v6: Replaced patches 2 and 3 from v4/v5 patch set with this patch. Made HVM_PARAM_ALTP2M read-only, following the change to the x86 implementation in commit 0291089f6ea8. The DOMCTL to enable altp2m on ARM is implemented in a later commit in this patch series. --- xen/arch/arm/hvm.c | 9 +++++++++ xen/common/altp2m.c | 29 ++++++++++++++--------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/xen/arch/arm/hvm.c b/xen/arch/arm/hvm.c index 86e49bf47403..7c778795a280 100644 --- a/xen/arch/arm/hvm.c +++ b/xen/arch/arm/hvm.c @@ -5,6 +5,7 @@ * Arch-specific hardware virtual machine abstractions. */ =20 +#include #include #include #include @@ -23,6 +24,10 @@ static int hvm_allow_set_param(const struct domain *d, u= nsigned int param) { switch ( param ) { + /* The following parameters are read-only. */ + case HVM_PARAM_ALTP2M: + return -EEXIST; + /* * The following parameters are intended for toolstack usage only. * They may not be set by the domain. @@ -123,6 +128,10 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARA= M(void) arg) rc =3D -EINVAL; break; =20 + case HVMOP_altp2m: + rc =3D do_altp2m_op(arg); + break; + default: { gdprintk(XENLOG_DEBUG, "HVMOP op=3D%lu: not implemented\n", op); diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index a43b3a3e34b3..6481fae1ed12 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -9,8 +9,10 @@ =20 #include =20 -#ifdef CONFIG_X86 +#if defined(CONFIG_X86) && defined(CONFIG_HVM) #include +#endif + /* * altp2m operations are envisioned as being used in several different * modes: @@ -18,13 +20,13 @@ * - external: All control and decisions are made by an external agent * running domain 0. * - * - internal: altp2m operations are used exclusively by an in-guest - * agent to protect itself from the guest kernel and in-guest - * attackers. + * - internal (x86 only): altp2m operations are used exclusively by an + * in-guest agent to protect itself from the guest kernel and + * in-guest attackers. * - * - coordinated: An in-guest agent handles #VE and VMFUNCs locally, - * but makes requests of an agent running outside the domain for - * bigger changes (such as modifying altp2m entires). + * - coordinated (x86 only): An in-guest agent handles #VE and VMFUNCs + * locally, but makes requests of an agent running outside the + * domain for bigger changes (such as modifying altp2m entires). * * This corresponds to the three values for HVM_PARAM_ALTP2M * (external, mixed, limited). All three models have advantages and @@ -97,7 +99,7 @@ int do_altp2m_op( =20 if ( (a.cmd !=3D HVMOP_altp2m_get_domain_state) && (a.cmd !=3D HVMOP_altp2m_set_domain_state) && - !d->altp2m_active ) + !altp2m_active(d) ) { rc =3D -EOPNOTSUPP; goto out; @@ -122,6 +124,7 @@ int do_altp2m_op( =20 switch ( a.cmd ) { +#ifdef CONFIG_X86 case HVMOP_altp2m_get_domain_state: a.u.domain_state.state =3D altp2m_active(d); rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; @@ -394,9 +397,12 @@ int do_altp2m_op( rc =3D altp2m_set_view_visibility(d, idx, a.u.set_visibility.v= isible); break; } +#endif /* CONFIG_X86 */ =20 default: +#ifdef CONFIG_X86 ASSERT_UNREACHABLE(); +#endif rc =3D -EOPNOTSUPP; break; } @@ -406,13 +412,6 @@ int do_altp2m_op( =20 return rc; } -#else -int do_altp2m_op( - XEN_GUEST_HANDLE_PARAM(void) arg) -{ - return -EOPNOTSUPP; -} -#endif =20 /* * Local variables: --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720811; cv=pass; d=zohomail.com; s=zohoarc; b=BqupC8w/kXAzJXt51EfMqhXEZpyrGXXojAPTkFE64peWIOvm04RQkgnHCyhhnClVQPBe+OVljxReVTTgexD59HFylldrgoakA3x4I9HIaH81NO4DH/ShV6YHhO6IzmVlfcEfdd5iclIE82D0P3c2sAlaxpMBJJQuzfUHEJOZNu4= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720811; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=W3upe/u9EtcR35MDKboxPwogT42enux6AtMfl8vUTCc=; b=bLP3bc0Np05AlIScukXivikvn+4NDp5N/LwhM0KiPmigNj15rxPgFQnlNiY4sRk5BSw9wUEty7rcp1zavrdJoVX66Q4O+2BcGvVSHM1zCiXGsX/uF552+0z1ZvnxRKWERdIQUT06MxvtRI7k/PHXSTN4QZdHquA091XNWmQ+wgw= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720811178134.9806071483306; Mon, 20 Apr 2026 14:33:31 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287765.1568183 (Exim 4.92) (envelope-from ) id 1wEwEp-0000LC-EP; Mon, 20 Apr 2026 21:33:03 +0000 Received: by outflank-mailman (output) from mailman id 1287765.1568183; Mon, 20 Apr 2026 21:33:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEp-0000Jn-6X; Mon, 20 Apr 2026 21:33:03 +0000 Received: by outflank-mailman (input) for mailman id 1287765; Mon, 20 Apr 2026 21:33:02 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEo-00008s-85 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:02 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEn-00CD6F-LC for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:01 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b6b-2eae-0a2a0a5409dd-0a2a450289b2-48 for ; Mon, 20 Apr 2026 23:33:01 +0200 Received: from [52.101.53.79] (helo=BL0PR03CU003.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b8c-af86-0a2a45020019-3465354f7b1e-3 for ; Mon, 20 Apr 2026 23:33:01 +0200 Received: from BN9PR03CA0281.namprd03.prod.outlook.com (2603:10b6:408:f5::16) by LV8PR08MB9219.namprd08.prod.outlook.com (2603:10b6:408:1ff::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:56 +0000 Received: from BN3PEPF0000B070.namprd21.prod.outlook.com (2603:10b6:408:f5:cafe::c0) by BN9PR03CA0281.outlook.office365.com (2603:10b6:408:f5::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:55 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BN3PEPF0000B070.mail.protection.outlook.com (10.167.243.75) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9870.4 via Frontend Transport; Mon, 20 Apr 2026 21:32:55 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHB4R06z1wdP; Mon, 20 Apr 2026 14:32:54 -0700 (PDT) Received: from CH4PR07CU001.outbound.protection.outlook.com (mail-ch4pr07cu00103.outbound.protection.outlook.com [40.93.20.99]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:54 -0700 (PDT) Received: from BY1P220CA0039.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::7) by DM8PR08MB7526.namprd08.prod.outlook.com (2603:10b6:8:9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:46 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::20) by BY1P220CA0039.outlook.office365.com (2603:10b6:a03:59e::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:46 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:46 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:43 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=ITXgFYmhRlJWMthx+bteFC6wDJlWh5Lce5W/JQu0h7L3x/lrs3bGixjiNu80b7YTvyCXJtCLIi35/XDoB4rc1cbEbz7HHIg+7gwhBnGt4zWY8avqmLcxvvtgsaL+f3njGXi6V2dH8vzXomvfXCYsYUX4DgQAa7UY0b/D/IHWCc/sjQtuKl3snWSBq6OrD1HpnKJyHs6bXpLURC7UNtoAVExQgts/a7eGuwZujIAwPlM4Asz96QbRlXre9OJNqukNLUU7sfBhD6pDyvq3eTHFgqLNSK/hizClwdePYxc0IjWMXTc3ky+EZ3uIuEPhScf876IPR+U3Hvt20nX+ZGTpCg== ARC-Message-Signature: i=2; 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=W3upe/u9EtcR35MDKboxPwogT42enux6AtMfl8vUTCc=; b=JXRv3KDvPC+2M25eC7ZTrdWHeE0dciYxgjXC3iq3evWgZAwlSXfc1ov7nEnoPFkzcRp/GteYykoxNAxh1lHbusl/+JLivcQbTvR2jSh67j4QfVOn7Kit/8hW1R3TIOrNsJL1QlTUiosxtrUuCdbChL09rFkjuUqfFzdp5Mxio87jhQhbhSx4uR+7bhH8+dbYZnlB0BngyJvg8N2E9mf9/iJo7fDudyeCnlsOx/5Qv5MzkrEELi6KouP8taxWDjx3APeSn7IOHzm2c4MYge3tNmA7YWDGsTom1T6QWm7N4ve6r0Qq23MK1qnFdEvSufuo4H1TyhGEKOcXwx2M/C5y3w== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.20.99) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W3upe/u9EtcR35MDKboxPwogT42enux6AtMfl8vUTCc=; b=WRcJe3HTC0eKDE+EVpUaR6HOkaLv2epLDLH5L5rx393wZ5ObOEc6LrvwlqBbqe1Oi9IDTkZl3i/2m9VVY9APR7liBI043aexjI5OFGxNdQF8FCc6dcLWMjHxGIaQl5HyKlbgr/hPTztbzcw2pPx5lbYUSdwuOqDUZlbUUaQ0alU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.20.99) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.20.99 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.20.99; helo=CH4PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OAX1nxFOYuboaN0C8RWRQXhKY4QYG9Dwd1R3W6PN3Qt8Z3OiFAf4FblTxKBWtC42z5Je2ZK3GgYRg9+3ylw0G13r4Z/4RLMl0xCGdlUjjAUWpUNHfLhAUHjTaxkittpNyIuU20A5AlRfNdBwwujIx9BdtF+78qfyxqv80D2VOGgqI4Z1VOQVsLXUr9PQTjNOER5a1YThPldlfU/v050kvPD59SIZfxQdmTDTyg77C3oqHJvZ+macg9MTu3Uxz1F5hN+m577KgoswVb0AatTqkm+mOTT6pYgRfxIZITyIQrDr8eb2b4keiyPS0RY4YM310fPUY3Dsv9NB2uYLJyWgEw== 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=W3upe/u9EtcR35MDKboxPwogT42enux6AtMfl8vUTCc=; b=POoprVeFu8yymL1KveJYRQCqR6WwNkQGnU2OkGdgjql45hpsQWIfy0N7UCLNhyePCLO5SJGRcizNwCb2x8U207/LRZrLDUftpb8nvqm6QV1DjlkQPHWJPTTT5rx4InSzVHA1Mi1TpK+IzZv/pDAv3fLyZA9mWnA1IRJ0poQNUTdCJfAvF0S3UEd6yoiAivvnV6UNsUSzZzq+xQTo48Yh7vCRxv3CvMuZIhn52Lv1LZ+N1cPo9Z/E3bzBj6OBeAjwELPthlHnNpuZgJ8MIfkjyRNs2oxKOlXZbcpcBC00SjaKKSV4cNQk12wmT43BTP56cbMFWGwJuTGYGgpGB4QBcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W3upe/u9EtcR35MDKboxPwogT42enux6AtMfl8vUTCc=; b=WRcJe3HTC0eKDE+EVpUaR6HOkaLv2epLDLH5L5rx393wZ5ObOEc6LrvwlqBbqe1Oi9IDTkZl3i/2m9VVY9APR7liBI043aexjI5OFGxNdQF8FCc6dcLWMjHxGIaQl5HyKlbgr/hPTztbzcw2pPx5lbYUSdwuOqDUZlbUUaQ0alU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , "Julien Grall" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [RFC PATCH v6 11/43] arm/altp2m: Add support for HVMOP_altp2m_get_domain_state Date: Mon, 20 Apr 2026 17:31:34 -0400 Message-ID: <20260420213206.208750-12-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|DM8PR08MB7526:EE_|BN3PEPF0000B070:EE_|LV8PR08MB9219:EE_ X-MS-Office365-Filtering-Correlation-Id: f01228a8-c02c-4955-de26-08de9f2462b1 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|36860700016|1800799024|376014|82310400026|22082099003|18002099003|56012099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?hYGqKqMyvWU9lXXEFEUiMOUlIHRS4AeuEiuH+DpQGz8IXkeCHI9QOJvGEIwE?= =?us-ascii?Q?EhDK5wFmPK/b+LReZPmCy2qc3vZhIoeqoZTp13YV62K6FzwGRbUCogQdBKWn?= =?us-ascii?Q?tnpj5i0cQK2S1F2obe0wu3uzSo4knZXDB+Nz9wv79z/HJI8Ed7M0dObJ9k9/?= =?us-ascii?Q?4ttZy4D5KX9EUjEP90ALtCnk9KvhRz/Dje7rfom/GRBG7wjhFeSh7uZ641Rs?= =?us-ascii?Q?bZy/DMbYSJ1UOxN6WrXR9jYs+PCqwIjx38DGZzqmOyH9cNe0aCYMThTHzghv?= =?us-ascii?Q?/SbHjQ3h7bWOMaypFEq6QMSqq/UPHkbloF1aw8zyaX3PdhNjD65HqIfX86qf?= =?us-ascii?Q?UAOI5UExm3PqhOceDiq0v07ayZ15i9yYXvPzyoLbNjHfAnzdsTBU3Q7GEVxq?= =?us-ascii?Q?8Uc6l/SJgMaggyYiZtF4D818tpCepmPo7KIHU754Vs2QgFgrd3IntdqnDUO0?= =?us-ascii?Q?wXUCquwp+4CwgRwhTKjZ8vTioCefPc5X+wcZEXIT+hhEzGfDCpWsyjoOmyUz?= =?us-ascii?Q?H8zdIRbDTo+CJaaAcdpx+UeW6eLZ2JniZrSv6eRRCOcZYVwE8AbJwW4OawbV?= =?us-ascii?Q?pOnM7H11QwtBKbdj3YRKGvw8KZR9yV/nQX/63P9AuoncPe0hk8tjuAkq0oPX?= =?us-ascii?Q?XWPMKT63VYP5LJjXcejVx9rStt7V5028Q9lXu4rfCcEBUccNCXJPlpS32zv2?= =?us-ascii?Q?RD/PBSZuya0ZkwQRAwjiNVJ36zdLv0OBWWPKLgW05hLe7NF5lMDjm/ljDrd7?= =?us-ascii?Q?xWrMevsg34RninQrDJjJZeJmEmOQy+k/n9v6hQB/7X7iyZAncXW+XSzuUuVO?= =?us-ascii?Q?U+OqVLBc+hAFWacHehIu3+D7xvJasRLMg1w5vfUkp7m8YsK5881+WhxvAoGh?= =?us-ascii?Q?lNCjnwCAmQQAffTOkP85tMdeYdLQG93JtJdKNVKkP6YQHVHIJXAdqSi0lZ79?= =?us-ascii?Q?blgccPE3l8HuyYVmUtHHmOddEHVzf0ZXmz40XVCAWaGB4Hp9x0tKRLOF05M7?= =?us-ascii?Q?9m52fNO8YwUzmegtgt15ryAaoG1esV+uX3/lrMg9mJzo2qWjeFz9Way3P5pn?= =?us-ascii?Q?9I4BudtO1FYFS765oOTYKfcM0WyXksBpXXT81oYzgEBh7Jfg9sgG9E/si5Bf?= =?us-ascii?Q?CjOf69ImrJ15FFpBKGUOujvgjkeNqrkSvKmUnCZRdQOQxhcEx7X0hlJRIgrH?= =?us-ascii?Q?3xOJO85Ls8O1uZYHe5WwWEz/ciNCuHLWul4HlJLNef+jkSlQcV/XPpgsbibz?= =?us-ascii?Q?+XxuvtlchSU1CsdUl9CCJfVcFOQVM05mbuEfBlyEnA=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(376014)(82310400026)(22082099003)(18002099003)(56012099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: SD1M68ce2XIfO93b+ZC3s9e4zpqX2C7v9qjBgvP4XY1lUmpS4ACzMlZNgE2S0dQqI7TEID2YnYyfwJZ2rqTSVg9O5/Mx9PuHq53W7LQYkEKMvLqxu2pevMnoaV6t27EekXhzIxGucttMBnoIw7EDgS02P81Xk9PJLxJVrI881R2mGQKTyA+HL0ibmsnQusBKU1ljtcZ4SJs3IeH0panl5RV+j3tuHZCzwXz8hDkhT3jaYMN63zfFVabJ5h0vL8If9guHN1ODqfq/szedmOYM5oe7XJvcpGyUxo34qoiOsV3amP3F47T70P7r7yag63cx0kUsEHNhRU3e8qqIPsFuhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR08MB7526 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.20.99];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.20.99];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN3PEPF0000B070.namprd21.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f8ec3c23-5058-4cc6-905f-08de9f245d45 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|14060799003|36860700016|35042699022|156008|82310400026|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?NMMDxcMGKNpoKvc0ufye+b60cuWFafOlpyXikUw72klxvzy3etbUH93PMbWE?= =?us-ascii?Q?r6uG4nFEXuQQaLKoa6/FheG5h84nwBWbWKWVPvSAlmvjmYVHziR5fMy+z5FN?= =?us-ascii?Q?XNhx2XDHrVjF9wdxeIcplxx+dH+8/O/zXHsiII97q65H9C+i1ar1ijXZ50oh?= =?us-ascii?Q?aH7Z93Q0BySHvBUcqHmKojdzIyniozvs6bXgpMSpVTYByVLH4gDKKOSjPjdP?= =?us-ascii?Q?sNy42x9Cmcsev4OYkEod+WJjcmMdAHNWD1lHx4PH7e9VFCx2DTAKuKNCt4hv?= =?us-ascii?Q?McUlIT6terfvcrgySG2kLPXZ3/4i8+Ngkcqk0Hwv+B3lQgKXPqdQKeqodNhg?= =?us-ascii?Q?fdmEZmoKeetwI3TW28qDZRR2GxvE6iEa7pEUA3o+USc6sjwTxdVWJrB5i9c7?= =?us-ascii?Q?Fn1CFswLcdoqFNt8Sx/HwTKIl2EBh2BM9eumIdBRLmm8pqu5Iumd99XU3rFO?= =?us-ascii?Q?UmT9u9A11kgwmwggOQxwJql73jK1BvJpTCVLRZl9jDMbyQuZanVfLAo5sYOU?= =?us-ascii?Q?LwZYN0zgR/yksDPpDJjhRSl8Jmla0A1IA4xTd5ZRS0NWO8tjJWa7Bo0C/AUz?= =?us-ascii?Q?8pvcgTAUy+Gu+iyPBpDuRGwQUYGiztnTRHA3korxUYU7YBrnyXu4VtEM8OG5?= =?us-ascii?Q?aKHvMYOx3MGdq/MboN8njyO2lea0DL8Dd8g5/l4+PWbjMTkkhge0EZVzq3dC?= =?us-ascii?Q?xrTTEXSmB8+WfqDh5MMUjcAroTPGMMwvQTWaaab7z4d9srzyY+J5SSzVQGjj?= =?us-ascii?Q?4fSH6NJPz0PMQ5WNHLdFjWunlepM1HXQLSNhd+nciUlhamOxVp3HrwOdJTB6?= =?us-ascii?Q?zYczOZosxv1FDQ5ALUbhyVgZr46DldjPhXzhgDez5OCEoDVbOQyhkUBQ0ANK?= =?us-ascii?Q?ALP4ZINpdv5cL57Tc99JFaj7p8cwtEceHwHUQwN0WYxY0ikNy+omEGXKHpaT?= =?us-ascii?Q?Q/shsI8TG8n6iO7fzClgLsWP4EIagkfgtBwCcxn1wtBqb6XCs8SUtdbPmTL5?= =?us-ascii?Q?pzhpFeCh/QLrRPVYmF6sHkVF4YsmohcOz73bIZd/RlTglJ1wYPmd2m4MRhxv?= =?us-ascii?Q?T3VKHOu1z23CLye4wBwmbc28MuQ7vTzrD38lpW9EOKRMzAR2vxRhWdT/5YCs?= =?us-ascii?Q?M5bl/M8JptbU2F8HY+5X4ieVW2M2tJwDf/3S1EMhm++Xnxpp84Y4wKUnHxv4?= =?us-ascii?Q?VuPus2dbUyCGw5nt7DMFyxXpsrhCdl5X5UsfMjxzI7JmXTWwqpU205yWNJyi?= =?us-ascii?Q?PdUe9NtUd6fYKBxcs4sNbH1WEaqrc1s0WQFUGO+iwQ=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH4PR07CU001.outbound.protection.outlook.com;PTR:mail-ch4pr07cu00103.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(376014)(14060799003)(36860700016)(35042699022)(156008)(82310400026)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ae0uBpfE2g6Q/BkFzUX+nmd5l+Y22qtfMRMNK8diJGi+pDTyPCe9RZ2um+Rf0I+eILzODBY2ryXO7T63QeyeIoQMFhOUYc3SCZkaLcEK0BIfVtPtWUKD0WcIFbMIGdREhmKWKCQ1FZY8Y9Uj8KSA1zAl5C8XVBzMljmjtwEuXKoTEy7LsqvMO6Y23pSz+wZ6LHx6e1YM5Nr4wOpoDNPVkEXaPc9T7U5EvyA6OaW8fzoityrE/GgpQ3mfPWox5YZqbGSzFk0qwdPTsZqlA565zCEwx9OS2ZWUIS75rdFCEHJ49rnzNzB/6drW1u7o3SXuya0gOtdePeN7m+9K8l/cqla5fcFFtVLdIYTWxzd0l9XPlvKs4Ax2BJBukhvgXWeDvRul3ySFXR79bzRH9DSt0ciDE6ailnO4VrhF65t/1hauHMxFxXBCVwhCq7f221xl X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:55.2570 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f01228a8-c02c-4955-de26-08de9f2462b1 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN3PEPF0000B070.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR08MB9219 X-purgate-ID: tlsNG-720697/1776720781-894CD161-697DBD9B/0/0 X-purgate-type: clean X-purgate-size: 1215 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720813220158500 Content-Type: text/plain; charset="utf-8" This commit adds support for the altp2m_get_domain_state HVMOP on ARM. All code used in the command implementation already works on ARM, so no further changes beyond moving the #ifdef are necessary. This is commit 1/1 of the get_domain_state phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. This commit can be squashed into the previous commit for the actual submission if that would be preferred, but I thought it might be easier to understand the command #ifdef gate approach by splitting this into a separate patch. --- xen/common/altp2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index 6481fae1ed12..3a3283f0860a 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -124,12 +124,12 @@ int do_altp2m_op( =20 switch ( a.cmd ) { -#ifdef CONFIG_X86 case HVMOP_altp2m_get_domain_state: a.u.domain_state.state =3D altp2m_active(d); rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; break; =20 +#ifdef CONFIG_X86 case HVMOP_altp2m_set_domain_state: { struct vcpu *v; --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720807; cv=pass; d=zohomail.com; s=zohoarc; b=Q1pdrmZWIGc88sPUR7UcP1G0q3RUzI1d9fhu3fk8ogZtbBQVamrBK81pOnlpCEgMzFYzu8ADwnO8t08n/xCkwhSJc4kTE7hwyy1mL8w0K1tP2YqxfuYRINgJDQu3DdhH+v6uh/5JJh6lPNw2AJoUGQVemVmH6GcCB+kJM/BO02Q= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720807; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mIka6cApKr4tHLkM0UcaDmcfawXuEpYHKEShj03nxYM=; b=ULsKLEiHt+zZLQfBvHzdCIEEd5BLrjodJpqdtey1P0b34yU0bfI7rMiWvCRBqkwJe7REVPgT6JXi+ez3paLtXnvBtwUG2rIFIQRBz49/UZBAf4lGOmvXwNvO+2vfYP1H8lRTR9E0yK39bpBow+9X3JtMbV0/7E1kmHaphtm8u3g= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720807163132.62850622633903; Mon, 20 Apr 2026 14:33:27 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287774.1568196 (Exim 4.92) (envelope-from ) id 1wEwEu-000175-Cw; Mon, 20 Apr 2026 21:33:08 +0000 Received: by outflank-mailman (output) from mailman id 1287774.1568196; Mon, 20 Apr 2026 21:33:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEu-00015e-5Q; Mon, 20 Apr 2026 21:33:08 +0000 Received: by outflank-mailman (input) for mailman id 1287774; Mon, 20 Apr 2026 21:33:07 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEs-00010Z-QB for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:07 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEs-009kg1-6q for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:06 +0200 Received: from [10.42.69.8] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b7b-5cb7-0a2a0a5109dd-0a2a4508a890-12 for ; Mon, 20 Apr 2026 23:33:06 +0200 Received: from [52.101.193.139] (helo=CH1PR05CU001.outbound.protection.outlook.com) by tlsNG-c1860d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b90-63b5-0a2a45080019-3465c18bb7b8-3 for ; Mon, 20 Apr 2026 23:33:06 +0200 Received: from BN9P221CA0015.NAMP221.PROD.OUTLOOK.COM (2603:10b6:408:10a::20) by DM3PR08MB8962.namprd08.prod.outlook.com (2603:10b6:8:1ae::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:00 +0000 Received: from BN3PEPF0000B06D.namprd21.prod.outlook.com (2603:10b6:408:10a:cafe::89) by BN9P221CA0015.outlook.office365.com (2603:10b6:408:10a::20) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:59 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BN3PEPF0000B06D.mail.protection.outlook.com (10.167.243.72) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9870.4 via Frontend Transport; Mon, 20 Apr 2026 21:32:58 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHG0Z9hz1wdM; Mon, 20 Apr 2026 14:32:58 -0700 (PDT) Received: from PH0PR07CU006.outbound.protection.outlook.com (mail-ph0pr07cu00602.outbound.protection.outlook.com [40.93.23.90]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:57 -0700 (PDT) Received: from BY1P220CA0042.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::17) by CH1PR08MB10761.namprd08.prod.outlook.com (2603:10b6:610:2af::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:32:51 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::83) by BY1P220CA0042.outlook.office365.com (2603:10b6:a03:59e::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:48 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:47 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:44 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Q/J5nitoav9HDuZxzEMHYvUNe32SVg/BHmnK7EELaCLmdC5+7lqGi4lZuzK6dEDVNg0uYvIVlD3B2K0WJO1rWn1FmliRWS0OhC5vcjlDWL9e3y1cc1f/DKJHTY6GhRrJIdTBFrak0VmBA4YKtUlWKnZ6HOkrNmvwhbMa52voEboIURWKDy33qFMEgqWIaIaukzqJz9hJ6nqcjFe75gFIOaQnD7x74KRBS19X3K4dAXADDDCBMHCxxGBMDLp5GcAgQX37PIAQxWJTti4Iu6SJzrvDNXBkccorPBKxoHEpYoUtsc2lAxCnuCjAvhcS/FwwP2yyxC5GyxDiuE8O0l3i+Q== ARC-Message-Signature: i=2; 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=mIka6cApKr4tHLkM0UcaDmcfawXuEpYHKEShj03nxYM=; b=lfq5/+QnkyzF6qyEBT2fQVCut/Omu8cT4vCwxZcvyzgUxuviV7zvEN5EN0Y4NL5EPREaUsMCb2WbIFJQobdil/nC6xxhywyJvyUx9MX/6whWR/U2jpGT00kXEHrJwCErTe6c2FQN1E2k0JyZgsxKk8A1Wbn94oWsN2SE1rtBXW+zDEZ9u+wEZ8XkdYLwpP9kYvUIbRL/u3v2YGJ4lykMtrF7941zc11obYCKML3EwvEISN1Bfcv08sRyJaZHzCwifzoOr++DBvyNg08x2r3fWzbvjHgoryn5VYgNdmwd8xR8SrCw/40Guy05qt9Jq3zFKgqK5bJJtHBaTpNq5K8odQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.23.90) smtp.rcpttodomain=citrix.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mIka6cApKr4tHLkM0UcaDmcfawXuEpYHKEShj03nxYM=; b=Z3nlMuPaivMpvv48PfnX9EoFwoPkDdyehzzUW2ayaVOPE2wNd93fhHdTx/F+bl5Fn74e05WLRCctu5OvJ5TTFt3VBNUZhQxbxZ/DCJVLCm7qaN/g9FmWGy0jBCAK74ZDHZ8ZA4WZhs92+h1tEDD7BIWHhmqmOL55fHXG3vyQQdU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.23.90) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.23.90 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.23.90; helo=PH0PR07CU006.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=C7t64gH9Jd/+4jjkvSOiEECI1ySki1OHofI+WEbYjvniCU39IA68f5MxmhGuhGcyTFpncB6pmk3hpIHIy0B0T5FMcsaRT2FoXfPP81G8NW3jwxhAuF9CY0+1I7J9BZ/fSQ9rtP4nnitnAgKXPgn6UwaGxsoIT9bLLCgL+lgiYeg+pCyWp1G9zKyVW45asgC7GaH8X1sDhmw+zUQCvdABNvHIFuUgL5CeYloIgf+n0wLgRU4BwppZ0+pNIknQj1eRDPoIyFQmH5DOy1uslKS+pRCFP4cqtWWfjYaNyt/06QzMBbjZkeO2cMD9c2ZAutFf0W0b2ETtj9lagMP/7KHZ3Q== 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=mIka6cApKr4tHLkM0UcaDmcfawXuEpYHKEShj03nxYM=; b=UKtKUAmx4rDpjVDyP+qs3vRU475wexWmUuHoM/MrDnncd7IxYCA/zJ8+4G4lBifq2Liqmp2rEqEF8ABJcPMdb9zTpCkna9vqxQs3gZTlLQ6wge/c6hDhFp0Nc9zNqfRnevwo07lluz4cxrCBHdsnI9LcvyPfPZYghdHMArMCmd69gXuHQ1MNJg5SxIhaqZI7UHaH6TfIO0SUxspIfgiuEEhA1c3hnqg5J2rCsvDWVp77KRYf0pyKQZclbLORV8vrSeRowE9dIVC63B4LS4wizGs6+v9P09m4z0dbde8hDCwgaEXs8Qe92vYYrvSyEoXfCDyUeoIcF/aSkYFXMXr6ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mIka6cApKr4tHLkM0UcaDmcfawXuEpYHKEShj03nxYM=; b=Z3nlMuPaivMpvv48PfnX9EoFwoPkDdyehzzUW2ayaVOPE2wNd93fhHdTx/F+bl5Fn74e05WLRCctu5OvJ5TTFt3VBNUZhQxbxZ/DCJVLCm7qaN/g9FmWGy0jBCAK74ZDHZ8ZA4WZhs92+h1tEDD7BIWHhmqmOL55fHXG3vyQQdU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie Subject: [RFC PATCH v6 12/43] x86/p2m: Move p2m_{init,free}_one declarations to arch header Date: Mon, 20 Apr 2026 17:31:35 -0400 Message-ID: <20260420213206.208750-13-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|CH1PR08MB10761:EE_|BN3PEPF0000B06D:EE_|DM3PR08MB8962:EE_ X-MS-Office365-Filtering-Correlation-Id: 71d5a7c2-8541-4dbb-de2e-08de9f2464e6 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?IQS5Fi1MTdn/z/oySGaFaILPKIpRmzgqU/9wQBAMh1hhNyqKGRwKPDKosSGg?= =?us-ascii?Q?ouGa7Wi1+j8iHsbIWsEs8jTNTKxHiNnMbTAlyofPAEcFEvfORw4tFOIIJ2eb?= =?us-ascii?Q?oILxirH2M/SkPloC64x0bSy/w+NldKzNTxB/uED2YHhFMxIPtO3oM+/qIgTw?= =?us-ascii?Q?0kJmXCYHbTMKCe/Lsor2iKHDmOL2oI45sOnJ9gksfTPlloMhS1nxJUMIOCy6?= =?us-ascii?Q?oWk9PPBMsMt8iK1A6QaINdr1xFyKTbAFPz6I2wa0iQIEJnPWgVrpD9uhyr17?= =?us-ascii?Q?eAuuSUJyoFZtX7Ka9fraEZPcwl77eOTj40wpxDr5/1IJ0sZySut9JTAz+2o6?= =?us-ascii?Q?q4L84JVPC8toKSvWZVZHlMZ+F759YMUCIWX/XZP4fR3v1kQpSMCk56G1Wp8Q?= =?us-ascii?Q?WJTOWq9lygqi3tGPvN2ZvD9x/hJAuW1FS1dc9RA3rhbmfSqCIj0xKbPJGBpy?= =?us-ascii?Q?XAJsIeIpm8DaSv5wGuM1Tk9AWcX7xVNT1EfFCWrV9n+Cpt/eXvZGLIFNIvk+?= =?us-ascii?Q?tw+VTJFd1kkeznIfa8cP3iAgsJvrbPdivB8WsV4el1cqQ/ZeX3cAs/ktwa8S?= =?us-ascii?Q?V9Xfoew78DgsmCGwQNfNgS3nAx1iZqhi8qn7x4LUxJy8++hhfi+volXYQZu6?= =?us-ascii?Q?4o890y9HQkXPbtkLBa5VZaGz0e6vdKg7oE1OOKsLQvkH48YWe/5jbtLvhR5E?= =?us-ascii?Q?LEnKG6tqduT7a8BJmMEcjb36ObkE5QA74PK41eez35Jzo/LjOJ796WxUnp92?= =?us-ascii?Q?3jIexpcSlveR4EGkkUgfFE2yPX2NV+Ph3camzWcqC6TVrr34xEz7wbFhE4CM?= =?us-ascii?Q?wsY6PmYqEC2Ev+OFZN6T6DVo4nyycqjyni1YtBZ6mKIOZmnkZJJ/2DAZQqFZ?= =?us-ascii?Q?+LQTSey+IEvH7ZW2dhKNhmvrMIAbPwAwuKmD4ACODSi91YBdRerFgUN9KIjc?= =?us-ascii?Q?RYUxXH3hJpbn2d/R/K0G8KFn/F+JNpIKXhi3nnD+gqzVuwd03PXR5NvtTqhS?= =?us-ascii?Q?FNRPDkBHP6B3lYRlB9DpNj6qlqoLIfNpC0NqZ75cNhXOza4J71+HH08xMIQt?= =?us-ascii?Q?SD22J3wezl1knMyqBptVKtglHI6CVSwtR8/p8xy5ylbgbmG9AMun6CX2i/eo?= =?us-ascii?Q?GUWZoX6jvd9kYMkwWpkkbG2sh7EoghRnoVgUA+7Yyc0dDhP9Q7v7J/rJ1bav?= =?us-ascii?Q?zd0gYY4QRDnk6jewkbz0ySLgtatm4zqQRNrxmgm5JgxxVm+LK3oHuTNdAEvG?= =?us-ascii?Q?WmvbDDEZt2UI3kLjOXC2Rl2n4AzxJIsQafkqDfDyfg=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: iBvILAL9+7/o4Yv1WHDe7PIT5ubTgqC5WzBDYKGc4y5+KSrz5TRBZsY0RcXEQyFGztbVUuwnaLqKAcc3bWegtjhlU4vb3drY1E3AcE3sq6ozhrCbuW+LzOP6lGCBqYXZJptATh9BaH+VX018Gw6AtIpKjfPwvHZ7FBxTvGB8WtJQTrhCK0sqMsDeG3rX36HtLpk57+rYJdG/PnZKPN9zQeUnheufMze8QIrjRkvTOp5UswNRJWbUu1d2nl29viRw4eXdSjgTgXyboCqAsCmF2QvZkEmOA7b03HFUaF7fqiFIt2qBRu7NHO+XLWHO4RG/lry2A7k1eK0TNWylj5+Hqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH1PR08MB10761 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.23.90];domain=PH0PR07CU006.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.23.90];domain=PH0PR07CU006.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN3PEPF0000B06D.namprd21.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 843c7467-a17d-4f0f-baa3-08de9f245e21 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|376014|14060799003|35042699022|82310400026|156008|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3j6vsaEEM7yfLeXDTKOOwW9O48YLL4Jgpz4EOJwjAT+hlGgemcivSzZdvOpx?= =?us-ascii?Q?XakTtbUNQ4VM00kbHalz34RbwPahnU8kP+lrRsr5AytBD6orTj78BxEvPhnH?= =?us-ascii?Q?XWvZb00IsxiUNv4g0gXgS3lqxf8BwaAf3a2mGABt0MUAS3ELyA90aQYLjQO+?= =?us-ascii?Q?S7t4tKS05AVP5t4cYvZbCImON6PhvoSBWKuvezbmkznHIJ/r5Db1T1de9XMk?= =?us-ascii?Q?vkCSn7oaSYQgF4tHwqYyPYQ+903D6QvMvwqngBN1pGOyLLJigGgl+eukeM8z?= =?us-ascii?Q?IPsCO0Wbn2XqmcHfueY1Q0yT3kIOtQ7srnc5dNZqLGVnCyRdg/FciTdgGKCw?= =?us-ascii?Q?cjXFlquvfKKft2UHvvvzLLc6z5Nv2W+6w3MjElcQ49iQYjGLwEmemtSUd0mo?= =?us-ascii?Q?3ojQ7oNRMadU+JHr/EW2L0f8y1lEhepe7jsrdoy2DKxJtI+e11eh2NWuaPF+?= =?us-ascii?Q?BnwE+Tc/+XI1OQ1fgYYapxs/hqal3DnT9qAmmHxuzkVLh5AecCLHbRwOdzLM?= =?us-ascii?Q?mZTuajhWw8thqW0MMEN/ZVDj6IzKATmI2geFXI1FzdsD5/P799c/t/8jZxnx?= =?us-ascii?Q?jOni2hK2o851HPJHaggjOd1I6tC6ie4HxmrPYnkFne75iECUkJkL6aaS41Qz?= =?us-ascii?Q?BlxqN06OUm0v+ti7ZLs0uMBjKn2FprHOmg8DPELIelJJ+VfCM5s7isIocTE3?= =?us-ascii?Q?9nFDGPs0LSU9RXtDfZYOwz4jRMhuMpR4w8F45rsD5muPU0pkCmMa7cd2U363?= =?us-ascii?Q?kBMTewwoDmxknN/mR14Hw0htAflg+hxz4eyiL0wKExDWuX+CMFJz1+pDvBiW?= =?us-ascii?Q?A+Fca677E45zT5ICyxYsnhMxLl6J2M3QyszzZlMebBdQVR8wKoJ8TDcJEzil?= =?us-ascii?Q?4+qJcXSOS0uGPYbPy1rtr3vyUIyFZijjHJvJAOO7VkwlGlqULrRIgLvyQ6o1?= =?us-ascii?Q?crUwWwqc9U3qfD550KJ76tkgWI2a6k2UziJ6/7Ik4ercrBp4AHIimZ6/tvX7?= =?us-ascii?Q?WbNikhqvWNTxwYRZS7+67wOcPqUYKihuyUunpE83MTtC6CXlFKy0eHT8V2uM?= =?us-ascii?Q?W737D4F/SO72Wn6ymxF5w2cKTYma3Sly6sgYlOgHbnM1RNWptouSLx8HrTZ3?= =?us-ascii?Q?R5n5MoqDCA74MgxpgtMV5Nnf/GnEZ1cFXmT+yOCgw/0pgOXXP0no8epKUV0F?= =?us-ascii?Q?LEEt+gshChCIoS2XDsAs4wWEHeAFSb9dkPdmhCEW5WM2Z063ZszcPr65hHBU?= =?us-ascii?Q?qcncJULIagq9hodQTRF8+unGWD8rKL4kO/XpTAlorA=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR07CU006.outbound.protection.outlook.com;PTR:mail-ph0pr07cu00602.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(376014)(14060799003)(35042699022)(82310400026)(156008)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iMkE3LSFCbo/XSN75Gcru/UnJn1LGYXbTZIr9SaoSTnuwsO23mDJLqKc62KnMcZEO0Rej+XZHpXZX9chHLweo2+7bB5gt5DOAYk7j+oTRgrAA1oUupZncb/yctR8S91o4oB5J18Q+PP9Gk64WXaKw8az/rA63+2iiWAMcoT38G/6BLOSBMkCjd2DAcRW0Ma0+kzpAzDGfkeKpPkDA7nABcnWW7r5/9Vfyzp5LzBfVVqCDgkkR3f4QBJC7hmxWKA/VTjt+gfgfFZwBdOlrtepObHAKPNHPBwabvJupWFexVlQGcMHNuo4TSkSkwyn17yekbiRrXC6pL0TmxGiAAj83qAaazXSKHRSt48OM7GJHzu4/SdnREKQ82ur6uWAmkO69ca6IcGfYrWiBWluEvKy+9gQTPWC8ZCgpuJ9vrsbonN8EtETDsIMRfy3b1mQz8we X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:32:58.9668 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 71d5a7c2-8541-4dbb-de2e-08de9f2464e6 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN3PEPF0000B06D.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR08MB8962 X-purgate-ID: tlsNG-c1860d/1776720786-C0B64DB1-F13593C3/0/0 X-purgate-type: clean X-purgate-size: 1613 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720808612154100 Content-Type: text/plain; charset="utf-8" This commit moves the p2m_init_one and p2m_free_one declarations from the x86-only p2m.h header file to the asm/p2m.h header. This makes it possible to use these functions in the common altp2m init/teardown routines. This is commit 1/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/include/asm/p2m.h | 3 +++ xen/arch/x86/mm/p2m.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/p2m.h b/xen/arch/x86/include/asm/p2m.h index 5110b3e77807..ce8eeb751ee9 100644 --- a/xen/arch/x86/include/asm/p2m.h +++ b/xen/arch/x86/include/asm/p2m.h @@ -592,6 +592,9 @@ int p2m_alloc_table(struct p2m_domain *p2m); void p2m_teardown(struct p2m_domain *p2m, bool remove_root, bool *preempte= d); void p2m_final_teardown(struct domain *d); =20 +struct p2m_domain *p2m_init_one(struct domain *d); +void p2m_free_one(struct p2m_domain *p2m); + /* Add/remove a page to/from a domain's p2m table. */ int p2m_add_page(struct domain *d, gfn_t gfn, mfn_t mfn, unsigned int page_order, p2m_type_t t); diff --git a/xen/arch/x86/mm/p2m.h b/xen/arch/x86/mm/p2m.h index 64218878067e..be8ed85c2aba 100644 --- a/xen/arch/x86/mm/p2m.h +++ b/xen/arch/x86/mm/p2m.h @@ -6,9 +6,6 @@ #ifndef __ARCH_MM_P2M_H__ #define __ARCH_MM_P2M_H__ =20 -struct p2m_domain *p2m_init_one(struct domain *d); -void p2m_free_one(struct p2m_domain *p2m); - void p2m_pod_init(struct p2m_domain *p2m); =20 #ifdef CONFIG_HVM --=20 2.34.1 From nobody Tue May 5 08:59:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720815; cv=pass; d=zohomail.com; s=zohoarc; b=JDezxuKLc1EKdQxPvZQxd+Quw2ZluHJbGyDjJG0ynVuoZdNXFNcP5m3VbuwP1okhPb6ZQjqb/VTt38qJHsbJ0wcOOnXsH1v6tBFN6xAvFVDlA8vIIz0pgqhjHAsM5diqyz06DgUFY6Kk1Vb3Uw4pkokzTHqOlEhvu2xkiuhdh/g= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720815; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ct7OYHDuserQjrdnXDT2Q3J5e72VZGG2o8HBBgpiIsc=; b=SDVAXMSW2hij1egNhZxPZNN1kKkAaq37vXpqhRwid4od1aNjNXnKyEqGfLwEK3JOjLS3BS9rz9t+pTUVip4eFj/ukwV1xY1jYPqK+trEjvKqKbyceHU7D5tG1+HnVu7chCRkGqW1JF7jvbMG5J3yZ7tI3zLmDaAuvOZzGUyZaGw= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720815651570.2130584845027; Mon, 20 Apr 2026 14:33:35 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287787.1568206 (Exim 4.92) (envelope-from ) id 1wEwEz-0001kQ-4H; Mon, 20 Apr 2026 21:33:13 +0000 Received: by outflank-mailman (output) from mailman id 1287787.1568206; Mon, 20 Apr 2026 21:33:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEy-0001iv-P4; Mon, 20 Apr 2026 21:33:12 +0000 Received: by outflank-mailman (input) for mailman id 1287787; Mon, 20 Apr 2026 21:33:11 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEx-0001ae-7x for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:11 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEw-00CD6F-L0 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:10 +0200 Received: from [10.42.69.1] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b96-2eae-0a2a0a5409dd-0a2a4501cbc2-0 for ; Mon, 20 Apr 2026 23:33:10 +0200 Received: from [40.93.201.139] (helo=CY3PR05CU001.outbound.protection.outlook.com) by tlsNG-d62444.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b94-c1f2-0a2a45010019-285dc98b06b9-4 for ; Mon, 20 Apr 2026 23:33:10 +0200 Received: from SJ0PR05CA0155.namprd05.prod.outlook.com (2603:10b6:a03:339::10) by DM3PR08MB9588.namprd08.prod.outlook.com (2603:10b6:0:41::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:01 +0000 Received: from SJ1PEPF00001CE0.namprd05.prod.outlook.com (2603:10b6:a03:339:cafe::2f) by SJ0PR05CA0155.outlook.office365.com (2603:10b6:a03:339::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:01 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SJ1PEPF00001CE0.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:01 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHJ6jZPz1wdM; Mon, 20 Apr 2026 14:33:00 -0700 (PDT) Received: from CH4PR07CU001.outbound.protection.outlook.com (mail-ch4pr07cu00107.outbound.protection.outlook.com [40.93.20.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:00 -0700 (PDT) Received: from BY1P220CA0039.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::7) by DM4PR08MB8193.namprd08.prod.outlook.com (2603:10b6:8:44::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:32:53 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::cd) by BY1P220CA0039.outlook.office365.com (2603:10b6:a03:59e::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:52 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:52 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:46 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=PpRXqFT0PWiDZdzF3n3tJGSHvgM2sNeKXJqnHbiwmiI97RZEZ5utXB+24AyFyp9O6gzDIsqMbBknYUHG48GwgJbH1RLNSdHcBoYPqBSzIZFx/NkuY+muT/611mJZsmalfvuMdWolo4rOYrTm1WXI13Snp2JglEY1QqY/nmFdJZHI/Nb86k10+Jg2EXicS7q42EQw8G94SlO1dWYtNc9ezrzgnTkm8Zh0O5Qoour/aVsneY1KsK1auSDkBB98uOoA0Te8VyNHJbQda3ON4IjiDn/stxCw5/LUDDy3etn6LRuQ6QtMSCVvxE/6fhPy8KbQjRLIjtoGS+CjnIpuC2wiqg== ARC-Message-Signature: i=2; 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=Ct7OYHDuserQjrdnXDT2Q3J5e72VZGG2o8HBBgpiIsc=; b=DjDwBAX6qYyb7ZFI5SOBuj9C/6tm43CgzniR+lUZJxJQ0omMzdLnWCeFuyeIQuBe7NqJpCfOZ5dIepfpwOOYkyr+e92lROgqhz1BnuGZKesZ9HYjtPbXjNRhguh4Idf3flBv70rDCig3F9tNNlcHeyCb533Yec3ZP3exRKKBa+HM9SxremGzTRLa8gusBV2FHRaCwkNtvFs9qYzRqm978CGCd/W8a98u/NIAhDKrI8n88eR8awFgtgawq9VTBIBsmVI/iRwRM8FP9Kum0lewlic8u3Yi3nvyzy8cNv36/zmNkK6h5dZAuMtwidLakTMqO2fLEAQ4lmTH0EaB3IV4MA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.20.103) smtp.rcpttodomain=citrix.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ct7OYHDuserQjrdnXDT2Q3J5e72VZGG2o8HBBgpiIsc=; b=yup9cAILf0EpH+wtp1z5sA7aIKNNcykenfh2egbPAUzo60O53UcUxcxfZJ+JOm60VD7YxEZC9FSvKCYIcdBX7jOeQU33EtenmVB7t99gaxIwq0HGAf+r/pVqZlcBXxYlZ6EqS/9jmaUG0yyxernG8Uyg17ZJfp/CNAF0x/hI37U= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.20.103) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.20.103 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.20.103; helo=CH4PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ao0kGYvOXIJejNDVU1prdCUB3I5/aItO563BqCOQ/8SiypJoEMDCvqLvpGMkEF5vXZsdxLcgzESlnOj7uuyt0WBL/9UWjsukJr7wGrhSBqRisO35V2flMm+0Rg4Is7luF5grYutjTlIXzxcenNsHEUJASIf/EsvqrlhIpW3uXVMo/Ik05v9z8MBwegzZ8hnNbBT+411MRojkL5O0fWyiuCw+okZ4POzkcHO73PhX5oSPHss8fUIvkG+HgJCb9HqjsepgHGEBDM83OOge4sQGU3jyHJe+9kPK8/S8I4xDUsmNFxLVSHwVPipVihG3yRHGTgQCmZ2LvSDPyKOQi0+/Yg== 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=Ct7OYHDuserQjrdnXDT2Q3J5e72VZGG2o8HBBgpiIsc=; b=ZCrnSsdcOxFcJrJ8FEwtHtjjvRUagKLCj4aYqESIolT7oktvveoYIAzP/CGzCZIwyjrTcnXqlCdAlqqoQ2ojqcp6F6xZPC+1O2qwbGrf5pA+/K7ohdwbKMWv0zeMVrYVtCkfL5Sag7sqsZq8NaWz5vHpwGg8d3HjKkuhvdSjNP2kRTJkyUC2dCjo/bdOa/LAzTv/niTqjThZF7XkVRUBXlwpWypZ58MWsKr20vGZVyIWVvRmKOO2lf48cEKTWLWlyJaes4dT3CxMf2a44abGKhQJwuaC4BRISYpa4We7tM5wz31OcIzetRHkuNEc9ssAJOYjVkbQWhjzAxEhtFrfkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ct7OYHDuserQjrdnXDT2Q3J5e72VZGG2o8HBBgpiIsc=; b=yup9cAILf0EpH+wtp1z5sA7aIKNNcykenfh2egbPAUzo60O53UcUxcxfZJ+JOm60VD7YxEZC9FSvKCYIcdBX7jOeQU33EtenmVB7t99gaxIwq0HGAf+r/pVqZlcBXxYlZ6EqS/9jmaUG0yyxernG8Uyg17ZJfp/CNAF0x/hI37U= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie Subject: [RFC PATCH v6 13/43] x86/altp2m: Add lock functions accessible from common code Date: Mon, 20 Apr 2026 17:31:36 -0400 Message-ID: <20260420213206.208750-14-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|DM4PR08MB8193:EE_|SJ1PEPF00001CE0:EE_|DM3PR08MB9588:EE_ X-MS-Office365-Filtering-Correlation-Id: ab5465d7-e51c-437d-14c8-08de9f246640 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704162011799003|36860700016|1800799024|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?CbHWsaeuMjFyn7TYzylfMC0nfq4sYifiC44WqsOF1tTkic+bICpe6P9toXMr?= =?us-ascii?Q?UFxSjmk0zo02wozZl7J4wmoutxcdUYpfNe2bNhdTjg6eZmurSNRIbJCG4rC4?= =?us-ascii?Q?Wb78J3xrVU5l8cTP4IbBV5AiCsgEozVq/B4pVJalTvRGlJsJFdTQVqffPO5V?= =?us-ascii?Q?GSA7eofEUtOXsyZ5xF5Fh+o9CNzXvpRV2l9C5lBqbP4xeTu+W4krCVyHw1IU?= =?us-ascii?Q?beH6QitvaQpVZ0Tal/qQQud7aj+lISiIp8tT6JNJA6mrjcnaP5DDfS5S0wmH?= =?us-ascii?Q?o4TQzf/g7QtTUE/LxbvRJuc9rVXia/owBEe+xRyCve0vkSCap6rZrCJHGPA5?= =?us-ascii?Q?N5LRvr7KXujlcIRQvpM9sKrX0+VAyFqA8/0jqFFJV+DV1lMv81bU4xrurDvW?= =?us-ascii?Q?VNmhrmCRHJPMeA7Qen3QS1thl715OzLnFjGHO+8ifmNTXoLmmdwsKLQm0vL2?= =?us-ascii?Q?jJqRb8HlZLyiIi5ykJHCZaLXGzHrsc1cT73jyW9NAnWUdiJbxWkw2URnu4rQ?= =?us-ascii?Q?FCYAkXFh5u6FGQebXlGs4/Wt3/9y7FTC6iGPg5aCZ2/5lf0Vuqs1XPTNXVEg?= =?us-ascii?Q?veeS4klYDpFgl8vcz9jU/iKOizuu1Wd6qRO3Q9d+nehQ7jSjAZC2rnqWXYJu?= =?us-ascii?Q?UO3R+St5mz+vXYfOW1KexaeKyPJBmInOHbZZSgg2V120yrXyPrTj/6vN71Hp?= =?us-ascii?Q?jC4fHNYYlnrESkBbqtIEW0SJpC1vAmF7eGEhPcdpsyo7YT6wNH+sb/J5LWnb?= =?us-ascii?Q?1p7XaApZbvMoOAu8b4crydkKwaig+qFy07tOt2eJKP9krZIfF7F12h2C/CQw?= =?us-ascii?Q?ZEn/QifzJT+K+h1UjFD2QBYrelqkqMWeRtltr+8qZYRljBzqbGVsCvjOxrC+?= =?us-ascii?Q?cZthntl5As8v5MLEq/UolHvMD1KLS2IGYvW3STig8iqyvT84KrAdgfMFmCwA?= =?us-ascii?Q?qHH1zfJDeIw4ZfsUJSrY7JxXUYrQH9xsWRs4P6CNixtnLUwCM4sX9YALJ2X5?= =?us-ascii?Q?z7wBtXeMashJA7nX6NgdHgfS8uSOY113gWXMM7UZ2Dp+R6LXI3kwLehBsVgW?= =?us-ascii?Q?wPXExJNaQoM+vB22+B0ejrgNxAy+Wq+MdPsbJsqI1JdLgkGtbJXCtogxyLwG?= =?us-ascii?Q?uCax9+HfAgsJGzoCTEXCBIKEHAs0QuJo+w=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704162011799003)(36860700016)(1800799024)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: ehTvV/AKzwi6ZAZvy4LHynaagPHX4EXFbb8XA8NHSd0OOk2gEl++reI/41RUC6LT+8RN1z6T6GDyZpWSVsx3Y4M3Ur1HuFUA8y/UWqvTBaAra8mYgb8+N3uDjVXJnl09cABW756WUPzjeMBpDavil5Uz9qLXtB0qXLXPMy77bCM8coFAsjAzimmtUT63NzSzwT7ARxdqM+KhtqsrxLruzrmZIk/oVExfyMZaV+NB40jroVZOKyfYoF2qqFmFtUe2Duv93hty+50Uqaa1uuqPKSqhqVHO4Ufjgj67Qj7tPT0KmJpRvrPsasLYWjpV2WZP9Er263UiTvLsI3LgGGWBeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR08MB8193 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.20.103];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.20.103];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SJ1PEPF00001CE0.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a087eb88-432b-494a-ea89-08de9f246114 X-Microsoft-Antispam: BCL:0;ARA:13230040|704162011799003|36860700016|14060799003|82310400026|376014|35042699022|156008|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Y7L5L1uEN7da83eylS4hP+hz2iyE9JQUD5zm5OJnz2DfMJUoDQYCu4gl8eAW?= =?us-ascii?Q?/MS9MIZplo1dt7Hxj0TWc0rfQL0FT2gaVqB6BDMcsnuOUN7/RmzFVcDXfUOS?= =?us-ascii?Q?ziDBrclDQgjakHMltSaSGC0zJqp9Pj2uaWG16Lu4VnDW8Bk8GC5XsAj1yvB5?= =?us-ascii?Q?b7ziVRNoj0VGpIDIb7B/BTq3Rs0N8znc2kfSp/zU/ybr11vKAyM7Ee2v6LOl?= =?us-ascii?Q?ivj96V/Ik5e03PVklYVOE+yW9f6XVs+bXY0U7H9fU/8VMc5RTc36jK1L1Rj5?= =?us-ascii?Q?nssKPFDltw01g5SiQmx3Qrnl8T9afwqAsYZNc/KUIXRj86gvtb/lxDcRSwZw?= =?us-ascii?Q?sHbXunOnCHXagfaJkn6xTOu3KoJavP7HnpP5/m4IqgRcJ8+Qfp//iAaCmCqk?= =?us-ascii?Q?E+zAWlu22s3JAVArJIxlKtcZ0ztjyerOJj9kBoHAGyXnFl4RPhrdHQ+3cvJE?= =?us-ascii?Q?VP0XZU96k3tuwtAM1PWdhiTmvl2ovWmyiqyhjaPmbtxZ/egwQE2QuB3atuRW?= =?us-ascii?Q?0r7VwhyLrc8LptcgJS30PyXH/uCVFTwQp11lmRBRrhAYpKEIAR2NGNUtd1hg?= =?us-ascii?Q?QN21LNH5aLgjYkzZXaSas+/0zSwtHNKWBgZicd5fLAWoKTfuKBnhJo0GpwiB?= =?us-ascii?Q?b8W0yv/cq1joMyWp92VIvv6z9UhJLkbyF8MQk9uT4WJhicydCo+meNlFtzgO?= =?us-ascii?Q?ZkULfOGljRM4khKzmChreFIAMmVCLvqerNxHQdErVAjOebl0edWDwbdinv7H?= =?us-ascii?Q?ROzOFbfJRBVq4+CFRod2pUuCm4Q1DtTnRc6X/6Zz5vO84XZZ3RCQtT5pCiVt?= =?us-ascii?Q?d7KEePGCCkLiy2cdMQvzttAi8cmRTv3n1jHhAjI8yYIMVnQ9QOjiLB4bC5Vy?= =?us-ascii?Q?xCBVW3YajX7RBHs0C7NrSu+iZqeTWl9bppNZFIuJUEYyZH+XXQGtZcHUW0QI?= =?us-ascii?Q?W6KZ/4UTOQ/auIC6Y235z2VvjcqU0nhuSrbUC+jQW//x1/xBW04PBD/Qw8iY?= =?us-ascii?Q?ynOSq584ihc73gDsDWTS/EqFNRVT4Co94e50RAYh8hvzeBznJbdM37lPo+5G?= =?us-ascii?Q?rwF79bjCp8A3O7ccGGSr/OIYW6N2fQsf+zZMuMkvoJ4aUqqak5GWrV0wVzG+?= =?us-ascii?Q?gMJFItdccfYD55OaU+zcsiXSj9CGrPUNog=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH4PR07CU001.outbound.protection.outlook.com;PTR:mail-ch4pr07cu00107.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704162011799003)(36860700016)(14060799003)(82310400026)(376014)(35042699022)(156008)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Jx5Ffm19SI+vyxU1BNRtqCnpOeoKQcy9sD9oLma7K7LBYo+TzAO/Sk65rryYAkHfUJjpmpDI6VzkFjGk8HDsla9WdLtBXC15qKhtz3tMZ5KZub1JyuKKQSh++JWpReLR+4nsk8qG8I/UtDg/b+T7g0OhzCnV1bEe0fKNwDi76JUNUQYcjHMG2zFsweetYZ3R35CEwDEVdC6F9reJxRANGySq3RvLXvqyiWEkWTxGewTjV+TNU12qOrSjov5waWNZe/KJgewBPlzrkVuUgyhKzdYRKulWr0GibmQfoV9D/H6QpcAUz0t4S1y2RG2Wo3cFeTmzt1iPM/3lJZb9GD2Ppkd5ZfXXSjqJwBmjhBwvLVGqKeHn0myWy7R12GI7Wf098MPJ1oX2ZzQlkinkZG+bHQTJHDCiknf1uR6An2rlBDC8OXdxhHXZSkMLZJerU3q4 X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:01.3929 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ab5465d7-e51c-437d-14c8-08de9f246640 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SJ1PEPF00001CE0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR08MB9588 X-purgate-ID: tlsNG-d62444/1776720790-BEC7CFF4-766920CD/0/0 X-purgate-type: clean X-purgate-size: 6429 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720817359158500 Content-Type: text/plain; charset="utf-8" This commit adds three altp2m_lock functions which wrap the corresponding altp2m_list_lock functions present in "mm-locks.h". The "mm-locks.h" file is only accessible in x86 code. In order to make altp2m common across architectures, it must be possible to acquire the altp2m lock without including an x86-specific header file. These functions cannot be static inline like their "mm-locks.h" counterparts, since "mm-locks.h" is only included in source files, not header files. Therefore, these functions might introduce a slight function call overhead over their "mm-locks.h" counterparts. However, the altp2m lock is mostly used in init/teardown routines and HVMOP implementations. For these cases, the altp2m_list_lock functions have been switched out for the altp2m_lock functions so they can be later migrated to common code. The only other function using the altp2m lock is altp2m_get_or_propagate, which is in the hot path of the page fault handler, so the altp2m_list_lock calls have not been replaced for that function. This is commit 2/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. This seems like the solution which makes the most sense here, but it would be nicer if it could be static inline. I'm also not sure if the "mm-locks.h" functions are really supposed to be exposed outside of their translation unit like this, so feedback on this is appreciated. --- xen/arch/x86/include/asm/altp2m.h | 4 +++ xen/arch/x86/mm/altp2m.c | 42 ++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index 9c58a396448d..7cff40beb7c6 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -156,6 +156,10 @@ int p2m_set_suppress_ve_multi(struct domain *d, int p2m_get_suppress_ve(struct domain *d, gfn_t gfn, bool *suppress_ve, unsigned int altp2m_idx); =20 +void altp2m_lock_init(struct domain *d); +void altp2m_lock(struct domain *d); +void altp2m_unlock(struct domain *d); + #else =20 static inline bool altp2m_is_eptp_valid(const struct domain *d, diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index 2dc84b76b8c1..371bf3f0b8d4 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -129,7 +129,7 @@ int altp2m_init(struct domain *d) struct p2m_domain *p2m; struct p2m_domain *hostp2m =3D p2m_get_hostp2m(d); =20 - mm_lock_init(&d->arch.altp2m_list_lock); + altp2m_lock_init(d); d->altp2m_p2m =3D xvzalloc_array(struct p2m_domain *, d->nr_altp2m); =20 if ( !d->altp2m_p2m ) @@ -221,7 +221,7 @@ bool altp2m_switch_vcpu_by_id(struct vcpu *v, unsigned = int idx) if ( idx >=3D d->nr_altp2m ) return rc; =20 - altp2m_list_lock(d); + altp2m_lock(d); =20 if ( d->arch.altp2m_eptp[idx] !=3D mfn_x(INVALID_MFN) ) { @@ -230,7 +230,7 @@ bool altp2m_switch_vcpu_by_id(struct vcpu *v, unsigned = int idx) rc =3D 1; } =20 - altp2m_list_unlock(d); + altp2m_unlock(d); return rc; } =20 @@ -348,7 +348,7 @@ void altp2m_flush(struct domain *d) { unsigned int i; =20 - altp2m_list_lock(d); + altp2m_lock(d); =20 for ( i =3D 0; i < d->nr_altp2m; i++ ) { @@ -357,7 +357,7 @@ void altp2m_flush(struct domain *d) d->arch.altp2m_visible_eptp[i] =3D mfn_x(INVALID_MFN); } =20 - altp2m_list_unlock(d); + altp2m_unlock(d); } =20 static int altp2m_activate_altp2m(struct domain *d, unsigned int idx, @@ -409,13 +409,13 @@ int altp2m_init_by_id(struct domain *d, unsigned int = idx) if ( idx >=3D d->nr_altp2m ) return rc; =20 - altp2m_list_lock(d); + altp2m_lock(d); =20 if ( d->arch.altp2m_eptp[array_index_nospec(idx, MAX_EPTP)] =3D=3D mfn_x(INVALID_MFN) ) rc =3D altp2m_activate_altp2m(d, idx, hostp2m->default_access); =20 - altp2m_list_unlock(d); + altp2m_unlock(d); return rc; } =20 @@ -431,7 +431,7 @@ int altp2m_init_next_available(struct domain *d, uint16= _t *idx, !xenmem_access_to_p2m_access(hostp2m, hvmmem_default_access, &a) ) return rc; =20 - altp2m_list_lock(d); + altp2m_lock(d); =20 for ( i =3D 0; i < d->nr_altp2m; i++ ) { @@ -446,7 +446,7 @@ int altp2m_init_next_available(struct domain *d, uint16= _t *idx, break; } =20 - altp2m_list_unlock(d); + altp2m_unlock(d); return rc; } =20 @@ -463,7 +463,7 @@ int altp2m_destroy_by_id(struct domain *d, unsigned int= idx) return rc; =20 rc =3D -EBUSY; - altp2m_list_lock(d); + altp2m_lock(d); =20 if ( d->arch.altp2m_eptp[array_index_nospec(idx, MAX_EPTP)] !=3D mfn_x(INVALID_MFN) ) @@ -481,7 +481,7 @@ int altp2m_destroy_by_id(struct domain *d, unsigned int= idx) } } =20 - altp2m_list_unlock(d); + altp2m_unlock(d); =20 domain_unpause_except_self(d); =20 @@ -501,7 +501,7 @@ int altp2m_switch_domain_altp2m_by_id(struct domain *d,= unsigned int idx) return rc; =20 rc =3D -EINVAL; - altp2m_list_lock(d); + altp2m_lock(d); =20 if ( d->arch.altp2m_visible_eptp[idx] !=3D mfn_x(INVALID_MFN) ) { @@ -512,7 +512,7 @@ int altp2m_switch_domain_altp2m_by_id(struct domain *d,= unsigned int idx) rc =3D 0; } =20 - altp2m_list_unlock(d); + altp2m_unlock(d); =20 domain_unpause_except_self(d); =20 @@ -773,7 +773,7 @@ int altp2m_set_view_visibility(struct domain *d, unsign= ed int altp2m_idx, { int rc =3D 0; =20 - altp2m_list_lock(d); + altp2m_lock(d); =20 if ( !altp2m_is_eptp_valid(d, altp2m_idx) ) rc =3D -EINVAL; @@ -784,11 +784,23 @@ int altp2m_set_view_visibility(struct domain *d, unsi= gned int altp2m_idx, d->arch.altp2m_visible_eptp[array_index_nospec(altp2m_idx, MAX_EPT= P)] =3D mfn_x(INVALID_MFN); =20 - altp2m_list_unlock(d); + altp2m_unlock(d); =20 return rc; } =20 +void altp2m_lock_init(struct domain *d) { + mm_lock_init(&d->arch.altp2m_list_lock); +} + +void altp2m_lock(struct domain *d) { + altp2m_list_lock(d); +} + +void altp2m_unlock(struct domain *d) { + altp2m_list_unlock(d); +} + /* * Local variables: * mode: C --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720809; cv=pass; d=zohomail.com; s=zohoarc; b=JNVhXTfjVsQGm62LFS2ciSldFZNZfT9+zQiOb/NdY93JUUxKTPvFy96SVeXTgNtRH56I92dd8YisJ/U/NLp86a6lGlRzVhqndvtUrNVZZKTYradIrCZU9AHSy9MY8b69Y7h7vPCwBKgnLT4N61IQ8qZ5+RLknuzH5AGbwjNwr8M= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720809; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=P99iOPiPAd4fedD5w4a0EUrWRqEzpWZn2WgFGdQXXEw=; b=ns6wgJSxzpBFvT7OGoBrPKc0gAwP4hrnsECc1CucT+Tq4B24xlirmB7FgLUIvl/jyEFsiYcoJeqx9L1+YjAGNiZa4bpqgCCPp1zR81SZFBTWMs62brbMTw+TEXjYQ/H0Eoec6+bPLld2eRVk89LJlKFzE9ldN9CcGp8qAZeCfOQ= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 177672080986980.59409298640651; Mon, 20 Apr 2026 14:33:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287791.1568212 (Exim 4.92) (envelope-from ) id 1wEwF0-000237-Er; Mon, 20 Apr 2026 21:33:14 +0000 Received: by outflank-mailman (output) from mailman id 1287791.1568212; Mon, 20 Apr 2026 21:33:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF0-00021X-93; Mon, 20 Apr 2026 21:33:14 +0000 Received: by outflank-mailman (input) for mailman id 1287791; Mon, 20 Apr 2026 21:33:13 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEz-0001lE-8i for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:13 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEy-00CCKM-LR for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:12 +0200 Received: from [10.42.69.9] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b8d-bab6-0a2a0a5309dd-0a2a4509a2f2-26 for ; Mon, 20 Apr 2026 23:33:12 +0200 Received: from [52.101.48.116] (helo=MW6PR02CU001.outbound.protection.outlook.com) by tlsNG-bad1c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b93-2497-0a2a45090019-346530748c9b-3 for ; Mon, 20 Apr 2026 23:33:12 +0200 Received: from CH2PR08CA0020.namprd08.prod.outlook.com (2603:10b6:610:5a::30) by SA1PR08MB8462.namprd08.prod.outlook.com (2603:10b6:806:333::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:02 +0000 Received: from CH2PEPF00000142.namprd02.prod.outlook.com (2603:10b6:610:5a:cafe::a) by CH2PR08CA0020.outlook.office365.com (2603:10b6:610:5a::30) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9723.25 via Frontend Transport; Mon, 20 Apr 2026 21:33:02 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CH2PEPF00000142.mail.protection.outlook.com (10.167.244.75) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:01 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHH5Clhz1wdS; Mon, 20 Apr 2026 14:32:59 -0700 (PDT) Received: from DM2PR0701CU001.outbound.protection.outlook.com (mail-dm2pr0701cu00101.outbound.protection.outlook.com [40.93.13.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:32:59 -0700 (PDT) Received: from BY1P220CA0041.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::13) by DS1PR08MB10296.namprd08.prod.outlook.com (2603:10b6:8:210::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:54 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::f5) by BY1P220CA0041.outlook.office365.com (2603:10b6:a03:59e::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:54 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:53 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:47 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=DXi8w8JtA1/UjAPCKOBHjxBPSOfMEav/Sm6pbCT6Uz3kqhMD8VwwNLG44r26W2+pVVdsRIhu/hLGDjTNG3DHDRxPKqBTY+yzQUnRgGOKaEkvHqNc5fz3wNdDX/DLtWgKlAzLS0k6L6VYW/oHsQoaRguX2PJ0pZVJz1Mq3EUFy2Po9lDswNUJPDvYhZ/niJfLI2oSWqxsWZjfOgmFY0DEPERxK3v1QWGueCug63lgH8wmvucejzPxTKjfARUd56CKfbsR5sUjRNXEX2U+6ixrFw3wVD+FpNW4zNPJqLqyJoS2DME2hGY4pjWigxxXLlh0Wpi9PqRpWGa5Gw57JjwoUg== ARC-Message-Signature: i=2; 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=P99iOPiPAd4fedD5w4a0EUrWRqEzpWZn2WgFGdQXXEw=; b=R91QUje5IKiODbKhudRV+ZX1CR/kyIQedQTnqt2grFOp80M+S083GBdH5MtpO6HSEGeIrEe+FTh+/vI1aKhWZL8NhAR5PGRzWpfLk9fCQMcmx2YH3SOc7CerWxTXEKrUvCRX2FK7pwiPJSgwzsDoIT7kXVdyoBsGpZke/FtjIZusLQMmDMb/Jtfy5enKcrLwGp7Tro3zrJihx3hePmDCSdWV7ZgcRnfIzFS4Y5Gb+owlRJoocRpY/2PrPgCgJ7obob9MA31ZVz28WjPfpFxaPYf4SSuwHhUJmLBXwmwMjolFBMW3fRfb3CRXBUguBoNDDwXVGsZAZu+K6j47DH2HCA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.13.65) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P99iOPiPAd4fedD5w4a0EUrWRqEzpWZn2WgFGdQXXEw=; b=zDvnIWYRcO60k+JI4n9+8Ky1EhdlQhkEbfnzu3TxZ1NxbWb9FFGKZFOdza4Y8CnuvDvLfG9me6vbReRWrklbKgw2EQAINKZ0GhZY547z22jVhG+7ZqRnFv3M0T5bcepCARpEdJyvG/3XkfCMRgcdRLt00O6i2omkTPUN0VL9lMA= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.13.65) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.13.65 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.13.65; helo=DM2PR0701CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DSiXJcOpfDw1FzpLTz4sHnIW4qpIUKkoZaNqLTEFrO5hKfqfQ/wF6cqPpyZcmyy3EFthPYhu0zirfliPOrw8Bt2ckEui/A0S3B/MWg58Pibi6co04jLOV/SnVYXCD811nQRkvuzPyCZmzojzP+zynNM5AeRi4zYF/ySVA+cOZOl9tp2sQLP92OL6wPOqfuROymrNRiOBZIi0ELOPAlBpeFHH5jZOW0J3cIrNhHVf5YOEFBe3ygrurAG8xIbrRDXyvuRWWvNyIgrcNca89aitXk36DqC30DelsYunYiTO4Hk6FoJ1ngxq+3jGEUvd18s3jCDUAd1gKw5L2w6VX9Uttw== 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=P99iOPiPAd4fedD5w4a0EUrWRqEzpWZn2WgFGdQXXEw=; b=WjTVpnS5dWhWWOG/f+sk1AySX0LpfpPHQ/Whfi0GxnimYbs+SoLWAzLCxoViUlJ4bDzyMF6ri3/uWBZJxZLZ8ivG/zGi/HFVz2JAsogHu/uPpSK9xftc6rvnPBukfubHHMOtVIgWfQ8bFeeSbtTHhdLUV0uI/qOTbgfYajVocIEkl2kHvL45zL1GNcO0vKrqSLLvjJDJ3iZhHvuLkfT6IQ2wKszWVcvR5KQl+yC4IA8H7PaBun89CoX6y1+X15sX/mgkVsSbx94pHIJAnejhAnUi+FOKCc4VfwI/CuRd3yWcIzBl0yMiN1FKvCRNDVcYqMv6LCHOCrZ9blMSCztPKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P99iOPiPAd4fedD5w4a0EUrWRqEzpWZn2WgFGdQXXEw=; b=zDvnIWYRcO60k+JI4n9+8Ky1EhdlQhkEbfnzu3TxZ1NxbWb9FFGKZFOdza4Y8CnuvDvLfG9me6vbReRWrklbKgw2EQAINKZ0GhZY547z22jVhG+7ZqRnFv3M0T5bcepCARpEdJyvG/3XkfCMRgcdRLt00O6i2omkTPUN0VL9lMA= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Anthony PERARD , "Michal Orzel" , Julien Grall , "Stefano Stabellini" Subject: [RFC PATCH v6 14/43] altp2m: Move altp2m_{init,teardown} to common code Date: Mon, 20 Apr 2026 17:31:37 -0400 Message-ID: <20260420213206.208750-15-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|DS1PR08MB10296:EE_|CH2PEPF00000142:EE_|SA1PR08MB8462:EE_ X-MS-Office365-Filtering-Correlation-Id: 775eae46-7aa2-4336-4a48-08de9f246637 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704160111799003|376014|36860700016|82310400026|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?ydLle/DngJVlCJWXemHLpJT7SXGPisLNWsP7w198j8k+zCHraTmHRE6Q5yGx?= =?us-ascii?Q?1nSDkWTFhXZt0SDt8qiEqXuRoCq0QXtOebHvPycvBFVAgjTuMXdBqaQ0kA4w?= =?us-ascii?Q?6fxV7QMFqyXjxBvb+VTVNZ+4oLOqKU4bboFk5kEi+fT3To1Qx4l5EI7b9lyS?= =?us-ascii?Q?oQpmQeagr54BqFvPOnBcrZR45q2m+062NNVP8WFijHai/G2HihrSbkIGJVpE?= =?us-ascii?Q?oAuXM3dNb94jC/7qNOHD5QulS6f9CWRipkmDCDAOJmoWlJUe1kGWJxgm6MW4?= =?us-ascii?Q?AJdlfx31CAmL3KxY9bw6DQpNW3E8lWj23hXTiRgFUxAWF2Pa2rwcugVyeI41?= =?us-ascii?Q?ZDjcbGWS2haSbWac47y2wHRYGQj4h7Z2E2JJli8WwlUgjb0gDZAn0INDMDzs?= =?us-ascii?Q?jYjZNE/HZ3W8DJKpoZPh/XzkIf5CB0XYp0E7SqKx6JhYGxNrruhp6h4Yqz9m?= =?us-ascii?Q?AhSlpbpuGvCR0dE8C6Uk60WfwfZHuiSlexoIgyIQgp9klXvhMM4IrnR/RHAL?= =?us-ascii?Q?jHofh0RN6eLXuMTmGHTwqb3/xQOeBxcOZTkF07gi6fQOg7Aa2H9Q4+v6w3HG?= =?us-ascii?Q?rJvDommYKn5PNawQ1So2ipHGPiIV5Wzr7nRdidvPXDTuUVX/HernJI7Wv6iH?= =?us-ascii?Q?0ZQJUl4THdwjrZEiie1ktcQAeZ0yEpyeaQy1O+4WNgZFBcjSyWaCAJexd2q7?= =?us-ascii?Q?XiNx4xmauoWi++3L0AhPfoxLqaDzDY01Y0jKUWVZjZ5Ke1PEZI1r9zIsS7zr?= =?us-ascii?Q?otOot1Um5jvff2He9wjsaTePjPY2AAqBV2OL4eojp5IJswMX9azYxPIHvqnN?= =?us-ascii?Q?KubvSTk/aD8TDCTtw728uPRLFnXSiw+dYkepTZCjuN/qGHuO4eh4t2tUF6wG?= =?us-ascii?Q?RJS429W2Qe/uB0C6C1TahhGjjeNe1u5U1QL9JTtKknwfWH6VnVyzsvCo8uV2?= =?us-ascii?Q?H4IonFoj7TCbJGsin73f/a+DAKTVZfINKcuHQIUNBYyxUqzkyxII774+Sy3C?= =?us-ascii?Q?k13tnuGvZneyy9akp86WphJXt3L7+uE+IjKepHV1OzNoD/LdyFW6KF7Qxs/H?= =?us-ascii?Q?136j2Kpw0V8CQjed6x30WVH6p3WHXLqR6nsmj/CVTJPPHrTJA9eOB7u4iTpE?= =?us-ascii?Q?+5xANuhMqSiJxuISM6lvwA/cU6CaUZdDSTl42s5CFQInOABlhEx9WfOl6bAh?= =?us-ascii?Q?n1Hw++zwXp8cotJP2YiEKoB9VjVJhiDqR1jHwQ=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704160111799003)(376014)(36860700016)(82310400026)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: DozY4J7wYvjpzEPJQq7pDR6DjiujHCf/SuJj0RgAPhj0zxTvfvYE9IIZ/9RUddLkdyQBopCJDbEyG+C0lzuu32G5Z8WfLH03GLeP9DRw1eB/TZF8o6hB17xtUsKpj/+qpoe/nMmF/+KIj6TBiIyg7f324Mdu392Cz6Fzx+O32JjAdkxA1X2uJM7i9t4ATFSZijCfyHkRivyynih88ZLwBd8FnzMeAUPz4fDt9qqJQd+b5h66Jw3EjjjqHoGW7LEZParK3VE+cgfT9mJF6bTBIL14RhN4CWLOabIgswwS9/yg6FqCHWJHK/EklGDnRg0NdZFqfdMt+BLzERxpK15YJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR08MB10296 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.13.65];domain=DM2PR0701CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.13.65];domain=DM2PR0701CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CH2PEPF00000142.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 26f8f81b-9a1a-4de0-8c1e-08de9f2461b4 X-Microsoft-Antispam: BCL:0;ARA:13230040|704160111799003|36860700016|1800799024|376014|14060799003|35042699022|82310400026|156008|22082099003|18002099003|56012099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?JiUHzSCm+1nFCBD9SeiFCo5NLpl1eXpROE/nIPM5eBtRTudbnSanEiWkbb4i?= =?us-ascii?Q?wBGFfoxyAhWilruQplxWoIRX82SIwEWp8/USWYaJsa3/Vt6RnTnjiEdhll/F?= =?us-ascii?Q?dzksZ8eaK/s7Zyo0hwAM6NLJYpJKPx3uW3+hvaBF4Dkn1Qf/giB2Z6YXnLTm?= =?us-ascii?Q?x3U/HTiD8BOoHbe9E6pFHK9j/mLMV2qgeqVYl/K9beHdNiAHhnnvFoAcQjKq?= =?us-ascii?Q?Xj3XNNohk9jYmYroTlM0X+AJZkod8AFYoGtaLyvrpgryfFrojZJTgOv0ODEn?= =?us-ascii?Q?EtBS4TrDXuLwNENtPQ8tAbFbd8yJBl58U7hD83avyB/vjS83E5p7SInuxec7?= =?us-ascii?Q?796ENudf2QaEJkafqDTGeyftEA9Da/o3GnxX5VRLarVt/y2zq8adBc+hmmNf?= =?us-ascii?Q?gI12MaTIfjtGGqwgJ5JRhG2A00ZivVM+9osSWLHt8rZhQ7BISU6Y8D2V3X6Q?= =?us-ascii?Q?AHe3qEJk5WHCtJ2n2FGwqJfk7QvD+oFW5qCzJc6bfhCCMEJhq+UvmJzdPlO3?= =?us-ascii?Q?phYg/1TXw2xv8UYDDhpt0dkMIzAzPoMlJUGIn1JvRKDPkRUzpk5+UweBplqW?= =?us-ascii?Q?dbw3gRqV86/aZ52UD7IpwuaTTE9T4yTF/Q1/PPl5RPI/XyeBR/HPBCWXpW96?= =?us-ascii?Q?1HWh9hnVqQ8rhNePm3IKnTtpGANHIbig1cZEog8brfSdddVH2+NOK3kwg2Z8?= =?us-ascii?Q?NGqth1ASCXckeMPYThP6bAmjLq6Ouqi3V55G35ZPmmQeZYzHQKcgzDAc08Ch?= =?us-ascii?Q?YY++Suo0XEajT7StXKvmRbYZQ7IiDGjNkHlIqw4XeGyzXzV3IPb4jQxJycMQ?= =?us-ascii?Q?EKttAyucvxW5weimsQy2vM0t8smz1c+CxKjxBCkQq3DaJrikTvkfvC7c1ipz?= =?us-ascii?Q?cT0OHhS4TXy++NEohlEB76N9zTF+zReV8vJb4Kx64/hAJUr5Sv7kQtMwPlGO?= =?us-ascii?Q?iroxCrZVGs9g0+CYb+blTAEj/ePyse2vN21yC0xF2M1pOsm7YpTQQmPl5qfS?= =?us-ascii?Q?N/nTQUeNbqMAc6cy6L1n9SEzFegmz1mKZ0Src5qM5xTXXE61xrjpo036cMcq?= =?us-ascii?Q?19RZanifgvEdi040a4pSVoun+MSfwnIB3NhQwQQu4TVeWADLnjpNBt96SIEz?= =?us-ascii?Q?VC5b1yqwQvUalMe7Ve6Vj1S5ffbNHD0A+Okf06N8O/O7sXH1K1QMmk+ROL3s?= =?us-ascii?Q?Z0PJK/U2h1OOWr8OGo6Tdm66NY4fAe7Rn5s0dw=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM2PR0701CU001.outbound.protection.outlook.com;PTR:mail-dm2pr0701cu00101.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704160111799003)(36860700016)(1800799024)(376014)(14060799003)(35042699022)(82310400026)(156008)(22082099003)(18002099003)(56012099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 90/LjN55f+Qu5C/E8M7Y+gAqBE13cPpBENMHhKlugIec77MMAWh1FG0aozTMI18SBxbnKWofCCwmZKEGM9kuF/91HLmjhdEUEaZw+HWiChBLjLfw/phr+bubn6wBFpZeEX9DvWNAOKh4MJVG+c+qTJANmk8t+QRoCOa0SYHGve/dzVMqV0pymV3jFjbU8T6dNRkMnQs0xwOxw2H+qMBnBePW/89NE/tOW3TxV5jzHCP1o/GyGLqpXXgUDeQESA0RAp4HgfZBSN/25h4stqAuYdGIRvLxhD+nj4uue3sms2DQ6Ubd26H5vPc1/K45Dhh0TI9tRk6fPNbfMhCV25R8Y+3PP95iiT0hP64lIs5owrRsCWE2kycwm2aAfm2Pyg0ty5G+dmlFchpnpcAWl6oM6K9nOOYZYSwPJ0Lpu4fw3qdOSdg1zXqA5dWRka0SCxeb X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:01.1773 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 775eae46-7aa2-4336-4a48-08de9f246637 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CH2PEPF00000142.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR08MB8462 X-purgate-ID: tlsNG-bad1c0/1776720792-93D7FA53-59FB3A63/0/0 X-purgate-type: clean X-purgate-size: 5997 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720812738154100 Content-Type: text/plain; charset="utf-8" This commit moves the init and teardown routines into common code. The functions are gated by CONFIG_X86, so there is effectively no difference despite common code normally being compiled for ARM. This commit contains only renames/code movement, and no functional change i= s intended. This is commit 3/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/include/asm/altp2m.h | 8 ----- xen/arch/x86/mm/altp2m.c | 45 ---------------------------- xen/arch/x86/mm/p2m-basic.c | 1 + xen/common/altp2m.c | 49 +++++++++++++++++++++++++++++++ xen/include/xen/altp2m.h | 13 ++++++++ 5 files changed, 63 insertions(+), 53 deletions(-) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index 7cff40beb7c6..13017525a62f 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -97,12 +97,6 @@ static inline bool altp2m_set_altp2m(struct vcpu *v, uns= igned int idx) return true; } =20 -/* Initialize altp2m views */ -int altp2m_init(struct domain *d); - -/* Free altp2m views */ -void altp2m_teardown(struct domain *d); - /* Switch alternate p2m for a single vcpu */ bool altp2m_switch_vcpu_by_id(struct vcpu *v, unsigned int idx); =20 @@ -184,8 +178,6 @@ static inline int _altp2m_get_effective_entry(struct p2= m_domain *ap2m, _altp2m_get_effective_entry(ap2m, gfn, mfn, t, a) =20 /* Only declaration is needed. DCE will optimise it out when linking. */ -int altp2m_init(struct domain *d); -void altp2m_teardown(struct domain *d); struct p2m_domain *altp2m_get_altp2m(struct vcpu *v); bool altp2m_set_altp2m(struct vcpu *v, unsigned int idx); uint16_t altp2m_vcpu_idx(const struct vcpu *v); diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index 371bf3f0b8d4..46374373848d 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -123,51 +123,6 @@ void altp2m_vcpu_disable_ve(struct vcpu *v) } } =20 -int altp2m_init(struct domain *d) -{ - unsigned int i; - struct p2m_domain *p2m; - struct p2m_domain *hostp2m =3D p2m_get_hostp2m(d); - - altp2m_lock_init(d); - d->altp2m_p2m =3D xvzalloc_array(struct p2m_domain *, d->nr_altp2m); - - if ( !d->altp2m_p2m ) - return -ENOMEM; - - for ( i =3D 0; i < d->nr_altp2m; i++ ) - { - d->altp2m_p2m[i] =3D p2m =3D p2m_init_one(d); - if ( p2m =3D=3D NULL ) - { - altp2m_teardown(d); - return -ENOMEM; - } - p2m->p2m_class =3D p2m_alternate; - p2m->access_required =3D hostp2m->access_required; - _atomic_set(&p2m->active_vcpus, 0); - } - - return 0; -} - -void altp2m_teardown(struct domain *d) -{ - unsigned int i; - struct p2m_domain *p2m; - - for ( i =3D 0; i < d->nr_altp2m; i++ ) - { - if ( !d->altp2m_p2m[i] ) - continue; - p2m =3D d->altp2m_p2m[i]; - d->altp2m_p2m[i] =3D NULL; - p2m_free_one(p2m); - } - - XVFREE(d->altp2m_p2m); -} - int altp2m_get_effective_entry(struct p2m_domain *ap2m, gfn_t gfn, mfn_t *= mfn, p2m_type_t *t, p2m_access_t *a, bool prepopulate) diff --git a/xen/arch/x86/mm/p2m-basic.c b/xen/arch/x86/mm/p2m-basic.c index 433e7d08b78f..67cef5d2b6ef 100644 --- a/xen/arch/x86/mm/p2m-basic.c +++ b/xen/arch/x86/mm/p2m-basic.c @@ -11,6 +11,7 @@ * Parts based on earlier work by Michael A Fetterman, Ian Pratt et al. */ =20 +#include #include #include #include diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index 3a3283f0860a..cda653b713f0 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -2,8 +2,10 @@ #include #include #include +#include =20 #include +#include =20 #include =20 @@ -13,6 +15,53 @@ #include #endif =20 +#if CONFIG_X86 +int altp2m_init(struct domain *d) +{ + unsigned int i; + struct p2m_domain *p2m; + struct p2m_domain *hostp2m =3D p2m_get_hostp2m(d); + + altp2m_lock_init(d); + d->altp2m_p2m =3D xvzalloc_array(struct p2m_domain *, d->nr_altp2m); + + if ( !d->altp2m_p2m ) + return -ENOMEM; + + for ( i =3D 0; i < d->nr_altp2m; i++ ) + { + d->altp2m_p2m[i] =3D p2m =3D p2m_init_one(d); + if ( p2m =3D=3D NULL ) + { + altp2m_teardown(d); + return -ENOMEM; + } + p2m->p2m_class =3D p2m_alternate; + p2m->access_required =3D hostp2m->access_required; + _atomic_set(&p2m->active_vcpus, 0); + } + + return 0; +} + +void altp2m_teardown(struct domain *d) +{ + unsigned int i; + struct p2m_domain *p2m; + + for ( i =3D 0; i < d->nr_altp2m; i++ ) + { + if ( !d->altp2m_p2m[i] ) + continue; + p2m =3D d->altp2m_p2m[i]; + d->altp2m_p2m[i] =3D NULL; + p2m_free_one(p2m); + } + + XVFREE(d->altp2m_p2m); +} +#endif /* CONFIG_X86 */ + /* * altp2m operations are envisioned as being used in several different * modes: diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index be627152668a..85ef22c2b29e 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -8,6 +8,19 @@ =20 #include =20 +/* + * Common alternate p2m declarations that need to be visible + * regardless of CONFIG_ALTP2M + */ + +#ifdef CONFIG_X86 +/* Initialize altp2m views */ +int altp2m_init(struct domain *d); + +/* Free altp2m views */ +void altp2m_teardown(struct domain *d); +#endif + #ifdef CONFIG_ALTP2M =20 /* Alternate p2m HVM on/off per domain */ --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720822; cv=pass; d=zohomail.com; s=zohoarc; b=nqM80MM2pWX7QyY9rR6AfCvfBORW/4hnQKIordDBq7Frec6ualrPw1Eowu8XKcyiRX0dmw3OkwQdoeE4inxcySywBXsA19mVLbQ7HXPnkMlu/MbaAR6BZWR8GSuemU5a/4LSEksJAxmfy081fFZB9So5fOvYcG7DuLDo+XLB9HI= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720822; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lnQuy/T8mDWKqAQXnoELf5ceU1mbzwKchncHWAqAvgo=; b=Xc8+rWN3ENfwk//IOFZrKxnFfLxg1NKMPdpngZoLLPcFMZZr6lhomekOaZLYVoKNig9tC7KOpaGhYBCrZut2kduLCtU+IFaEFpP8U8JHE4GZiKkUNkOb6bEUfmrQXoIWpkMuj/d9m1BBS4tNLakYqI57tYRm/qaiDJU2qCe+IEk= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720822636625.5019488518403; Mon, 20 Apr 2026 14:33:42 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287809.1568240 (Exim 4.92) (envelope-from ) id 1wEwF6-0003Ca-3D; Mon, 20 Apr 2026 21:33:20 +0000 Received: by outflank-mailman (output) from mailman id 1287809.1568240; Mon, 20 Apr 2026 21:33:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF5-0003Aw-OL; Mon, 20 Apr 2026 21:33:19 +0000 Received: by outflank-mailman (input) for mailman id 1287809; Mon, 20 Apr 2026 21:33:17 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF3-0002aX-5a for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:17 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwF2-00CCKM-HP for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:16 +0200 Received: from [10.42.69.9] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b8d-bab6-0a2a0a5309dd-0a2a4509a2f2-30 for ; Mon, 20 Apr 2026 23:33:16 +0200 Received: from [40.93.198.137] (helo=CY7PR03CU001.outbound.protection.outlook.com) by tlsNG-bad1c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b9a-2497-0a2a45090019-285dc689dbe7-4 for ; Mon, 20 Apr 2026 23:33:16 +0200 Received: from CH2PR17CA0001.namprd17.prod.outlook.com (2603:10b6:610:53::11) by DS0PR08MB9466.namprd08.prod.outlook.com (2603:10b6:8:1b7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:09 +0000 Received: from CH2PEPF00000140.namprd02.prod.outlook.com (2603:10b6:610:53:cafe::21) by CH2PR17CA0001.outlook.office365.com (2603:10b6:610:53::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:08 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CH2PEPF00000140.mail.protection.outlook.com (10.167.244.72) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:08 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHR4bQxz1wdX; Mon, 20 Apr 2026 14:33:07 -0700 (PDT) Received: from BYAPR08CU003.outbound.protection.outlook.com (mail-byapr08cu00301.outbound.protection.outlook.com [40.93.1.105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:07 -0700 (PDT) Received: from BY1P220CA0047.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::9) by MN2PR08MB6319.namprd08.prod.outlook.com (2603:10b6:208:1a6::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:32:55 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::c4) by BY1P220CA0047.outlook.office365.com (2603:10b6:a03:59e::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:55 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:54 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:49 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=bqmjO7vZunCjYPdE/6ii+SWbSZ0A+QIDRX1AaX4eF01pfegrAsSG4K3nXzEqGO8T3/s4VzyWGvQ0jq2exheL4eQQewCeAUV/+j2Ki/TLoy9I3tbDkZz2qHft8Tpv/lDHQT3vmEAR/YBPti6iKsRbbbevAjeMq/UdXP+papACH8ArNwJnHR+jrj2LRZ021Udg98QuJW4WFf2+ggXrGwraTHLkJKiIurCBQwVMCPWYfabxIqZQvGwXJkHQtknkhF5V17zaUYhAjSMh9fJu1wpnAFjY/WNKr5JEoDtQn9ADjWI2CtQG2Eay/I5Bpge7IfFKDi5oC1qubvR1lHQ7fwtaAg== ARC-Message-Signature: i=2; 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=lnQuy/T8mDWKqAQXnoELf5ceU1mbzwKchncHWAqAvgo=; b=Vajh/DKz2YSJyTJxskoKurnELk8keUkGZMFdEUcR3iASNsB8roPDeV8FSmRTl+cKGPGpMOTBm24rT3ba8MOVwSljeAb3Y8ieUufnl5KjwenFfKqcQnCYagr7HaGaRouh/92EU/VZU6mRHgpBmgbyS+99UQOKjO86q1jBS626Xc85CpCcjPpWvs/3Prv6ZelrJL4Pg4KSmOwbMNe6K2jQ67X6gKoMKDXmfUcTd1mowi3sPZVPVE13UptMEDYSRSLMqsTUWWnmL/4A2xSdrNoo+5va3VseVdA7a7W/KTylJozBDtauxxeoZ7VtGv+7vfc4xSc7bRa2ocN1ujhEivmcBw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.105) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lnQuy/T8mDWKqAQXnoELf5ceU1mbzwKchncHWAqAvgo=; b=WlBs5XTYT+ztCvLuc5Eew4FL+t/kLsCVBYD6OIH+YD0SlpjKckJavApzs2toV9kBArDVQtOzoA+iVBnn/5D566tmP2hgX3shC766qaUDDUyF/AELRzUsnwb7vzGoVdpal5eP2xrP12zMk+1PSqjd6C8vs4sIKOtWqjk4+9GA/bs= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.105) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.105 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.105; helo=BYAPR08CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RyMDUJcOODqsmLmZDMpi79UOykH/1csOpMDoY/6fOnTm8wLG9II1Z/eONRZbDvbXmHY0GqCcN/tL2l8nSP5DkGTbiRdSrGyQqCl9bC+/7pfS9WD+GFXT2UBo9hToXGZj4LyylEi7U/BrEDArILMzKLeSaSMvjp3zAJFokboMakiNnDajjCVOX2iVFvQ3VJ5QiCTUcdwBVDBkbO7ql62ctKVbQHY2l5+JrTw2endzLBSUgoFNa82cGMlUpRuFNbrRNRFeUplRWi8mISz6kGvqU77U/s1NBwn2DmmHIIUqoKhlh/wv3beyfePyuLHvBCfVRqXgDzzghkG/3Wb9HWTdWw== 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=lnQuy/T8mDWKqAQXnoELf5ceU1mbzwKchncHWAqAvgo=; b=I4a/Oy79bmDcO2T6INLFNucPvLq7YbLTYDheGkVUR+eatBZQAsVI/CCJ5d5W0y+rEfnj6iSK6TJ34pJiFQ7SGS3MqgmqVh81qStDHfO6ayhLSyRrqh+Wtpz9oxiOdYj9uBK4zfuWWM6/AcQOV5qldxPqpBCDwdrRpyrqUUpE5OxX6Zq3jJ1kmzoY4VS8RDgX+6uYE1be2MZf15lQn01DXM2br/MsnsnyClFZoyV46xvpAkajf/t4qVFp8eagfdDUm7s/BbZ6ElgOQS5GZf4uCOPockjNhaIw3/5IbMZYpbxvFYHigG9FKVC9kguqAYb29O/21UNbIQbZbj2ySxwh3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lnQuy/T8mDWKqAQXnoELf5ceU1mbzwKchncHWAqAvgo=; b=WlBs5XTYT+ztCvLuc5Eew4FL+t/kLsCVBYD6OIH+YD0SlpjKckJavApzs2toV9kBArDVQtOzoA+iVBnn/5D566tmP2hgX3shC766qaUDDUyF/AELRzUsnwb7vzGoVdpal5eP2xrP12zMk+1PSqjd6C8vs4sIKOtWqjk4+9GA/bs= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Rahul Singh Subject: [RFC PATCH v6 15/43] arm/p2m: Allocate hostp2m with xzalloc Date: Mon, 20 Apr 2026 17:31:38 -0400 Message-ID: <20260420213206.208750-16-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|MN2PR08MB6319:EE_|CH2PEPF00000140:EE_|DS0PR08MB9466:EE_ X-MS-Office365-Filtering-Correlation-Id: d92189a4-97ed-4be0-92ad-08de9f246a82 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|82310400026|376014|36860700016|56012099003|22082099003|18002099003|11006099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?ORCWejIsWrNq16YE9IRDHBqtySMkMgNUF5VxkPVUwXpkc+rplZeqXu4TAf6s?= =?us-ascii?Q?UMl0NlqT4unK1JJt5H/uXTBTg8W3FRDwCO60QYlCLnZfh2VH7kdZRfb5Tl/U?= =?us-ascii?Q?575wNNBKklR4vic2ksKlJv3/MCejvP7wwu76sycU4W82PHeOnkhcAnSIqjWw?= =?us-ascii?Q?1CnPAdDuKpXMyDVVA3IT4PZ+5MKgz4wg69P/cn/1EwZQHGv2oYiLtwTZ227W?= =?us-ascii?Q?1CAc/oplTk7lnHF5VfJnJTso1JKNVnbFlYI3I6nC5kGTBtWwimt+tRvOJBaP?= =?us-ascii?Q?rnYxf+doO0KenT9vHDl4uZu2tK3E9BCAO2dxY0CdGT+J0E2I/ynP4Swf4Ahl?= =?us-ascii?Q?7HSW+IMYAwrZf6LzryTQhO7mfabR2ZKf5rq4dMRi5gSF4+j9Os0VN6DhFZ3A?= =?us-ascii?Q?jMdv2vmFIhUC1IdBPadCjWAF0xb75b8Zyy4QGzzzJcJWOVBrLBZMJapKtlB/?= =?us-ascii?Q?dQcHRZ+QpqDq/7mMr613JQc42+vd1pMDY5F1sgkF058QIi3arL9fSQmDH/4J?= =?us-ascii?Q?cwIPYvXKBSKFaZnXQ+4BMC56u4BovyrbrOKq1zntX21KwLeu4Gx20IyzFfbR?= =?us-ascii?Q?zxyeyzOUMWOHe634eVMhmsg3W1uU4G0OAFpXYziyahQZcfYJ8OejAyhlUI/0?= =?us-ascii?Q?PtFT39X9TwL+4qbDX/VboPEOGS/F19ftaATjsg+H3Ajpeqoxbh9txoqDD3t4?= =?us-ascii?Q?iPhWRZcrJs1Z7jB2r/nsFV7LP5viG1C83TKyNsRpWOd1ZdWDE9QWaPq48RSP?= =?us-ascii?Q?J85/PVDOIdTP4afuv1ejYFkt8Iyf5t/TAlJA/406BUwB600/ibqKbpSFUZqv?= =?us-ascii?Q?Kxju85sojP6z0bRCgUbFGeBBm2e1rFfypWrCeEv7YDUAJdCHeJGA6+6Q+0ng?= =?us-ascii?Q?y/BQRaX/G6hbJxVOZ3yx+atFRsE5VnGyNhnyvx4Z6H01ruBywp/8htH5u6Be?= =?us-ascii?Q?s8a1mD6gz2XJn6TohY94u6GtNH9c94YlG0+8qJ6Z9BoLl4zxuqwvLmD7zpDW?= =?us-ascii?Q?ZLzPGdKCKtN698lwEMUscLCIKu8ekDDenuo19WNZQEaOXt97X7d1fubIJbza?= =?us-ascii?Q?2BqIw6Hdkpb87viw1+OSSekimPxzBhCMEtcNExu1A1RM8KIDnldYUEHPiqdu?= =?us-ascii?Q?KnVXzEW78lfev0rwInHRP0Y8E4/LV5sf/b1H1WZT9kqs6wNrs+zZnU6zlLfG?= =?us-ascii?Q?j51PJD26Cu9oDVF2LyMuaLCOjD8cUEz31//Xej8wzLjLmDsencKEW3MmBcTv?= =?us-ascii?Q?pMER5n3JTgxFas9yZ0ncakQTolKsL5FEbMxB8KSSm5elmU7oUVuIZAKAg0Iu?= =?us-ascii?Q?2Do1PjbYBR2DFyEY+RVJcH4W0XcBAUe9t/xbaJUAk0r/NQ=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(376014)(36860700016)(56012099003)(22082099003)(18002099003)(11006099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: Gxthn6BOF0XGeg3v1dvERdHsQDKmRHI8FupAWnTJQM++Emu885gOKA9bsMGaUH68sFskgtBlRO+i9l/v6hUc/vBC/eX+G3qN4sh+KLqTCTavTgWl5Jg7lF6pqAum8g+RDansmHaMhSGmBCwTfhoI9O/9qwWCOmazjD3NBgVvu9k4Dp1O4Pd7put0qRRbI8d9jOSo9suFnQTCJ3OotqEObucppeVgR+mYlwR+7aSTxDi6tF26qrVgGHEpo5SYWGgHTb9pLGlpjESTh8BC41e9/mpI0DIht9h6+BXsC5Z+wiAMxg4hrLaQ2zpHXhuGZaeXabRQjRkwLWmPbqGBUrXjFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR08MB6319 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.105];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.105];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CH2PEPF00000140.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 8ba51a4e-795e-41b5-0c3f-08de9f246259 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|376014|14060799003|35042699022|82310400026|156008|11006099003|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?AvhKhmn8Cz4/HY8OIsf7mUfdd0/SWBNNwrm1CA6lmKK3IXuVJtKXFiBWOW2p?= =?us-ascii?Q?Js+zYUy9HQxI39wtj3JhJkoDggrUqYTCkqju0KkoM0sA48HBpH/3JCyA5nrd?= =?us-ascii?Q?ngYOO2xnAvHIf6yJD2W9jn827sLvEcM83yCnCCgTvyY2IHM0Nlt4EP/IqvW6?= =?us-ascii?Q?pqk+PGPdw14Mp9qmgXdsIVoljw/1Ge+Jh8KX7jsBDLh3P0zgnGogT/Gs5heR?= =?us-ascii?Q?M54WlKsXBX2SRsVRn0jJbhuv6VgKySEykphr9Dk5YmD9wOYRo43J/5ikPWdF?= =?us-ascii?Q?moSUyvqDrOgzaeztQqtQAAZaNZs58Zh0nycpAKCSZpq3pLTmmlLRARs/qmfI?= =?us-ascii?Q?Wql8Sj2YL4PTLKxjCDaB7v6gRSmndHPrzOHSQK5WxRNsmXuHBPYwuirmN5sS?= =?us-ascii?Q?Ix3F90NpnHE5snflv6/NvO3ET7UKNqNaegARNSmzAn4yjz0o0giSg8pzJonx?= =?us-ascii?Q?9AKrTYWf/SvDtF82kDoW5/z9Uc+aRFQGCsJGd/Kho3Q3x4NoKxfzLRW+O2v1?= =?us-ascii?Q?s3xefC/9JPSXrgcTvdlN+qCUYzspcy+v9QUE2TytMfdJvyOM8nWT1/GKkkcK?= =?us-ascii?Q?zrqYKErBgAHIxKScnW26C/SkBNlBsb5LZpkVLv9UO2SaiEA3NEgVNNLKDarf?= =?us-ascii?Q?8wnjGZuBA42TVkA50Rvf+SKCWguGVoNQeT22DgNPIt2Yt1mCCoF0cXTngtf5?= =?us-ascii?Q?eND/3eizTEsXIhKdavzQjM3z+tNY+dELN2/SfjzCYSWCum3GoxKpt2eiB2Ac?= =?us-ascii?Q?MtDoFgvOyMhxpbTwrxqkxsF5jxk7TcK0MYOKBFpjdbJc837iTAiTP93PAsX3?= =?us-ascii?Q?QLVkMZR00D9MaVjml4jfwJu1HfzykOL8wE+7kzPi514Wym2izFlLXR/PG0gU?= =?us-ascii?Q?YBBSfVgQEbQEG4zeQ3YKThVCYN+4XZLtjVGnZO//yE1pWGAZ+6tAzLYwJ6FM?= =?us-ascii?Q?PdcIFOsG5x5D6Wm7MaOenn0eDV5TYaEEyC6WTKyD2GMIlIw9fOTJ7jI9q3Vy?= =?us-ascii?Q?tPI6Z5kFX/X3WlowmLblVZfmBjVqsEURb4DfYu4YniO/8nyeGaCI+GtAOAXk?= =?us-ascii?Q?WkHbXJTvqizW7S3WCLfjeVqBRwdO/77jLjUSbwyHXyadrFV6l7mcR3NMTs4q?= =?us-ascii?Q?XFQYgkycwLkQ0zugD05j1NUPAj3GPxo5ZpIAvj12CoqRrqBLpEAgILzKKWfL?= =?us-ascii?Q?ATsGIb4yRR0t5vP1XAnTl9wg+B0Z+KAVNVLZCce3TP7LYSKwhrWLuAHUa5zm?= =?us-ascii?Q?VXW21TJRe2aHFludo4v6JjPGkZXOWWMN+gikIQ4dZMq1wfgEsVScfl7k4w8I?= =?us-ascii?Q?fLDMYicw7LEbhKoKHl5jhHGdzZRbEYKxkwCsQ90QUxEImA=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR08CU003.outbound.protection.outlook.com;PTR:mail-byapr08cu00301.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(376014)(14060799003)(35042699022)(82310400026)(156008)(11006099003)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: We0n7kf4vpuWmcMuhnIplB4lhjmFZi8kulX/NM2scKTnyCVywmkdcfW5ASVzkW5QeNRg3ZI3KJ68jVOUx/+xHk0hZNQcW8yI3nYppeUF1SHNjlI7bPCa9/tSATXS9WFJ06rtA2OlOKf3d0Ihkt9UVHolBjmIRUr1zNq5cVFtJ4QQw9sFzChXGxy1l+mKhGVjzX0k6Ch0EABOgBFHf9UDOD/kZoAgVWKTLKwZUm3RkhXyNct0y29xXm5y3ODn+aH0nnjl+13KaoFUNMEPKhW224d5yjoJerJa6fyYZaksucm++Azo+zin1QqbxzqW0YDN9SZYvRHPdI3rbcS+Un38oL5iM4MWlHKWykkD+5TEyjT3nxCJMAyBgAWL0PIYqQcO6ViqQVRLdxewmlegMKQt015g0pe0gz0VjCrN7VbX1wfvDK7W5wb0qr3zdktuHQaG X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:08.4622 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d92189a4-97ed-4be0-92ad-08de9f246a82 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CH2PEPF00000140.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR08MB9466 X-purgate-ID: tlsNG-bad1c0/1776720796-92772A53-59463CAE/0/0 X-purgate-type: clean X-purgate-size: 7264 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720823367158500 Content-Type: text/plain; charset="utf-8" This commit replaces the concrete p2m_domain member in arch_domain with a pointer to p2m_domain, which is allocated with xzalloc during p2m initialization. In the following commits, the altp2m_init and altp2m_teardown routines from x86 are be moved to common code. These routines (respectively) allocate and free the p2m_domain structs for altp2m views. While it would be possible to have special code paths for allocating/freeing altp2m views while keeping the hostp2m as an concrete member, this results in code duplication and increases complexity without any clear benefit. Therefore, switching the hostp2m to be allocated separately from arch_domain (similarly to x86) makes it possible to use the same functions for both allocation/teardown/freeing of the hostp2m and altp2m views. This is commit 4/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/arm/domain.c | 2 +- xen/arch/arm/include/asm/domain.h | 2 +- xen/arch/arm/include/asm/p2m.h | 2 +- xen/arch/arm/mm.c | 2 +- xen/arch/arm/mmu/p2m.c | 27 +++++++++++++++++++++--- xen/arch/arm/traps.c | 2 +- xen/drivers/passthrough/arm/ipmmu-vmsa.c | 2 +- xen/drivers/passthrough/arm/smmu-v3.c | 2 +- xen/drivers/passthrough/arm/smmu.c | 2 +- 9 files changed, 32 insertions(+), 11 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 26380a807cad..be824a5ba18d 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -1099,7 +1099,7 @@ int domain_relinquish_resources(struct domain *d) * We are about to free the intermediate page-tables, so clear the * root to prevent any walk to use them. */ - p2m_clear_root_pages(&d->arch.p2m); + p2m_clear_root_pages(d->arch.p2m); =20 PROGRESS(p2m): ret =3D p2m_teardown(d); diff --git a/xen/arch/arm/include/asm/domain.h b/xen/arch/arm/include/asm/d= omain.h index ffe5d0d9f0a6..576dbdec20af 100644 --- a/xen/arch/arm/include/asm/domain.h +++ b/xen/arch/arm/include/asm/domain.h @@ -72,7 +72,7 @@ struct arch_domain #endif =20 /* Virtual MMU */ - struct p2m_domain p2m; + struct p2m_domain *p2m; =20 struct hvm_domain hvm; =20 diff --git a/xen/arch/arm/include/asm/p2m.h b/xen/arch/arm/include/asm/p2m.h index 010ce8c9ebbd..23df91ea13e9 100644 --- a/xen/arch/arm/include/asm/p2m.h +++ b/xen/arch/arm/include/asm/p2m.h @@ -410,7 +410,7 @@ static inline int get_page_and_type(struct page_info *p= age, } =20 /* get host p2m table */ -#define p2m_get_hostp2m(d) (&(d)->arch.p2m) +#define p2m_get_hostp2m(d) ((d)->arch.p2m) =20 static inline bool p2m_vm_event_sanity_check(struct domain *d) { diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 6df8b616e464..46f9363ea851 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -116,7 +116,7 @@ bool page_is_offlinable(mfn_t mfn) =20 unsigned long domain_get_maximum_gpfn(struct domain *d) { - return gfn_x(d->arch.p2m.max_mapped_gfn); + return gfn_x(d->arch.p2m->max_mapped_gfn); } =20 void share_xen_page_with_guest(struct page_info *page, struct domain *d, diff --git a/xen/arch/arm/mmu/p2m.c b/xen/arch/arm/mmu/p2m.c index 51abf3504fcf..3ecb969a0369 100644 --- a/xen/arch/arm/mmu/p2m.c +++ b/xen/arch/arm/mmu/p2m.c @@ -5,6 +5,7 @@ #include #include #include +#include =20 #include #include @@ -1475,7 +1476,7 @@ void p2m_final_teardown(struct domain *d) =20 /* p2m not actually initialized */ if ( !p2m->domain ) - return; + goto free_p2m; =20 /* * No need to call relinquish_p2m_mapping() here because @@ -1499,11 +1500,13 @@ void p2m_final_teardown(struct domain *d) radix_tree_destroy(&p2m->mem_access_settings, NULL); =20 p2m->domain =3D NULL; + +free_p2m: + xfree(p2m); } =20 -int p2m_init(struct domain *d) +static int p2m_initialise(struct domain *d, struct p2m_domain *p2m) { - struct p2m_domain *p2m =3D p2m_get_hostp2m(d); int rc; unsigned int cpu; =20 @@ -1556,6 +1559,24 @@ int p2m_init(struct domain *d) return 0; } =20 +int p2m_init(struct domain *d) +{ + struct p2m_domain *p2m =3D xzalloc(struct p2m_domain); + int rc; + + if ( !p2m ) + return -ENOMEM; + + rc =3D p2m_initialise(d, p2m); + + if ( !rc ) + d->arch.p2m =3D p2m; + else + xfree(p2m); + + return rc; +} + /* * The function will go through the p2m and remove page reference when it * is required. The mapping will be removed from the p2m. diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 0c01f37ad6b4..637d27659b20 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -984,7 +984,7 @@ void vcpu_show_registers(struct vcpu *v) #endif =20 #ifdef CONFIG_MMU - ctxt.vttbr_el2 =3D v->domain->arch.p2m.vttbr; + ctxt.vttbr_el2 =3D v->domain->arch.p2m->vttbr; #endif =20 _show_registers(&v->arch.cpu_info->guest_cpu_user_regs, &ctxt, 1, v); diff --git a/xen/drivers/passthrough/arm/ipmmu-vmsa.c b/xen/drivers/passthr= ough/arm/ipmmu-vmsa.c index fa9ab9cb1330..d246c5e59005 100644 --- a/xen/drivers/passthrough/arm/ipmmu-vmsa.c +++ b/xen/drivers/passthrough/arm/ipmmu-vmsa.c @@ -565,7 +565,7 @@ static int ipmmu_domain_init_context(struct ipmmu_vmsa_= domain *domain) * Use P2M table for this Xen domain. */ ASSERT(domain->d !=3D NULL); - ttbr =3D page_to_maddr(domain->d->arch.p2m.root); + ttbr =3D page_to_maddr(domain->d->arch.p2m->root); =20 dev_info(domain->mmu->root->dev, "%pd: Set IPMMU context %u (pgd 0x%"P= RIx64")\n", domain->d, domain->context_id, ttbr); diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthroug= h/arm/smmu-v3.c index bf153227dbd9..a7fbe58cba77 100644 --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c @@ -1205,7 +1205,7 @@ static int arm_smmu_domain_finalise_s2(struct arm_smm= u_domain *smmu_domain, vtcr->tsz =3D 64 - p2m_ipa_bits; vtcr->sl =3D 2 - P2M_ROOT_LEVEL; =20 - arm_lpae_s2_cfg.vttbr =3D page_to_maddr(smmu_domain->d->arch.p2m.root); + arm_lpae_s2_cfg.vttbr =3D page_to_maddr(smmu_domain->d->arch.p2m->root); =20 vmid =3D arm_smmu_bitmap_alloc(smmu->vmid_map, smmu->vmid_bits); if (vmid < 0) diff --git a/xen/drivers/passthrough/arm/smmu.c b/xen/drivers/passthrough/a= rm/smmu.c index d63c9015510e..0975be2562bb 100644 --- a/xen/drivers/passthrough/arm/smmu.c +++ b/xen/drivers/passthrough/arm/smmu.c @@ -1247,7 +1247,7 @@ static void arm_smmu_init_context_bank(struct arm_smm= u_domain *smmu_domain) /* TTBR0 */ /* Xen: The page table is shared with the P2M code */ ASSERT(smmu_domain->cfg.domain !=3D NULL); - p2maddr =3D page_to_maddr(smmu_domain->cfg.domain->arch.p2m.root); + p2maddr =3D page_to_maddr(smmu_domain->cfg.domain->arch.p2m->root); =20 dev_notice(smmu->dev, "d%u: p2maddr 0x%"PRIpaddr"\n", smmu_domain->cfg.domain->domain_id, p2maddr); --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720825; cv=pass; d=zohomail.com; s=zohoarc; b=GNsm6EKnQL3N3OKpTFDcep2kM3fdsdUwlh7pIJUrZGDrOZS4iAobk3BZovOx6iwF/rmNoyic5x7HM9t1ixRYx+F0HmmrEbB/ebDPzdaBlNenfwyBKO0eAGNNwrCcqU0tKREKXHG1GmBBwvM1eDcTd2iawrVRI5z7NW6BDL5wF5A= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720825; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yIbI7Z0q3lXJU+nOYvRW36Lh6wKWhfwhF7qmIzuTXnQ=; b=Ub4gc/qPMiwPAla8vMCHQLc7Hsj0Q4LPqgSihe5/9RGq6dW9kucXdm+P5IpXWE+4PBGzvmZMFLBT6w+fCJ+DIiafHI+0zdfzndchWsc2cXttUUiQ/QCXLBueWfq2rqOzGNkw0dgQFW+4bSv68tYqHcE6+5EDiWHXD8/gtBZaDwE= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720825167674.8743340058096; Mon, 20 Apr 2026 14:33:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287824.1568272 (Exim 4.92) (envelope-from ) id 1wEwFD-0004em-A7; Mon, 20 Apr 2026 21:33:27 +0000 Received: by outflank-mailman (output) from mailman id 1287824.1568272; Mon, 20 Apr 2026 21:33:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFC-0004Ww-FU; Mon, 20 Apr 2026 21:33:26 +0000 Received: by outflank-mailman (input) for mailman id 1287824; Mon, 20 Apr 2026 21:33:20 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF6-0003FU-BN for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:20 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwF5-00EgCp-OK for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:19 +0200 Received: from [10.42.69.3] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b92-e002-0a2a0a5209dd-0a2a45038228-8 for ; Mon, 20 Apr 2026 23:33:19 +0200 Received: from [52.101.46.86] (helo=CO1PR03CU002.outbound.protection.outlook.com) by tlsNG-33051d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b9d-672d-0a2a45030019-34652e563b1b-3 for ; Mon, 20 Apr 2026 23:33:19 +0200 Received: from SJ0PR05CA0074.namprd05.prod.outlook.com (2603:10b6:a03:332::19) by MN2PR08MB6382.namprd08.prod.outlook.com (2603:10b6:208:1b0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.48; Mon, 20 Apr 2026 21:33:11 +0000 Received: from SJ1PEPF00001CDE.namprd05.prod.outlook.com (2603:10b6:a03:332:cafe::c6) by SJ0PR05CA0074.outlook.office365.com (2603:10b6:a03:332::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:11 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SJ1PEPF00001CDE.mail.protection.outlook.com (10.167.242.6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:11 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHV6dCGz1wdS; Mon, 20 Apr 2026 14:33:10 -0700 (PDT) Received: from BN1PR07CU003.outbound.protection.outlook.com (mail-bn1pr07cu00306.outbound.protection.outlook.com [40.93.12.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:10 -0700 (PDT) Received: from BY1P220CA0041.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::13) by DS0PR08MB9502.namprd08.prod.outlook.com (2603:10b6:8:1a9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:32:58 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::26) by BY1P220CA0041.outlook.office365.com (2603:10b6:a03:59e::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:56 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:56 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:50 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=P1ugP5wTF1I++lHRFLT1nDrWAKhPpQlywHiXA2ADegIxozZs2Z4l8ZrCy9DkNzGq/6bIdjhL7Qvt5LIbo/GzjjlAVMnb+jAlGvdOXtmc3rG6ZBbdoXGFt4zCCihUeikpuH6PFlvnbyIzseNgVz005F/dWhV9gLapuHxzn+RSBj1m/uqWsqI9yWgmueXY+ebcFk13+sJ8B5Q6NejHGaARHIvd1y6dVI16u6IS9H966JtAQdB946dpcbsf8/1Pac5qba3owJIzolPBSYUCuiUUU8rfX6nfbaLx1MULJXPO3IiUEfmQyEuWRilM/HAMR57dLSbXZS4IryAn1f4CzSvXZA== ARC-Message-Signature: i=2; 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=yIbI7Z0q3lXJU+nOYvRW36Lh6wKWhfwhF7qmIzuTXnQ=; b=xW3gE52Fy1wNzbuPUXQETEVupAjA+j7BtSw4wmZbA49NccGwyYgPDxjHftwSeGg8JhlmKAdwVSKNq2xTVMocSJcsZUeW8Lb8P73yMCDSJOFWf3IeFZ1rP4v6BzKrjJij29/Vu8OnH0ckJUPGK8uOwfV5+YVyFqF3ibAV2cZW8Ztre78+rss1/gW9pMcJ3aqCKyPYZiFjtVXWRC/dC2svIDmbnigpEGMSn6x2yo4yAozSB7tuH5WyROl/H2hTh4WWchdjV58useyEzuZhGJhXgEb8EEctQu6LYgKI6qWf3+Fbiie1qp8K68YIlngJubfNzeivyjuJjRzNx35ciASkvg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.12.6) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yIbI7Z0q3lXJU+nOYvRW36Lh6wKWhfwhF7qmIzuTXnQ=; b=IqQU2Xy4RGJOW/2cWL56D1KRboAls7KEstEYqI0lxeIDgWDnxuI/PRcFWTRamxe2pZ75WGYymKdhYREHbFtRLKVzcNcCjJtr68BT7c9UUZyIBF/AXxv3/zpNCOMk3mVC+WyfO+6eToU/EuWFHEBX4RU51ypls47tmMXx3r3Itkk= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.12.6) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.12.6 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.12.6; helo=BN1PR07CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NjrZ2AYhu0C3EvvjAFZY7XkP3D+gU0c6et5k3ZTAKTKBDI3wAdBacVAoKqXY2z6BjOi8Bjih5RBIP45HyGQkOv1XPeslWBmZ54ddp+byE94e1ivoBio7JTSDuDBLvyvrI4Cv8IfweMNRa70aytz2zszE5s1NEsSZOJ6wIvwDDdLLuievAMuFrw/UrRh79pT958txjz6avCtSWjkJGPFcU/djEbFN3qFBvPJ8ZenZCSKOwgZFX19HymY/tR7R/cmu3T7lnPSFU55lCOWZBEGO/mUjeaqigmMxd4Fwe+4H/CGQyi1o4ZsHTn7F+j/CHgOJ5XYo1N6nY1pPW4Rrt8HooA== 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=yIbI7Z0q3lXJU+nOYvRW36Lh6wKWhfwhF7qmIzuTXnQ=; b=xKJ5ywLen3SwY3i+Tszdyobo95F2p5SIYqNufmLw3G0ZiXTq3vJqYVQgGIkwZqze1DG2s4gfrzXPV7v6nSHQSDuVEFfzekb0rfU4S0kTnxn+8RgYHwLZ8tMazejUUIi2FIDZcnj/o9JULv9VICiy54a+s+DfI6xrhe1DvEPVHqLX7990yMiyJ/V/nAw5ZEGcEzI70OcvWkPY4QeX/yMAPoI0qm3TOLOg/XSoLKw9oO0bcYWU4oi1RCusP8cMKG4BWG3xrdhctfv+j3mdkrf3mTP9ZKPiwa2up3kprgQudhYoAmh3DSu6Ggq3KUpBjc1AfyiCx5VUl6uCVHnWLMh+5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yIbI7Z0q3lXJU+nOYvRW36Lh6wKWhfwhF7qmIzuTXnQ=; b=IqQU2Xy4RGJOW/2cWL56D1KRboAls7KEstEYqI0lxeIDgWDnxuI/PRcFWTRamxe2pZ75WGYymKdhYREHbFtRLKVzcNcCjJtr68BT7c9UUZyIBF/AXxv3/zpNCOMk3mVC+WyfO+6eToU/EuWFHEBX4RU51ypls47tmMXx3r3Itkk= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Sergej Proskurin , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [RFC PATCH v6 16/43] arm/p2m: Cosmetic fix - substitute _gfn(ULONG_MAX) for INVALID_GFN Date: Mon, 20 Apr 2026 17:31:39 -0400 Message-ID: <20260420213206.208750-17-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|DS0PR08MB9502:EE_|SJ1PEPF00001CDE:EE_|MN2PR08MB6382:EE_ X-MS-Office365-Filtering-Correlation-Id: 9dab8fd8-aafc-4d97-beba-08de9f246c3f X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?byG3xknpIu7vFLqINkVc9Tr1+dpyo+tM9wHvSOLqgPhbm8A0HKXBUHVa+RV5?= =?us-ascii?Q?stAEyMHqWJBbZyfuFu6ang9HOVqT7AHnaaaHJmHB2MMgIwKVJAOHayprhakb?= =?us-ascii?Q?B8RtkLUW3HdU3VeI86ZMZsGAy/l0syUi7NakuhE4CaBM3HI9m2vovjhQE4Mq?= =?us-ascii?Q?5qTqhyyB7TW4qxr/SA4I2OTFNug8hgvyd1POa1OhBptJPW03F3F1grggC6sm?= =?us-ascii?Q?HQSGP9R059McYMZJZiY6G60CW2c7BUbLndBTphXybe7rvihfydXXJbbTPOJU?= =?us-ascii?Q?kAdpgPnkksmFTmJ4L9tfyFM7wdRBuiJUW38Ccu2cNUS75dqmfwYD8VZGxq+L?= =?us-ascii?Q?aispAXriWvM1TcaEaXVjwx4/vG+e7IFyKs6bD3fb2NLUkVsJ04Gh2zvFfpOx?= =?us-ascii?Q?KnMEHLcu6K5RcTTFK/6SO0ECYxgRuFQorZ3afwajA4M8lLNCo1UIvsIfdnjB?= =?us-ascii?Q?R/lF+U9HZgUPdaNAyn7UyacCojOnR6PYCpGu+aDRXNiclMA6kz2JQWqcKwZd?= =?us-ascii?Q?L/kGAJI3EK/TsWvXYSZkSzqpc1MBgX2E2I6XB8/P8SjVTsYtvsgxEyiw5p1t?= =?us-ascii?Q?5+t895pGuQV5xKOL7AcnYJbL5WH7KdXODUIzllYzYoFhCF+WZb5plBRedM0T?= =?us-ascii?Q?bNwq2RVLB00OiPSpzqRCqkm/yKVGRz734f6VciZu5xPfYYpnWtD9rS1ob2hR?= =?us-ascii?Q?gEhtwJ8cq1mQPs1PnzIbtXB/l9LuMY5eANBWw7UNB3ruCy1WYGb2CqFzMlKL?= =?us-ascii?Q?moMOvTtlcySeCMRzVd26UUcBKvCg/54D2gy4ZGpBIJUEMSFhhRCCXMuw0a8W?= =?us-ascii?Q?Xh+cpBOhp1ulWdqr2FzQe3ST2JNZY/niLDCzMOk+0FawvP2JmtKB2Jklsp/9?= =?us-ascii?Q?swuSLtelX19w0E8AcIIO12KhPrqWcuzjnRu2/9CK5Pqh9XnaJB1R79u8uWvQ?= =?us-ascii?Q?9n4su8qrAuJ7fZbXb1/xt+7WcbFRAQMjpW2khgQcsUcjPxbhoMcZwYaKxywP?= =?us-ascii?Q?gryY5RWoT99OpCxCTlqxaNJECYSa9na8u+rJw+tJ74YkwhWuZrPAqGhGx1m9?= =?us-ascii?Q?kEP8BMIhrtXRxWZJcyTC1Lz2MkzmGw5GeVnpwyz3KD3v1bTyBn8bqk/j4OWU?= =?us-ascii?Q?rzVnM6V0aqx2s3MG3faET1k+mEiNFA0c5pTh3n9pOvAACZ8o/AjnQYpLQIaL?= =?us-ascii?Q?r2qGfc2HELPAD2q/fszKnpKWkAegVOBiKPnUnHxu5cxo0Ts5WaQJB6utH+t8?= =?us-ascii?Q?CxOCjaCmGadeL+o3EO75?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: qH5TwHcfg+IvAXR1lW0v+gy0r4sLehl05UlAc9BASS2Xyd8g40fCWELYduTQxgPr0vQT/KyzX4JmIK7hAt6Twtf2XgUFHjL3b8DW7Gykrhy0sP3PEdaUmju4zJEEDNsmr63qqXB8Y95wLmebLZPOwccMGRwFV9EUh4u0loMJxjLiEyVV1jJXRWCB8eJYQawpjG43XjXGXQ6G1cxCxsLnEuOElXBsChUOsIfVVnO46gkp6w2LjsczzTVTKG5xDP0uJhXiyNYHm7MLMFkQEZg5bc+6b86r1sxtqLWLukjtSSVfKB5Om+3LQI2hpmUQkTEWdJPaLi3hnA5SIafgTFth2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR08MB9502 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.12.6];domain=BN1PR07CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.12.6];domain=BN1PR07CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SJ1PEPF00001CDE.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4a584e27-62bc-485a-2c0c-08de9f246363 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|156008|35042699022|14060799003|82310400026|36860700016|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?u31U192glPcSoWr0r14UgvBiRi25Rl46Mjpw0v1S60G3+9b4aXy7Dp5YNUEK?= =?us-ascii?Q?EOHq7aRa8zfCGyyn8ySntrzO3KqJLn9dORbIqsw/EM2ymURlyLcLhYUsbqS6?= =?us-ascii?Q?c4BtZYpcThOqNQ0TbWlrliIMkomJPV6GxzeBXkrQevFceCJP5MQDwSGWiId/?= =?us-ascii?Q?jrqO2/Om0kZRkm01QPyYU6vT1wTV5EEaW4cOB47v2aH/Wd/t0rgfttD1aTXF?= =?us-ascii?Q?lD3WGm1muUi+kPhSP3OBNU3t4bQT8+KIxkKGVx05bO5/BYrSmHiputxZJEqL?= =?us-ascii?Q?eco8S2PnQu2Yt/E9R0jnyp0CTmvaDCF8JBnqhlxiwxNEYdXNXpHhVyUGQ0oF?= =?us-ascii?Q?/g8fkt5YtHrdl+IJlmU0bl+m9pcWFcoWKxjpPg+oGvXvR4h4jOa1p2IeQp9s?= =?us-ascii?Q?DRcnZ2KtVadsRI7f17fnNXjt4ThFCTsiHU1w0usc1rsrWK6AjtWhJiqVKIsY?= =?us-ascii?Q?a+XTmrZkcgSyJA3rfAysX8AAAUS7eqienVQY4bL3NzLqMMka4QAwU2oHHQlW?= =?us-ascii?Q?4huLqU4qRHGGUBEA0K9ZYjG2P8hj6oYK66xIbENr2mPOTZ6HC3AY328yTvU6?= =?us-ascii?Q?lFGmi7HP9UNH+GZKs+UJ9WcRp9OlGYakVTD9Fh4yMgnGruiXhuJMmDrlvHET?= =?us-ascii?Q?ioFHLYgVyQGJTs3+LpSm3pMFdI/0vI3YhXEPhTCKi268BnD7P8IqDXqTIaMA?= =?us-ascii?Q?r0z8gpdeESfN48n82qS7kTj2KO6KKWvTeY3MdvcDaJ0NnxiDSzdx0JVaQfXk?= =?us-ascii?Q?dIJCsO8t0Ud8seKHMmGPApzJ/lkTFNUBUd5yLSIR+79uOXF/KRMOCpNPihfu?= =?us-ascii?Q?9NB+zL1147YMmfdo/31DPKR3OmV2aODj0LLp8OtPcyloX09Al7C15vHwQruS?= =?us-ascii?Q?oKBClcAHdJV/zAZYv88TlDqvRvUvweo/urbT5yXB32ujiCswPRrvgY8m67Qk?= =?us-ascii?Q?IBWqHACfH0CF7JWBj1KbgykXrCsrvDys02q10VQDiTWQUaI0Vos0P3mHci/V?= =?us-ascii?Q?PqVOKkJGhjnhGbqKjEcvwybhwL91+4K4XnJnMRD7sPHyX5L+X6c/JtBHzkkX?= =?us-ascii?Q?+1i+2UBq+NPqSBBGS4XtDKus4LJNKrelERX1DbrTku3CXfEXaBvXALot0/Lm?= =?us-ascii?Q?PkjoJB8jxjaOiSKPS+bkrFK78q30LYNHkFHXnCQDl7TMwsKZfl404LaedkDc?= =?us-ascii?Q?+bZQo7S+YXzY9ZU1RtC6QRKsdWyt4mUaac55eHYkDCddTpUOlu1ZTtMjtCkU?= =?us-ascii?Q?lysHzvQAq4r+syTTDvN/?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN1PR07CU003.outbound.protection.outlook.com;PTR:mail-bn1pr07cu00306.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(376014)(1800799024)(156008)(35042699022)(14060799003)(82310400026)(36860700016)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: G19aiybS5qTlN6jNTwFEtE/gDynFwRnTfEnU5kVi4vcY/HovihddFd6mP7nTC2tfRfjEkabhijCnFzR1tRIeqF6YuxbsiW5JIMKguoPegAP0+mf9RZMpcmTbwmrDxePK9RTkFkSKE0IU5Sw7wZf9t6ftW+kMpOp/tmYVePhQm91/YgTfaNqpZE8UHsmDNu2Pw+snwEsfpXjuN6XW2k4ftQcfMU4iFp94oK74yCKlAqLLAAKCRcx5Mtl9NevDMHvLch+/xjA1iw0VcCM5dYvq7RYXCoUeMxtu7Wp1AUQrjzcvval82nwpDA7PfA0eKeBt+Q41OaoFyCIuRZdYynS8AqQFeryvw7EDfMGNzmK0hAKuUnI+bfKH0U+UifjxS6k4rijyCOvjQuYtolLufxiqesjDnodLHWFAufb/lFEwlBXuseB5RSN4Uw1UOR+rlXXu X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:11.4409 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9dab8fd8-aafc-4d97-beba-08de9f246c3f X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SJ1PEPF00001CDE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR08MB6382 X-purgate-ID: tlsNG-33051d/1776720799-28577938-0AED14B5/0/0 X-purgate-type: clean X-purgate-size: 999 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720827289158500 Content-Type: text/plain; charset="utf-8" From: Sergej Proskurin In ./xen/arch/arm/p2m.c, we compare the gfn's with INVALID_GFN throughout the code. Thus it makes sense to use the macro INVALID_GFN instead of a hard coded value to initialize "p2m->lowest_mapped_gfn". This is commit 5/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Sergej Proskurin --- xen/arch/arm/mmu/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/mmu/p2m.c b/xen/arch/arm/mmu/p2m.c index 3ecb969a0369..1009f10e5db4 100644 --- a/xen/arch/arm/mmu/p2m.c +++ b/xen/arch/arm/mmu/p2m.c @@ -1517,7 +1517,7 @@ static int p2m_initialise(struct domain *d, struct p2= m_domain *p2m) =20 p2m->vmid =3D INVALID_VMID; p2m->max_mapped_gfn =3D _gfn(0); - p2m->lowest_mapped_gfn =3D _gfn(ULONG_MAX); + p2m->lowest_mapped_gfn =3D INVALID_GFN; =20 p2m->default_access =3D p2m_access_rwx; p2m->mem_access_enabled =3D false; --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720824; cv=pass; d=zohomail.com; s=zohoarc; b=NBGfKrAicpfZCL2zwfrycSE7G0ev0WlZj3oaEvNONczPpHWhLNDWt98nZIVNjvGedxz0zmwvJx5ZeK7TsknFp/tu8PrQ+rLm4+qM2v7IuOfW6/oWpK/Kw8NKCF6T6Y1Ohi7sByvVtpwo5/kZGW2K1qxwxQa5z8P70p0dS3MVi7M= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720824; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OAj59kWKN8biXOebnwdzq5ky5bvMG5PNKC5Jot+tZ8s=; b=dPIh9pxsArY6Z5tIlqK1EPpItexjLgV3a+DRWLcLzM4vEWYUy9stg19gv6mp0QB3Pmo4+fb22UaUL+RJ2Rxjr+SUpleu8WL3SNCNk3cF3LqNAjR5ururC6cgWx3AfitBduWCyu2KaJdcA6MiB5tWPMlr4+NvZz0UadVSsuYZz2s= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720824713987.3174399829975; Mon, 20 Apr 2026 14:33:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287815.1568254 (Exim 4.92) (envelope-from ) id 1wEwF9-0003sz-Hb; Mon, 20 Apr 2026 21:33:23 +0000 Received: by outflank-mailman (output) from mailman id 1287815.1568254; Mon, 20 Apr 2026 21:33:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF8-0003pq-NZ; Mon, 20 Apr 2026 21:33:22 +0000 Received: by outflank-mailman (input) for mailman id 1287815; Mon, 20 Apr 2026 21:33:18 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF4-0002nY-7r for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:18 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwF3-00CCPQ-Jr for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:17 +0200 Received: from [10.42.69.10] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b69-bab6-0a2a0a5309dd-0a2a450a8c08-22 for ; Mon, 20 Apr 2026 23:33:17 +0200 Received: from [40.93.195.118] (helo=SN4PR2101CU001.outbound.protection.outlook.com) by tlsNG-4011c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b9b-56b3-0a2a450a0019-285dc3762b40-3 for ; Mon, 20 Apr 2026 23:33:17 +0200 Received: from CH2PR19CA0016.namprd19.prod.outlook.com (2603:10b6:610:4d::26) by BLAPR08MB6900.namprd08.prod.outlook.com (2603:10b6:208:325::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:09 +0000 Received: from CH2PEPF0000013C.namprd02.prod.outlook.com (2603:10b6:610:4d:cafe::60) by CH2PR19CA0016.outlook.office365.com (2603:10b6:610:4d::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:09 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CH2PEPF0000013C.mail.protection.outlook.com (10.167.244.73) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:09 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHS3TXLz1wdM; Mon, 20 Apr 2026 14:33:08 -0700 (PDT) Received: from DM2PR0701CU001.outbound.protection.outlook.com (mail-dm2pr0701cu00106.outbound.protection.outlook.com [40.93.13.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:08 -0700 (PDT) Received: from BY1P220CA0043.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::11) by CO1PR08MB6628.namprd08.prod.outlook.com (2603:10b6:303:6c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:32:59 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::63) by BY1P220CA0043.outlook.office365.com (2603:10b6:a03:59e::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:59 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:58 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:52 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=TuPwySnfOoO4heED+i/mLY5dtiFa/ZLLKZie4YKCSKxi2CtXj5GGZFVedj0NVnVF0H1PHnrB8mLzAX1EGtYXcamWMsv5D4DE/ewkYiuGBRthoKeQ/NtsTE58LbBKAqLe5Ac/704OEWNA2BCNrLgNT9OHsAlJ4ptter2Z9bbM2XKNdaSzQ2S3MsyZhAxaHPp3GeMPDi8vMVMLtzc5pFwoKaGdVQ3pI2GSe7twnAQO/JaRvEBSSuSg9/4959lW7wloiyateOAq6Mp4HSjMlj5cusdHJQKUd38AnDEqT5CzF560Hn66cQ8otiEEY6HS2HzNw1VsPSIDOm9GEFYGMk0CSg== ARC-Message-Signature: i=2; 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=OAj59kWKN8biXOebnwdzq5ky5bvMG5PNKC5Jot+tZ8s=; b=iXCrCnYxqRv09iCxWYW/+h4xN6Mwg10tkZIMCQsRS6pQtHexY35B7RwrZ9iPLBV04tF2bkxSlRP8K2A5C0f9+zSgcqRM+BaZk90Vw+uRAd1bS0wMyax8mEYnk01DNyGXY7RbuAfKZI3APvFcuaX4ZVqBqA0rpY3HJ35VlA6bCsMnkHDwFB4uA+Jzfd6yzrNK10+LYN/u7iTrYQKAZq0ZYmGRxjSxSD5mBXTLLG3UCYRFSDhNPEs8obQHONO5gxNAqkbY9vcSSMjQh0VbuJ+hzu00PtYxaEUKBBhGjquzwvwSFZamE4Nwf5kNVRrmVh9uhy1+VgzeaI1oZMBtcJhdsQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.13.70) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OAj59kWKN8biXOebnwdzq5ky5bvMG5PNKC5Jot+tZ8s=; b=Snryt4baAJEKFGBDB8msfIEyGexDg9xmKxd6g8EvgN0PQ/8QwreW4qBt5FSeF2dbQYkfS1Uwq5Qhbh8eSAhv2A7PipxT3uf9O1plhrVB0xiH2sX76pAEEMkoINohWfSGKzL8+xnCNtWES/3p9ufWYjXQfPBJfdud55HEyIMigXU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.13.70) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.13.70 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.13.70; helo=DM2PR0701CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Wm7cXzJuOF0Oh/JlK1CKxUBdqr04KB4G87cSIM9sOK/D5c2a4VDR17tXIC9SuyPwc0V3iMGBeS7XCx8GHPHF+gUAXbVKFe3Vtwkn45Fi35bcRauRkmGulfosTN48AYgTyKzs4qhXV24RNLXPxpLjPEUtclR5IQwKyIBLleCJVNwezKsi8SVhCaKukaHspeu3mbh2UDCOua3Z65IjJJ6JAo14nSGM/97nF7vC662WOaKMfwijP8V99HzLJc6N9DtSmwiP+8WNk5o9sYc6ohCh0q1KOMvVMmye+rf+RLKjCQ2vOtF3PLiWataN6iA6anP5VR3Y1ljj8n8ldETDEAuAwg== 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=OAj59kWKN8biXOebnwdzq5ky5bvMG5PNKC5Jot+tZ8s=; b=RhpZUDjzAPlcaSPuCCMf/etJTtstyBFPmFFH/Hc3qSE2pclZw4D0lw54Ou8tsK8HGpQf0CYfsUdWtQiQSpmdByjAxmOTBF82npNwa8ThLPG3iGYTtErjUb16H1wKwah2ZKDnHiE2ognLqwO32unDY77IJGhKWmdQ50bb7yJjYuKz9v3ksrn25hqShASQ0DAphet8jxJCWzaavYiV9a2Fadh7ri8spWX2LzE/mShBJlOEgSu/ePU4Auduv8cG+bWyFcS9aBGsPVNdzOoe4AwvAQvg0BwhR97WqbPr+zwF8o9p/JxtrzGM0BQBpVBO6AmaTBaUBjAUKEPAKqDrGUoo6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OAj59kWKN8biXOebnwdzq5ky5bvMG5PNKC5Jot+tZ8s=; b=Snryt4baAJEKFGBDB8msfIEyGexDg9xmKxd6g8EvgN0PQ/8QwreW4qBt5FSeF2dbQYkfS1Uwq5Qhbh8eSAhv2A7PipxT3uf9O1plhrVB0xiH2sX76pAEEMkoINohWfSGKzL8+xnCNtWES/3p9ufWYjXQfPBJfdud55HEyIMigXU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Sergej Proskurin , Stefano Stabellini , Julien Grall Subject: [RFC PATCH v6 17/43] arm/p2m: Move hostp2m init/teardown to individual functions Date: Mon, 20 Apr 2026 17:31:40 -0400 Message-ID: <20260420213206.208750-18-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|CO1PR08MB6628:EE_|CH2PEPF0000013C:EE_|BLAPR08MB6900:EE_ X-MS-Office365-Filtering-Correlation-Id: f49ddc1c-3c46-49a9-59fc-08de9f246af9 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|18002099003|56012099003|22082099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?y7lpXzXuajQnio6x5+mtvOJw1oXtwzx7gqXo7MFXNlfLW0EfY3KkL+Z3NmdA?= =?us-ascii?Q?+1+kySujE+4WA8FiepyAkGLAqp9NwRpXUF5bY5ZkYyb1qQ9KCCSfP81h205+?= =?us-ascii?Q?UXfVvOGzwK5tAaYLtaCO+16Yyy60nruyr3yw8KAS/ojckisfKI3sfkOYmmiN?= =?us-ascii?Q?HQ7huvdTXkyEewvkZieTwS/5HzHaRnhZUdSQKakSReBh/9RF2uwr1fuFe9UY?= =?us-ascii?Q?6P/mt2B+W1Sy2kKFBa1DFBrFUVMto41pW5iNjYgOXzxo1vdRz37GsVz6Nbek?= =?us-ascii?Q?VGZ8CK3qGhTdxrxCMrT5Ie3zUA+WfXI3Q7isEpX7mC9S+iqDxPySl90H6Nb9?= =?us-ascii?Q?s5/jEmgsHsetMT0JQIznGU19bSucgi+MtKZvaDzuqeqHqBlNM7MgK7HFZbkt?= =?us-ascii?Q?anfC21Q0bD0Mi9XO4O8YO81iT2cQ/RnsrEQ9Jz4zVy2p7bR/pDu1qsXUOyyF?= =?us-ascii?Q?ZZCxRERG94VcL7sTiiIMndjYwuhPgZXI9GLlMZUW4kNXov9dI3yjaVw39tJJ?= =?us-ascii?Q?UZMOs+MHKQpMtqXZL2o+T7p6Hdk1Ge7Y7ruJtExfcmTCIEYm7khEc1P7pLtb?= =?us-ascii?Q?t4Lasc5AwSs1HgWeJx8kchyDcDuzGzthvKXFjZus1wgClfLYKOZFQ3LACHB9?= =?us-ascii?Q?SJxsNzaCvxwgzF+cSlXCC9Fxeqc66yenD6238VhD3+zG+dBVYJ5ocGwANOd1?= =?us-ascii?Q?w/VYnEyAEAxAKQ91cQa+UNk67F7GM9mxlqP9ISszC4mgUosNs8YQJeoHt5U2?= =?us-ascii?Q?9T/SVOaS368HL+jsUbCbAylMh5xoAz75zp00Lmno4P5ouizmWw9CL9bURGVV?= =?us-ascii?Q?uYKZ7+7McgJ4HJ4BnkhqgxRbC74pVhIVTvZze+rY50anDmn9WWGOK7RvF4HZ?= =?us-ascii?Q?wiXDpy5QFjSbhuR4RXmciKbI40VoNlcEo3wW4BT+lgkl1HAeCzWsXrt/J9pw?= =?us-ascii?Q?ug7otWLZnwaLLLx/IqNqUjSEXohnMjXlOOxF3gWEQVuAPhonEAWHhIzU7ET0?= =?us-ascii?Q?XvojxqhaCXn1cOTtxgk3+zfZrfb+Ck+pt+8WS9fUmkw6bZnJw2B5HSvl/mH4?= =?us-ascii?Q?we64JAyiC3YQ1vTf9dNJ8n6YK9/RAkn6P2r44UqdP50nSU7dGwPf9B31Ler8?= =?us-ascii?Q?V3KZh0lCJ6drBE2RbmvxR95c/vNEiFfKearAALrklMRDq0kSBbsJWWsuK7lh?= =?us-ascii?Q?ZnwqNoVrj/FcSWTsCkm59dM5FCeL45E3fox1wA=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: VMCl7034Do0CTQSQ9Ss8TWwYP0sTxfaFneruF2wSfMqJEi5CcfMDEp81qalRsC9SdngguAyTExBDuIKC153zMegjggIOMLiEbH7G6YyQ9ACSzWoiuHzfXS38jpYxtU0IXw7lssLxEEsCBeCP/3nPIMc3tOWPOdYAgGStSFBs++av9z2p7EinAtORhCz1x6RQed4wKAmR6QVjpOGcJGtTDz8U035s5U4/q0RGR+tRwV+d+yMqmce8CV0Iq23HuSogmwP6w2Pbb+0h/bRm+isDN2fFSP+QLwAiofpFBELYk5OyAHeSofVbqUy5NVF7FftRFB+Pdu0f15Iolk2rDn2DaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR08MB6628 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.13.70];domain=DM2PR0701CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.13.70];domain=DM2PR0701CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CH2PEPF0000013C.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 82ab3a35-1ed4-4d48-55b6-08de9f2464b8 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|14060799003|35042699022|156008|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?hpB9Q/n0VqWgTKsKBI8wJJpyxvQjzpKVClG+8w+JNW9vW2FF5PwUexm9FOFG?= =?us-ascii?Q?e91WbnT5b5cCmpf/hfplWi60kKG5Z2fWuHIoEJpA1qRVzwvXSwyWXCGjC3u4?= =?us-ascii?Q?g0kBbT882oySRGVwjb+OaIC4znVeD7LQHFIzPzp9i1kX2FNHOoJXDMGa8cJU?= =?us-ascii?Q?hFcBO3ImTA7qXayXVq7CxWasLmgUWYsFnmpe4PmXx8zlC+YqDi5wxHAA5NTm?= =?us-ascii?Q?oj5M+Emeib+XZk6kjo4ARSiL5GvLjMnCXpDEpw33ucrqDHGu+fmc4Kp+udnc?= =?us-ascii?Q?i/WopKJrX8t2DypGSiBulzaKypEz1CfpJuN5ONbuJ4HhZOjRpiNMRGdiQubL?= =?us-ascii?Q?74Rkv+w07ifizg83aMDyjCcPgNsjb6Y+S8gOExYmIE2F7wI2iD8JNOsn+NPl?= =?us-ascii?Q?QyM6Uu2P6GAB0IkX51HJAla1UQS/2CMJQddpKzxyJbGMC5g7JyoKpU/zNMt+?= =?us-ascii?Q?GUmUjo+lYBhYLEwNKm6DXEYCalysPIWNRVYWoTbEjGE7kj3a72tr814VCBu3?= =?us-ascii?Q?bPdLSY7ri2SJ7tPwO2dXAlweeYtfTis6SQMN9LtzCBlX4SvhN8hzSm4amJj6?= =?us-ascii?Q?T34rISdgvKoiHa4PMtaPFVGJ+1Tkiz2nRQ4SAvpZu+7KhC3tTJDvTlq6cqd/?= =?us-ascii?Q?26xGX16vgpCOCZ1mp6yTjjJXlULUxUwstcJdKNjpd8qBMyRy7nDOJDP1yD8B?= =?us-ascii?Q?eFyvb3/tmBodbNFotcHgy6z4yiJRwVzSag+MTZq2EyZi9HDRRD8+i239bltE?= =?us-ascii?Q?h/NCRbKD6Db8vcNpt8HhrG+WeVlbKxbI5pmZAvUMaipWdMLyCqTmh+58g0p2?= =?us-ascii?Q?KqF73qzKitigBXg/2RBNkWVzU9ZuHUYAS1vh16bb/BwwdneNmoHP0CvzADLd?= =?us-ascii?Q?FW1Li3SVJ/UtvHshKCJB1mTz6tRW5dnkal9arDCSMa8aBkTnfpLp30Zw0htG?= =?us-ascii?Q?+V8+e8rLfI0ikVDLXqcTXJFwPJPwOWx09ixJzWOgB1m4N7PwTsIcLgJwjJVf?= =?us-ascii?Q?XV9J3A/WNGZyvdUwxAKT41IsVg/ggQFVxS2buNdlkhMvINtyKMjPfVIc9KZ0?= =?us-ascii?Q?e/TtyomOZiHUccw/Gupi1sMxqjMUDg7W/B1k4pkYc1yDFuMujDnqWVLaBI2g?= =?us-ascii?Q?EK0zNjb9HxS6OKUZNKOgso5akHd4yDu20tfRxkA637pzpAo7Rjgpjk51lmCj?= =?us-ascii?Q?+EHXbAGWDFZUMCW1YsxjTxGPDCtFgRd1Hsvscw=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM2PR0701CU001.outbound.protection.outlook.com;PTR:mail-dm2pr0701cu00106.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZGBQ3CiD4S7jBPBcrE2PlEsoH4GXHS78CwX4r10ql3Yt5FgorPc/IV2iClEVHsdugjQe1Pvkff98s4tYwex7W+uQQWtQl99a3wMugeGLYU1BshUZSkqaIiq8qBntxdjSOR36tmUdZ9JzqXywITzhm1zd7jVK/grYBO6fQgxId3QACwVOXL0z/Ej4JdWcQGnSpX2Rsi/cwDKTYTOouarazSn1O3B5gdAu6g0O7j+TCpmz0RBiW/b/w39OVelBLWlTn87Y+AcBNH1ub+/4lJphwa58TI0GS7UYgY0TCcYfKR1F15dVW2PgNFBBgH3sqfWnNaFKZ9GwSlcqCCq4thXzC2azX+fVnPb34ab++5hr7l7CDr5zTQObSVx1nrTuKc10xfYKq2JXr21QSOm2+JI/zrL4LW51u8D4eMUjyTEwsJs4kAx3Ux61bo0OeELk9pka X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:09.2141 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f49ddc1c-3c46-49a9-59fc-08de9f246af9 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CH2PEPF0000013C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR08MB6900 X-purgate-ID: tlsNG-4011c0/1776720797-81B878B7-ADDE490D/0/0 X-purgate-type: clean X-purgate-size: 10132 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720825393158500 Content-Type: text/plain; charset="utf-8" This commit pulls out generic init/teardown functionality out of "p2m_init" and "p2m_teardown" into "p2m_init_one", "p2m_teardown_one", "p2m_free_one", and "p2m_flush_table" functions. This allows our future implementation to reuse existing code for the initialization/teardown of altp2m views. On failure, the p2m_init_one function returns a null pointer. This means p2m_init_one doesn't return an error code, which prevents it from propagating the exact error from p2m_initialise (specifically, ENOMEM if allocation fails and EBUSY if the VMID pool is exhausted). However, returning a p2m_domain pointer simplifies usage for callers of p2m_init_one, as they can receive an allocated and initialized p2m_domain without needing to handle allocation separately. Therefore, the main p2m_init function will now return ENOMEM instead of EBUSY when the VMID pool is exhausted. This is commit 6/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Rose Spangler Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Added the function p2m_flush_table to the previous version. v3: Removed struct vttbr. Moved define INVALID_VTTBR to p2m.h. Exported function prototypes of "p2m_flush_table", "p2m_init_one", and "p2m_teardown_one" in p2m.h. Extended the function "p2m_flush_table" by additionally resetting the fields lowest_mapped_gfn and max_mapped_gfn. Added a "p2m_flush_tlb" call in "p2m_flush_table". On altp2m reset in function "altp2m_reset", it is important to flush the TLBs after clearing the root table pages and before clearing the intermediate altp2m page tables to prevent illegal access to stalled TLB entries on currently active VCPUs. Added a check checking whether p2m->root is NULL in p2m_flush_table. Renamed the function "p2m_free_one" to "p2m_teardown_one". Removed resetting p2m->vttbr in "p2m_teardown_one", as it the p2m will be destroyed afterwards. Moved call to "p2m_alloc_table" back to "p2m_init_one". Moved the introduction of the type p2m_class_t out of this patch. Moved the backpointer to the struct domain out of the struct p2m_domain. v4: Replaced the former use of clear_and_clean_page in p2m_flush_table by a routine that invalidates every p2m entry atomically. This avoids inconsistencies on CPUs that continue to use the views that are to be flushed (e.g., see altp2m_reset). Removed unnecessary initializations in the functions "p2m_init_one" and "p2m_teardown_one". Removed the define INVALID_VTTBR as it is not used any more. Cosmetic fixes. v6: Reworked to accommodate the hostp2m being allocated separately from arch_domain. Split p2m_teardown_one into p2m_teardown_one and p2m_free_one, with both having the same semantics as their x86 counterparts. The previous version of this patch also added code to p2m_flush_table. This has been split out into a separate commit to minimize the number of actual changes in this commit. Updated to account for the introduction of p2m_final_teardown. The code which previously was used to reclaim resources from the hostp2m during p2m_final_teardown was extracted into p2m_free_one. Now, p2m_final_teardown will call p2m_free_one on the hostp2m instead. The check for whether the p2m was actually initialized was moved into p2m_free_one. This means there is a slight behavior change where p2m_teardown_allocation will always be called, even if the p2m_domain was never initialized. I'm not sure if this is really a big deal (it does require the lock to be obtained, but this shouldn't be an issue at final teardown?), but if it is then I can duplicate the check from p2m_free_one to the top of p2m_final_teardown, which would replicate the previous behavior. For the sake of making the p2m_init_one function simple to use (and match the x86 function prototype), it returns a null pointer on error rather than an error code. While on x86 an error from p2m_init_one is always due to an ENOMEM return code (from xzalloc, zalloc_cpumask_var), on ARM p2m_initialise (called by p2m_init_one) can actually return EBUSY if the VMID pool is exhausted. Therefore, in this error case the null pointer return value of p2m_init_one obscures the true error code (EBUSY). Callers of p2m_init_one always return ENOMEM when p2m_init_one returns a null pointer, so this error will be propagated up as ENOMEM rather than EBUSY. The alternative to this would be to have callers pass a null **p2m_domain to p2m_init_one while still returning an integer return code. In order to preserve a common altp2m_init routine, this change would also have to be made on x86 (where there wouldn't be any real benefit, the return code is truly only ever ENOMEM). Therefore, it seems like an acceptable tradeoff to me to obscure the error in this case, but if other folks think we should handle this differently than I can revisit this. The p2m_teardown_allocation call and p2m_init_one return code changes mentioned above should be the only actual behavior changes in this patch, otherwise it should be just code movement. --- xen/arch/arm/include/asm/p2m.h | 12 ++++++ xen/arch/arm/mmu/p2m.c | 77 +++++++++++++++++++++++----------- 2 files changed, 65 insertions(+), 24 deletions(-) diff --git a/xen/arch/arm/include/asm/p2m.h b/xen/arch/arm/include/asm/p2m.h index 23df91ea13e9..5c6dfe4a9789 100644 --- a/xen/arch/arm/include/asm/p2m.h +++ b/xen/arch/arm/include/asm/p2m.h @@ -216,6 +216,18 @@ int p2m_init(struct domain *d); int p2m_teardown(struct domain *d); void p2m_final_teardown(struct domain *d); =20 +/* Flushes the page table held by the p2m. */ +int p2m_flush_table(struct p2m_domain *p2m); + +/* Initialize the p2m structure. */ +struct p2m_domain *p2m_init_one(struct domain *d); + +/* Release resources held by the p2m structure. */ +int p2m_teardown_one(struct p2m_domain *p2m); + +/* Free the p2m structure allocation. */ +void p2m_free_one(struct p2m_domain *p2m); + /* * Remove mapping refcount on each mapping page in the p2m * diff --git a/xen/arch/arm/mmu/p2m.c b/xen/arch/arm/mmu/p2m.c index 1009f10e5db4..1d598c66450b 100644 --- a/xen/arch/arm/mmu/p2m.c +++ b/xen/arch/arm/mmu/p2m.c @@ -1444,14 +1444,10 @@ static int p2m_alloc_table(struct domain *d) return 0; } =20 -int p2m_teardown(struct domain *d) +int p2m_flush_table(struct p2m_domain *p2m) { - struct p2m_domain *p2m =3D p2m_get_hostp2m(d); unsigned long count =3D 0; struct page_info *pg; - int rc =3D 0; - - p2m_write_lock(p2m); =20 while ( (pg =3D page_list_remove_head(&p2m->pages)) ) { @@ -1460,23 +1456,34 @@ int p2m_teardown(struct domain *d) /* Arbitrarily preempt every 512 iterations */ if ( !(count % 512) && hypercall_preempt_check() ) { - rc =3D -ERESTART; - break; + return -ERESTART; } } =20 + return 0; +} + +int p2m_teardown_one(struct p2m_domain *p2m) +{ + int rc; + + p2m_write_lock(p2m); + rc =3D p2m_flush_table(p2m); p2m_write_unlock(p2m); =20 return rc; } =20 -void p2m_final_teardown(struct domain *d) +int p2m_teardown(struct domain *d) { struct p2m_domain *p2m =3D p2m_get_hostp2m(d); =20 - /* p2m not actually initialized */ - if ( !p2m->domain ) - goto free_p2m; + return p2m_teardown_one(p2m); +} + +void p2m_final_teardown(struct domain *d) +{ + struct p2m_domain *p2m =3D p2m_get_hostp2m(d); =20 /* * No need to call relinquish_p2m_mapping() here because @@ -1484,18 +1491,27 @@ void p2m_final_teardown(struct domain *d) * where relinquish_p2m_mapping() has been called. */ =20 - ASSERT(page_list_empty(&p2m->pages)); - while ( p2m_teardown_allocation(d) =3D=3D -ERESTART ) continue; /* No preemption support here */ ASSERT(page_list_empty(&d->arch.paging.p2m_freelist)); =20 + p2m_free_one(p2m); +} + +void p2m_free_one(struct p2m_domain *p2m) +{ + /* p2m not actually initialized */ + if ( !p2m->domain ) + goto free_p2m; + + ASSERT(page_list_empty(&p2m->pages)); + if ( p2m->root ) free_domheap_pages(p2m->root, P2M_ROOT_ORDER); =20 p2m->root =3D NULL; =20 - p2m_free_vmid(d); + p2m_free_vmid(p2m->domain); =20 radix_tree_destroy(&p2m->mem_access_settings, NULL); =20 @@ -1511,9 +1527,7 @@ static int p2m_initialise(struct domain *d, struct p2= m_domain *p2m) unsigned int cpu; =20 rwlock_init(&p2m->lock); - spin_lock_init(&d->arch.paging.lock); INIT_PAGE_LIST_HEAD(&p2m->pages); - INIT_PAGE_LIST_HEAD(&d->arch.paging.p2m_freelist); =20 p2m->vmid =3D INVALID_VMID; p2m->max_mapped_gfn =3D _gfn(0); @@ -1559,22 +1573,37 @@ static int p2m_initialise(struct domain *d, struct = p2m_domain *p2m) return 0; } =20 -int p2m_init(struct domain *d) +struct p2m_domain *p2m_init_one(struct domain *d) { struct p2m_domain *p2m =3D xzalloc(struct p2m_domain); - int rc; + + if ( !p2m ) + return NULL; + + if ( !p2m_initialise(d, p2m) ) + return p2m; + + xfree(p2m); + return NULL; +} + +static int p2m_init_hostp2m(struct domain *d) +{ + struct p2m_domain *p2m =3D p2m_init_one(d); =20 if ( !p2m ) return -ENOMEM; =20 - rc =3D p2m_initialise(d, p2m); + d->arch.p2m =3D p2m; + return 0; +} =20 - if ( !rc ) - d->arch.p2m =3D p2m; - else - xfree(p2m); +int p2m_init(struct domain *d) +{ + spin_lock_init(&d->arch.paging.lock); + INIT_PAGE_LIST_HEAD(&d->arch.paging.p2m_freelist); =20 - return rc; + return p2m_init_hostp2m(d); } =20 /* --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720818; cv=pass; d=zohomail.com; s=zohoarc; b=SjpbY6u9AOJfemqf+lhAL3aDo6bJ/9Sl9Xb+l7doMt8c+OJ8zVlUKldgFTYC5hXbEbVt/LyRYIULUR8hjzRlczLlvt1/yxtQau+rA3Nr43dM4T6UWPr0LxqkqnyHNKeQE3IJlOKhhKOHzhH4nlYVJzBA+vrSkP4bCu3D9NyWbCQ= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720818; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qwOwmfrmWpA5bcreD0lLuuQUt9f7SqfexhLWTcmlGbU=; b=U8oda0SBrINYDkvSh7tMLW4tl9ZdqYy4xT5Sl/gQKgR390VVgPZXGHyVW6CQZBPpfLsWxwByDfK1s0FCg0zTs+8FciddPLS0RqiQLQboTY8BLSvx9tWc9DZysD/F/TtnVhzihHl5x4yDpJ1uLWqoVFvKiN9AvlRoFv48/4b1zaI= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720818014218.4274911802322; Mon, 20 Apr 2026 14:33:38 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287797.1568225 (Exim 4.92) (envelope-from ) id 1wEwF3-0002bO-6r; Mon, 20 Apr 2026 21:33:17 +0000 Received: by outflank-mailman (output) from mailman id 1287797.1568225; Mon, 20 Apr 2026 21:33:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF2-0002Ze-SX; Mon, 20 Apr 2026 21:33:16 +0000 Received: by outflank-mailman (input) for mailman id 1287797; Mon, 20 Apr 2026 21:33:15 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF0-00029M-UB for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:15 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwF0-0054Hn-AZ for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:14 +0200 Received: from [10.42.69.12] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b34-5cb7-0a2a0a5109dd-0a2a450c9236-42 for ; Mon, 20 Apr 2026 23:33:14 +0200 Received: from [40.107.208.128] (helo=PH0PR06CU001.outbound.protection.outlook.com) by tlsNG-d25034.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b98-62f1-0a2a450c0019-286bd0800b4d-3 for ; Mon, 20 Apr 2026 23:33:13 +0200 Received: from CH2PR08CA0022.namprd08.prod.outlook.com (2603:10b6:610:5a::32) by LV8PR08MB8854.namprd08.prod.outlook.com (2603:10b6:408:180::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:09 +0000 Received: from CH2PEPF00000142.namprd02.prod.outlook.com (2603:10b6:610:5a:cafe::b5) by CH2PR08CA0022.outlook.office365.com (2603:10b6:610:5a::32) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9723.25 via Frontend Transport; Mon, 20 Apr 2026 21:33:09 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CH2PEPF00000142.mail.protection.outlook.com (10.167.244.75) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:08 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHS00Vqz1wdS; Mon, 20 Apr 2026 14:33:08 -0700 (PDT) Received: from CH4PR07CU001.outbound.protection.outlook.com (mail-ch4pr07cu00105.outbound.protection.outlook.com [40.93.20.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:07 -0700 (PDT) Received: from BY1P220CA0047.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::9) by CYXPR08MB9590.namprd08.prod.outlook.com (2603:10b6:930:e0::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:00 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::43) by BY1P220CA0047.outlook.office365.com (2603:10b6:a03:59e::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:00 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:32:59 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:53 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=a7TZLtiFSR4tDQp767QRWFsD68qN24Y2qH2qa50NKbvXMnI8WOtm83uwds0VUL0gPx3DWVj5lTQXqYP+TgsgwpSBIzIerKImBO8EMR2t6glGCWBDSQen7potghdpqXWXL4jplqmn7jroqfDi2iwiYvrz8uv/uKbNbc3cnKBDXVjoIcab/Wq9ThZ6ZuhmzFsGWRupdhVVGgASjPsJOBbDVxWYWUDZgHBsmmuqgWB/GOPrMhULlwnjiDLNUFG54MPAq4hUCqlpROFEbII5vH3/CszPOG2j0ZY6l49RkpwbJqa6LMglkQx5QnD/IQ0SKTfJRhJimnlPwBa4jVIy9lcEYA== ARC-Message-Signature: i=2; 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=qwOwmfrmWpA5bcreD0lLuuQUt9f7SqfexhLWTcmlGbU=; b=lcL9T1TD2c7a0pQBOsgU/QRMrIV4tMPReLffNJGwaGrYwcEZL9VC+GBKeXwND3y6yf420CZA1tN43ho8k/fXq0kOWS05X4wD9tdkw03X4VOv6jRARdad93L4PKiOxPyS1fuJCxfEpRsYI4H9W1N4IH4YDZ5czyzsI5jnQMiv7MPRy9ivHjdaP9FcRx3wWVhc2F1+XoGHLytdv6lLFvMGlZNelwlzC/RgrJLDGoiP/W51HcG3lxBs6L/c0fVIET8XwtcZc3z/i22zrK67+d/omAGKm8tmiV/TUoLR5xu7sjLedu/B60Yj1rnoDYR4d6DP1twS84upFyaLOfjq6zResg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.20.101) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qwOwmfrmWpA5bcreD0lLuuQUt9f7SqfexhLWTcmlGbU=; b=ksT2aaUTFwGwiQFagv2YTQEUoexL7tiAWUi2IhMTuDFI90b81rHJIYz++452qUTUneXCUPcsb0DfPmtmi8KcehD8kKCjB0ZBaZ3w/X2QTyMHsi9BVBNkttr4ar5m/7rxBH3G24Oq+Z3GVy3OR9bO9ykOu4LzkZ4LMDNpvEFSlYM= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.20.101) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.20.101 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.20.101; helo=CH4PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Sa00R3fxZptqfAOJUKi2mVeeMohF0LVTvB+fhbtwn8jcitZUSuT1D1hVYIHI6SRt4+Q/ur56dkzjpeXHzl3kryZcbbOyVZa0+htlL5YXAdkY0IYsTG9WWfgipxkSySF1Tr4nvL1ICxd0VCcANY73vhFbn0NweBGlK6BteRSD7hFkl1XSlMTcWssGJS3OM6pdctMDc+jqvutk6tUT+nvvw1CJbzUNqE+J/m1MKWbtXd/qRABDzGBNZo7dd6xNN4iyZw7UnVDDRt9iP2eogUYu4f/dD2O1yhQtzY+qeuxw9y4HcKXQWpmzwSZhJky07m6cyf0JaMlQCn6wITEIYR9ZiQ== 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=qwOwmfrmWpA5bcreD0lLuuQUt9f7SqfexhLWTcmlGbU=; b=m+F7/Tf2/RApi8vHZRQk8vzsoIugBk5VccgMPPIQM+914ozn+k3pJD9yBFqESK/KYnfIoMRFzfq5UgtfAMb/+NswN7Y+eEG7xbW2NP4jT4kbDMOjl+gMfZfRPrHa6EPo6l8bXBKK8IUg2chsXsKm20GyMNEfmGmhtGlY7P9J3eIbgOfRA81IxvFXxFbpV8KatPKaIgLKb4VDmzJhvLYWQBBe5OFBdMDbGyMApxqtgy/znmKzlSgwRmngA5ru0jMSUY5vfhh+W6Q1xch5fzNCDkG/BvQpiC9LQbavWIl2Z9OGzKjJLV/JOtzD6nUffWtFxDXnvuDZ3hprPpx5yWA2Eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qwOwmfrmWpA5bcreD0lLuuQUt9f7SqfexhLWTcmlGbU=; b=ksT2aaUTFwGwiQFagv2YTQEUoexL7tiAWUi2IhMTuDFI90b81rHJIYz++452qUTUneXCUPcsb0DfPmtmi8KcehD8kKCjB0ZBaZ3w/X2QTyMHsi9BVBNkttr4ar5m/7rxBH3G24Oq+Z3GVy3OR9bO9ykOu4LzkZ4LMDNpvEFSlYM= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Sergej Proskurin Subject: [RFC PATCH v6 18/43] arm/p2m: Invalidate root page table entries and flush TLB in p2m_flush_table Date: Mon, 20 Apr 2026 17:31:41 -0400 Message-ID: <20260420213206.208750-19-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|CYXPR08MB9590:EE_|CH2PEPF00000142:EE_|LV8PR08MB8854:EE_ X-MS-Office365-Filtering-Correlation-Id: 00101def-7e94-437e-9704-08de9f246abb X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?OBLOtUbcCotZzK/gY2OBUpe69MrzMg85JDJc6iYaZHiSG/yBMBWzpfe1L7Hh?= =?us-ascii?Q?GedNrRjkKgJuvGvJfngkp9GxzddSdgwl7JojUOLqziM11H0DZpq6VopjjXmq?= =?us-ascii?Q?la+rxbbpnnmesjW3fH3N3e8ziKrVZMpYN42sLzToPXjaiVm5p7ngo0BaJQPd?= =?us-ascii?Q?KgBioJlzv9LENsLhb5rYKyGJzBeMpntOSjyaHrLRGfAKPnnbdYvUQXBqJz6R?= =?us-ascii?Q?AiL3Ngf0HlP4DlionH3f2ebv0citI3oVRWzEnx17cYcDPsSzSBlZNju3nP9J?= =?us-ascii?Q?QA7DWUsnjGjuFZDG+knHsffvEYkdkm9+fvhSlNTWyBI2nlmoPQPcQLqTlunA?= =?us-ascii?Q?r9fS4MCjvbjcvdN6/LZpnR2+4WAgQeSbY6/k8F3NSez9nMZxGtMDHxn7RmWY?= =?us-ascii?Q?qeDyQqlkobqexpjiog4LDe/q2CQDfkZ3Qm3W8vlLGvFAY+V87SEDRD2vCb3d?= =?us-ascii?Q?tq4B36vxr6+X2pfBgU1ZzR9S7oy3Cq/qr07Yb3yWh9wOVnLnmzNvohuJ2Iai?= =?us-ascii?Q?+2VzNHhFFCTnCTT6rsK+Z9/JV+NeYIM5t//TRNRp2TxDTI2LDXNvQQ+P6rQQ?= =?us-ascii?Q?mJBqfW4lUjBQvkyJkBIo0lnusrbh6xDj+A9aTIR5RCK6Dp1SaKsoBzvuzLBE?= =?us-ascii?Q?zNERxDaQzGOuGE/4IJa67UZFOrGeKsAuScZNFABtKDJ3JUHm42voV3GU1Uny?= =?us-ascii?Q?gZLX5rE3VxQ6BLMCUbBKSscMR0/Ponn8UPs1YIY286tg+EP2fLVPhodad0WF?= =?us-ascii?Q?3UmWkifFymnmPMRbXH8VUFkWfQ4LEyAaL0RnjQ35W0bKbSYbVXicBXkhLIEd?= =?us-ascii?Q?kUPQfZw+ofI8SfcR01O12YURzfuoBJZbph/lYshdE/iVRpMrG+514s1FqTIG?= =?us-ascii?Q?AtU2dfhUwJzdXp20C2y9XStoL+xlCsnioClwOUO/LgrxV4bwEZ6s9tqxCxtl?= =?us-ascii?Q?TaISMq+btCCWIps50Un1MZUorXlSyLZZzXFBvZF27rnjHJa3Cn1C+LFAvehM?= =?us-ascii?Q?QflDBIE5u2ELF6HhvRCiXR3wC0N0ZQLzJRBeGlvr6oeKzqXlT3P46PxCWK2+?= =?us-ascii?Q?s3lyNrp/AvQk8lM9TJWviGDwkx/WhQh/cBEOI4BODGcLJZY91yly/etw1j19?= =?us-ascii?Q?/FstasoaYfm7DKMOMQc5Vn+MsBceAEqSu4Fb7cSaLRmcm5Kp17rNgOz+Ba4B?= =?us-ascii?Q?CpiWYrttU2Nk64Uo?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: gBHHavtQvcstx4TgrXKKFWRdT2UgHPLamhW/F1Z6LUMV28sgDFUCldpd2IqscULd/8OhmbtT1D8cyU3VlKLpDPEVhtpLwr7pAq5lxXNK0vUNQcI5ymIm6k7hRzwe8AiqA6ZOT1X+krOgXdovrSfQzseGwv0a3qZuXdH30C63PQvENiD2im7lZoxXVcjgaQWPKXPvwmM5ZzXcJvkqNtKI0B0fVSQs8vmxu2aLXjEKk5LoVpGh3UmRW48g6U2nwXXQeozivcroei5ufD40iIb99o84CE1bv7guFoQe4Or2iWtMZmPYcYCH5+lUgmPN/lNmSt0iIeeaYLPFMu8yIaH2hA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR08MB9590 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.20.101];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.20.101];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CH2PEPF00000142.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4319dff1-bb28-4b51-c83e-08de9f24656b X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|14060799003|35042699022|156008|36860700016|376014|1800799024|22082099003|56012099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?95l3DgwesH9dh/CBLii9oEYNY6UZkudAnrCRTdJa6XO/wILS+Jzbz65qwulV?= =?us-ascii?Q?qsylstX8fOHJ0dfT2QY5dOProHk9z9yRxJQTQKPBcNqp2wFuWemTJUWGUfqH?= =?us-ascii?Q?rXntqfmFgnW89CtcBU+VoVaUO05ZDpIdvTej8GygubChpuaaL9EcVjCJDhWG?= =?us-ascii?Q?0j8fm2KDZbraVDyVWXwmN1QozzCwwi5YvNJzClkOwdPkkMiecVw8pDycQoxf?= =?us-ascii?Q?JAat2aHD3VDECIDiX0cyxpKTqmIFQcRy0eTrqKwQWAneAPCjBysMaTHBCDKU?= =?us-ascii?Q?cd5jeEaKNuwUdnqdNaJyy1OW3JgEr9BFTJTcQaQ/tlp2Hrf8SUKj9cd6pfmm?= =?us-ascii?Q?+mHo7DDcaXbZ4xoqL1wj3bQVb46Pp/yUCZ1qLBIIkoBuutnPloGKSP2sLgyT?= =?us-ascii?Q?FsCfPsi6p1S2r+8ueZwkswlXnhYV2AhTQdtWY4WSqK8kteTuzqKk4nZTXTWg?= =?us-ascii?Q?eBTPWimQU44F3zNgm6f4ZGSsfX/soH+QQSXFeJILEAr7uEw8f7SKKTjx4oIp?= =?us-ascii?Q?lygf+Ll+tMxwmMK4H2J6PqIOAO9evX5KiZzpEYMODt87GnJfi6Uu3ycqEmpe?= =?us-ascii?Q?+YdlpaF0u9rujXQh9MdNi+FBcoDha7bLveT4C5Ai4bGnt2ffXpdmoGtJImBD?= =?us-ascii?Q?3KJbY2sP3uEa8M1ai/pZMN5bpgwWnPTiXRlDAS5GaIIuLnSDooe/UGMhxOcM?= =?us-ascii?Q?2381YhItc6wWhK64k448NZwDErSPmeD2YWtQOL3xspJVmIdRE+sJrKeHdN64?= =?us-ascii?Q?lWrsKLsK0Bd9c3lN54DKMLYqi0exCLEZYeWAICtL5TFAb60S6k5BY6yUqDRt?= =?us-ascii?Q?TbDtPyvc4yCnyBRH34dReSetlgcH2RsotWA7GzB4uZuO0hMt+r8jbZJZeJ+7?= =?us-ascii?Q?pBHYCv4lWbo+fstnIIte35rWxZvJ00wHm2IHDGPCRVmokw/pCNnZlBRNw9o6?= =?us-ascii?Q?J52zVSZoQo+hX3LVJTFIsqPUK8+UmYNjTdGZi6j9SPLTQhfQLtPVPJzmKMiB?= =?us-ascii?Q?gO5ikKuI9mwTQA0P5YmMb+ENrYRmZD+ES/opafuG/5MYvJTEEJ01M2Pbslag?= =?us-ascii?Q?FcCI6pKEVm4I1hSPLvN5O8nz7TTnQildMQ8yH2uk589WAq5yF4XLfoPEqjyq?= =?us-ascii?Q?VilmHR4QW9KciJyLv5D0dG5qS0QbaJZzOxcl0qvT9t97h37/ZcmK20w29dN7?= =?us-ascii?Q?s0+dgIgZ73BDrEIu?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH4PR07CU001.outbound.protection.outlook.com;PTR:mail-ch4pr07cu00105.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(1800799024)(22082099003)(56012099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ej7dFzE95/mxjle91y5ZtkEL1w2ddUa/q0swOMw/TCSYmDnpHXrvAszO7Zc/9MshORWAYj5KByFS9jf+9dOWizThvl68udctGlA2QU8TAVlLbDzCBTaf1Yv28W2aXFU5dsEd2Eoz0VvuaRsk3uphTQpp6/y1+34PMUKzUPwR/F/0+aVh57w/HRfxne5zL/mXfdNvP0hw4oRwQ1aqrkgGhGHPW/7tJ2PXels9OWCp2h6FMPrE413VOI6xsYN5NjEZYExQ74x48Ka8xoJdlh4NrDATSQcr+ldVWZatMVaYmyJTPewExk8C0fYlxryaqZtl5H+2zIp0PMFUlVlsX4hdcy4TXHBHym7p2XQU3QY9Bh35C0sCYt6rHuvytujuL4Ds+3mSUeR1wQZulIdO+kKwbieH8gP3T1savTZ8m+CHdLE3EtcbzfJkikLN1i3ZxZ51 X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:08.8042 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00101def-7e94-437e-9704-08de9f246abb X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CH2PEPF00000142.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR08MB8854 X-purgate-ID: tlsNG-d25034/1776720794-6EB74CF5-E87EB8AB/0/0 X-purgate-type: clean X-purgate-size: 4874 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720820876154100 Content-Type: text/plain; charset="utf-8" This commit invalidates the root page table entries and flushes the TLB when the table is flushed. The TLB is flushed to ensure that altp2m views after being reset or torn down. Previously, the code in p2m_flush_table was only used to free p2m pages during domain teardown. This function will later be used to teardown/reset altp2m views of a still-running domain, so the page table entries must be properly invalidated. Additionally, the p2m_invalidate_root function is split into p2m_invalidate_root and p2m_invalidate_root_locked. The p2m_flush_table function already holds the lock, so it calls p2m_invalidate_root_locked directly, as opposed to the existing callers which don't already hold the lock. This is commit 7/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Rose Spangler Signed-off-by: Sergej Proskurin --- v3: Added a "p2m_flush_tlb" call in "p2m_flush_table". On altp2m reset in function "altp2m_reset", it is important to flush the TLBs after clearing the root table pages and before clearing the intermediate altp2m page tables to prevent illegal access to stalled TLB entries on currently active VCPUs. v4: Replaced the former use of clear_and_clean_page in p2m_flush_table by a routine that invalidates every p2m entry atomically. This avoids inconsistencies on CPUs that continue to use the views that are to be flushed (e.g., see altp2m_reset). v6: Introduced this patch. While the code in this patch is mostly new, it is the same in spirit as the p2m_flush_table additions in the original patch series, so the relevant comments have been reproduced above. In the v4/v5 versions of this patch series, this patch was a part of the previous patch. It has been split out to minimize the number of functionality changes in the previous patch. Additionally, the original patch series used a routine here which was nearly identical to p2m_invalidate_root, which was implemented a few years after the patch series. Therefore, the existing p2m_invalidate_root implementation is used here instead. Also, since the original patch series p2m_teardown (and by extension p2m_flush_table, as it was extracted from p2m_teardown) was made preemptible. As a consequence of this, introducing a call to p2m_invalidate_root here also means that p2m_invalidate_root and p2m_tlb_flush_sync is called each time p2m_flush_table is called, even if a previous call to p2m_flush_table was preempted. This might cause some additional overhead, as p2m_flush_table will iterate over the root page tables and flush the TLB before it can return to freeing p2m pages. I'm not sure if there's a better way of handling this, or if the overhead here is negligible/acceptable. I'm not sure how IOMMU interacts with altp2m here. I haven't looked into it extensively, so I would appreciate some feedback here. I've just copied over the iommu_use_hap_pt conditional from p2m_domain_creation_finished, but this is probably not the right behavior since we probably still need to invalidate the altp2m view page tables on flush somehow. Is the issue with invalidating root page tables when using IOMMU only relevant for the hostp2m, or is it also relevant for the altp2m views? --- xen/arch/arm/mmu/p2m.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/mmu/p2m.c b/xen/arch/arm/mmu/p2m.c index 1d598c66450b..51753bb2c34d 100644 --- a/xen/arch/arm/mmu/p2m.c +++ b/xen/arch/arm/mmu/p2m.c @@ -1271,17 +1271,20 @@ void p2m_clear_root_pages(struct p2m_domain *p2m) * p2m_invalid_root() should not be called when the P2M is shared with * the IOMMU because it will cause IOMMU fault. */ -static void p2m_invalidate_root(struct p2m_domain *p2m) +static void p2m_invalidate_root_locked(struct p2m_domain *p2m) { unsigned int i; =20 ASSERT(!iommu_use_hap_pt(p2m->domain)); =20 - p2m_write_lock(p2m); - for ( i =3D 0; i < P2M_ROOT_PAGES; i++ ) p2m_invalidate_table(p2m, page_to_mfn(p2m->root + i)); +} =20 +static void p2m_invalidate_root(struct p2m_domain *p2m) +{ + p2m_write_lock(p2m); + p2m_invalidate_root_locked(p2m); p2m_write_unlock(p2m); } =20 @@ -1449,6 +1452,13 @@ int p2m_flush_table(struct p2m_domain *p2m) unsigned long count =3D 0; struct page_info *pg; =20 + /* TODO: How does IOMMU interact with altp2m? */ + if ( !iommu_use_hap_pt(p2m->domain) ) + { + p2m_invalidate_root_locked(p2m); + p2m_tlb_flush_sync(p2m); + } + while ( (pg =3D page_list_remove_head(&p2m->pages)) ) { p2m_free_page(p2m->domain, pg); --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776721359; cv=pass; d=zohomail.com; s=zohoarc; b=Ux3VWtZc72Ngmr4E1eFt6P3hoX0eoweeC2RlLO4nRwXGMDOXzNKozSsauvyFt/28P0CMMY0gFvKXAkt8EC6ujgUP/LiEYAzApDoQ9bQkAiPB4NbM/BCLysBPOhPjWGk/tGtgtil167g5rk1c4ZLH5qxIsngVXqrnvyunGEnr4l4= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776721359; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=P5BPH7sP6wJ6lFk7/PYOh+kdZ73MBQ4NzGe07wqGO8g=; b=CuN9xbCYyXx4F29Fiwpv4yKCey74+zBwgBppKtpwoOowtyudj/GTB/b1EzeQjy1uqfATmpAjernJb04bKGYniitZxd/P99GutG4bH/z4JqeDVZ9solqQDtYgmU0xiF4EgKdLV42gfjbalvdKND+UNnWc6ntIAFWCvekno0XIrpM= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776721359339387.32831567162964; Mon, 20 Apr 2026 14:42:39 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1288159.1568475 (Exim 4.92) (envelope-from ) id 1wEwNp-0005ez-5A; Mon, 20 Apr 2026 21:42:21 +0000 Received: by outflank-mailman (output) from mailman id 1288159.1568475; Mon, 20 Apr 2026 21:42:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwNp-0005es-2E; Mon, 20 Apr 2026 21:42:21 +0000 Received: by outflank-mailman (input) for mailman id 1288159; Mon, 20 Apr 2026 21:42:19 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwNn-0005dM-G4 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:42:19 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwNm-001R8R-TB for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:42:18 +0200 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69db4-e002-0a2a0a5209dd-0a2a450488ce-2 for ; Mon, 20 Apr 2026 23:42:18 +0200 Received: from [52.101.201.91] (helo=PH7PR06CU001.outbound.protection.outlook.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b9b-1dec-0a2a45040019-3465c95b1a9a-3 for ; Mon, 20 Apr 2026 23:33:17 +0200 Received: from PH7P222CA0027.NAMP222.PROD.OUTLOOK.COM (2603:10b6:510:33a::10) by SA6PR08MB10332.namprd08.prod.outlook.com (2603:10b6:806:435::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:13 +0000 Received: from SA2PEPF00003F66.namprd04.prod.outlook.com (2603:10b6:510:33a:cafe::c3) by PH7P222CA0027.outlook.office365.com (2603:10b6:510:33a::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:12 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SA2PEPF00003F66.mail.protection.outlook.com (10.167.248.41) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:12 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHW5CKzz1wdM; Mon, 20 Apr 2026 14:33:11 -0700 (PDT) Received: from SJ0PR08CU001.outbound.protection.outlook.com (mail-sj0pr08cu00106.outbound.protection.outlook.com [40.93.1.78]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:11 -0700 (PDT) Received: from BY1P220CA0039.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::7) by DM4PR08MB8334.namprd08.prod.outlook.com (2603:10b6:8:4e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:01 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::5a) by BY1P220CA0039.outlook.office365.com (2603:10b6:a03:59e::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:01 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:00 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:55 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Q9GGR2iMHFupJ2wGN87cZMI6peSj96A5TKavGIJtSiQY949kuX5U1+eiyj7es+r3Jvpd/XuoifO5dG6VzujEQoZs0klmXhr4s9YcqI0CJa/4StWwT4u/yONr/XdXWYCMPGyvJdwa0yPFbz84ty9sFaPlmIS08Sq7Nnkbn4Mi9bsWcE4VOfLjupZzr+WF0r6RIVGdEoO1PX7sXghhm2iowchBAmlO5go3JUwvuFaXlBBlt+2OBYdh8oXn32DmUDloeWFkQKIZQhTThfNv1gXo4TghEcVOA5QZi7YbZtJSEPQUVM/sedgc9Pj7t7vmFrINz4xh6gA7r8FTKU5N0xfCZA== ARC-Message-Signature: i=2; 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=P5BPH7sP6wJ6lFk7/PYOh+kdZ73MBQ4NzGe07wqGO8g=; b=fczuNj1r8/3hU3Mu4wGR68bARppeC58rxZXSn9gC54JQ/sHlZ7GxLGhOenz3w3uTfjBX/rh8AjiSjKt3YOha02fzcrXeUAPAsVosIJ99MT1ofRtpPM351h9G4YI7Pz9Gw0zwnkkovlzzbVG5y/aIpdoZWFSYtQkle7LDOqXvoyXYsN4W4RRRV41f05DBVVcJ+q14LsdMSCg2cLDy6JSXrlJJoT7N55sNEafrlqnHj5BDRiZrvvZwuSff5PKfP9nqvQrZhlC96Y73ywJe9eAGRJKFDc+5KohjtHdi27nv4ioI26m863/LaO7A8t2XJQDda2+Tq00LktrweBWY4IKtJw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.78) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P5BPH7sP6wJ6lFk7/PYOh+kdZ73MBQ4NzGe07wqGO8g=; b=vrC9i3rF2yHDkJFU6gPPOeaz0X75QZAtd8zUAX/gc0bl+prAB4yEtjS8TF1i+obSox0KXOn+6wfumHHB6mpBMMhoNEaoprvdb0TH4hVFUZ+2aAD2Mj09va5WWkC2pzLd53oHy9jOUZp0actJn3iogxmLhqoiuRxFoiYQd8cRVDc= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.78) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.78 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.78; helo=SJ0PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=INHQHzFBus8fJcIy+9wDMaO8kXxp6QDPkg90YHfbwKWwYNykPmG4cX0VJSvWiP6G8H6yE+7/5OUTrM0AHJzwu5JFzCRYC9jaTwqNPXP8gfVSfekab5+8XpeTjZb4k2gAGxTvSzG36fSp5osZ90hbAMGn8KYfBhNcaGenwgP1cMaQLGAn9PGJelG0HU4Xk14v8sfrHjjtybIYZbM05Rjn3eelHBKErRLLXeX3g3m55mqe36MRk/Ru07BzzvKwAAtJgng2Vpl13LXxOgfz95k4EwjBADgpqKm3ADSiyeg1eeONcySBH3GLZiGJ0lQpJ9TFfoT2x6b9daURXkQmsi5EUQ== 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=P5BPH7sP6wJ6lFk7/PYOh+kdZ73MBQ4NzGe07wqGO8g=; b=YvftqaE+yBLYVKbhoRfpAdpJkE+F0zAF1dAWSM3ggXfmjoVLlgO8dpCjz/ouDaCUV1wJeKIsyG+dOB3d8PthmHQqhkii8DnYmAcanvP39fTwePF+olcHREadf3FcFAJff31GK63l9iCSYt7lQmZPEbqNUKY/WBQ67GbajSFozx+s4txQHwKaN3TVui+omo5Ze3QxB6IHuV4NhwJmSLYLmNSqqgUwzOex7cAyOfvnp7X0IhR873LYnjkOkif1fbTx4sXRkYiigl3wxDe7VtCyGzK4GNZtheJZH+gHKp1REQYIO7agZibbuitvQ46h6JwXH9lG1nr+eFxjJ2ne3qk/1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P5BPH7sP6wJ6lFk7/PYOh+kdZ73MBQ4NzGe07wqGO8g=; b=vrC9i3rF2yHDkJFU6gPPOeaz0X75QZAtd8zUAX/gc0bl+prAB4yEtjS8TF1i+obSox0KXOn+6wfumHHB6mpBMMhoNEaoprvdb0TH4hVFUZ+2aAD2Mj09va5WWkC2pzLd53oHy9jOUZp0actJn3iogxmLhqoiuRxFoiYQd8cRVDc= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Sergej Proskurin , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Julien Grall Subject: [RFC PATCH v6 19/43] arm/p2m: Change function prototype of p2m_alloc_table Date: Mon, 20 Apr 2026 17:31:42 -0400 Message-ID: <20260420213206.208750-20-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|DM4PR08MB8334:EE_|SA2PEPF00003F66:EE_|SA6PR08MB10332:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b190bcd-d176-453d-8c40-08de9f246cea X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?EfxR0ne5QgkZ/z5KX/JxXkKXtjt1B6sw9bYnKC8HSfu/5AXSF9n85ETwyXv1?= =?us-ascii?Q?PQj7CDlkAh+W7nx6hT/A5lRSNTPiX6JptYwnZvDAVN8qOWzvv5ukL/G+RY05?= =?us-ascii?Q?VPWKNatCZZYtnaHi5xXLh64RIG35AVwO4q44LBEUEpo78sdFPHoyzuWJjstR?= =?us-ascii?Q?YEErF2NUvX/gZeTVcA0TW4250NjXpfxn3b4iM+o4sk3fa6u8je3PikrvHGbB?= =?us-ascii?Q?TqqkO5KUOPyDCFX+Wxwd4VoTP7YULpyLHtqbKv05B8e1Mj69ld3oWozPl5Gq?= =?us-ascii?Q?n0bebvqXTTNROmvQfEBeXgSrjiwQyz+u3r6dsgNdSkUiH1AisNacLUJTNw9t?= =?us-ascii?Q?QUjJ0BVF2R4V+UOhu95r/tiPNBLT50Z06JJTD31QLqtLUBnGZJq6vGiDSEX4?= =?us-ascii?Q?42AwOATbmaoGBAX5IT09ux4PgFS1M393HfL+mEh2imbhgS2TKL0kRHzEJyxF?= =?us-ascii?Q?YtjIgnxWudNjIxNYyBCocHooIhoLm+gX6bC2m7WuBwUsA4QM8tFE/HiQs9fV?= =?us-ascii?Q?PYHUor/2kuEyvxSDDmazTa7R4kBMhF7HWgs/V3YhpmyeTjJPwDBcAvpXSv56?= =?us-ascii?Q?/ZolF6QHPKhjiqvZ/2QgwW/SDtpJJXJzOpsa5zxmdei7uNTIiIeIN6xxmaC4?= =?us-ascii?Q?CYqXL2tCmjQB/3qdgl4RqYA75waxMLGCsF52PcXU+Dv1sl536tHdV6Z7oIPy?= =?us-ascii?Q?usb9pge28W3zjsLvHDFZaVXOWraDriBV9NbCDMKfsICXmlZ95w4nwUdliES0?= =?us-ascii?Q?cIBwLjhi3NULn6zE3e6wlhatflvz/G1R6XsyTiKFSvujr6srmYVtB3xSZxbH?= =?us-ascii?Q?AjEKPfuZNTdzqAjsLEC6CZhkZsxGP/IJrm/Gzd3WJpGs5mTNMI6pYWwip2zF?= =?us-ascii?Q?tKMFAfpy03vpkL1X0gjy4hTUMn+sPlkg8cUuFAeLfzJ2aLlrONrfk7fwxYV7?= =?us-ascii?Q?MQgcYQ7s6sD8snClRa3GIXpNIOueRYjA0gcL9T0BnHflmsXuDxbmxhFzWLS9?= =?us-ascii?Q?P+PPPNPzKTGbhxI9Tzw2N5PEh7dIksN5NXb6aSIfCyPHU8wZLcK60dBNmmQH?= =?us-ascii?Q?FNd4MlHyRg7f3j2cXJw4ix+itHmcOd9qfx7sMq0naArkZBr4uTSItJKeEk7B?= =?us-ascii?Q?yXagJbKRxeD3TWQ9191VSg8xDgSNlwTgU60WNdTXBUG+26ehCJyPZcbEnRiS?= =?us-ascii?Q?0d+pLwHEMt5BK5w6?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: TvyhFok86wBk6XDQxer6ElThbwfEMkUP4/uT7xnlvw2A7LJHnnQpULdzV3PvNh5ej8inf30//Js3aaoHO9zpcAo0wTMyfJZ/HlVz9V1FjTsCNts72EVUBqcq2fh4HufHZAWErvBPn3KHb5bXPPC34C7B0uZDHl036JLsISpnArYu1OyfOtJQBMfvLLwGTKPd3UW8gEF6vtFwW5bMojOlI8fbYn/7LgGAzbEcLBGjGmSWjEXrHFu/aIBJ7UabUnXDYjg4FkGL2NUaHsjwmx6Y4V4UkmQK5nDrrzoCk0AR5Y2cZP6rLIL6Lagp8HIFzwpjpQ/CXrhHn6aLiy+swHArJQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR08MB8334 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.78];domain=SJ0PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.78];domain=SJ0PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SA2PEPF00003F66.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4ac4f3e7-76ac-4414-4cdc-08de9f246607 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|14060799003|36860700016|35042699022|156008|82310400026|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3z5apNUBMCggOxwaU04D4Xg4AT1lTqHiJtF/YZbISoe00mAKOmJywQu6FJzp?= =?us-ascii?Q?3iBlWuuIu339mTGk/XIW3rpHJfZyvIJDE2bJpQ5nPnO17185NCPj9RBWkPip?= =?us-ascii?Q?OLn6NQsKs391GRoRoK3pZuukySX39B9xcFT3RcqFh+rU5k68mwVbn8cJSLci?= =?us-ascii?Q?sKUskgtaTbTJKJu76wkc4NZ1MDa+gY0ZnxILRIIBNNk1SV49vazqb8qqGT2d?= =?us-ascii?Q?4R13e5urbs6ujW4EnRIZeV+mHImzwp8laid6IlED9GCP4gRYR6RfYc0GS8+y?= =?us-ascii?Q?c3e0/dEs0ZAIQ8JuLYr0ZtckgPIHlAOKLKj3UyBUP7rPf4WUhOyitg2BZUnc?= =?us-ascii?Q?T1ntOfBggAGqI9LrdYdeQhM90nIBB7Mc5ixo9juhCgRZ0X01MntdgWRzx8qf?= =?us-ascii?Q?PWhKExfgMVPsl03+2XQQiPgo+p/zy8o8QeHhgbGvxKNSGLA+wNs29E/sVhG9?= =?us-ascii?Q?2tF2PT9dELrhdhxenUeVAeX9muOaZOeeVuVeQkBDoutcxpL4DO9ZqPlfdEDX?= =?us-ascii?Q?ohVmKyTTqzvUb/6tYMGJsIl9YiWjZkVbas2Dpw5LsYLXLt0pFb7fi/EfKRS7?= =?us-ascii?Q?xtSDE+b0fZEPWpt5/6gplGzdaPCp+M5PvQio9bL7H4MvDb3Tnfawo1Nszmpb?= =?us-ascii?Q?8NqPmplL4A1DVTlUcTEnU91TzPVcKo5tgOSuzYjXJCw4pkhWiTHMSNGYJgPP?= =?us-ascii?Q?U6cQ5S0yySoWcS8FHhdCJhyfMI6NJ5JtdlBkhHuPT7+wCInwBCJu1JAbrJC9?= =?us-ascii?Q?LXC8LSH2HT7aXxoKU5saY6Se51s3SEJl97SrNNxhI8mQToXff5YV9RKGqNWu?= =?us-ascii?Q?MhkNRzEcAEdG7taY2uPbWZ9428UUdxKSW2Qx7BIaF3U4Xy52PwEaKAFxsc2c?= =?us-ascii?Q?cv6rarwukhllg7sHeklcTPQfgkUs3zH6vypM7j8Mg2hv4JVHkkbbzgs3TDcT?= =?us-ascii?Q?TF2tttf7dy9f/AEI2dS7YTAL7XZ8n2xKo6NKR2S3pB1XDAE+Ln9214IjnaDT?= =?us-ascii?Q?Ics9N2wxGC34drXoPMaaYOMv0SjlPGWCRf4kw9nGsRiy29tG4sMNWrfyH1p/?= =?us-ascii?Q?bj4mDnVzyanqOYzEId9pHA5t9CwuybTqhsmhbz+b1NVW7rbO7kLlHtD5JI4S?= =?us-ascii?Q?0VXVLvKuo/I0VKjzxNkJvqx1pWaYi8aEj6wuiuJEKszNAbmGQhlpgWehYXdf?= =?us-ascii?Q?ZYCtRDhALF7jF1Iu?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR08CU001.outbound.protection.outlook.com;PTR:mail-sj0pr08cu00106.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(376014)(14060799003)(36860700016)(35042699022)(156008)(82310400026)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3EhjpJEHMQnct9dyhsV5u6R1QwxylZ6yIouDcbYOinsikcZnu2UXbeLdOYDNU7DhW8h9rOQ04Q4vvEXJZUyZguKz5XUAl4qFoVNPB2dVMoZpYLoFaGPtL8AOZRNjRKbV0v6qxvl/r01d9uq2U4SPUdCRrzDy03o1O8RywoU80CZEuGGOo3Qqh+Ykuw3hQI/4nESw9AJCzBkhodFWTXh9+5zCD7eaHsFcZw9j0wE6LHAR9RGDL40jIzKRbXBx4Bftmj011iEPKyWtJ0cG/51r7kuX9J3HFqurjbBaN5MHjPL9NZ/rMlRFDn/EncXoSBUBpIeg3LVdZLU2louK9scxLCs6JknHpkvkWwA+30ZtYQwg8WW2wyVsYFs7nUsxpljGw2Cp3z6DUDmFmAZExHE5ObprMTq/rAJdYvpT/4wQYNS8v+E9mOYuo+NZCBgJIH+G X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:12.4667 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1b190bcd-d176-453d-8c40-08de9f246cea X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SA2PEPF00003F66.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA6PR08MB10332 X-purgate-ID: tlsNG-ebf023/1776720797-4B7693FF-7995FDB3/0/0 X-purgate-type: clean X-purgate-size: 1589 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776721361519158500 Content-Type: text/plain; charset="utf-8" From: Sergej Proskurin The function "p2m_alloc_table" should be able to allocate 2nd stage translation tables not only for the host's p2m but also for alternate p2m's. This commit is a refactor and contains no functional changes. This is commit 8/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Sergej Proskurin Acked-by: Julien Grall --- v2: Removed altp2m table initialization from "p2m_table_init". v3: Removed initialization of the field d->arch.altp2m_active in "p2m_table_init" to avoid altp2m initialization throughout different files. Merged the function "p2m_alloc_table" and "p2m_table_init". --- xen/arch/arm/mmu/p2m.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/mmu/p2m.c b/xen/arch/arm/mmu/p2m.c index 51753bb2c34d..f546f63f2489 100644 --- a/xen/arch/arm/mmu/p2m.c +++ b/xen/arch/arm/mmu/p2m.c @@ -1426,10 +1426,8 @@ static struct page_info *p2m_allocate_root(void) return page; } =20 -static int p2m_alloc_table(struct domain *d) +static int p2m_alloc_table(struct p2m_domain *p2m) { - struct p2m_domain *p2m =3D p2m_get_hostp2m(d); - p2m->root =3D p2m_allocate_root(); if ( !p2m->root ) return -ENOMEM; @@ -1576,7 +1574,7 @@ static int p2m_initialise(struct domain *d, struct p2= m_domain *p2m) if ( rc ) return rc; =20 - rc =3D p2m_alloc_table(d); + rc =3D p2m_alloc_table(p2m); if ( rc ) return rc; =20 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720824; cv=pass; d=zohomail.com; s=zohoarc; b=Aj8xcnT4tAUk8zJGzSJmb49ZHNJGrKFOgefH7HrQkWpUr9eSUmNx7krm4piS+OO0RtNxjn76pfKK/Y6QVSo/OVwN7y88AQ2hrvqXCbXxIjsNVnVWAEJbGs+Ho/fwK4DSlxx2QrAnf4QTk+kH6ZRADIfvOhkhzCN/FK2ttNr3oKM= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720824; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZHidNjasS/JOgBnj6tsz69bwCge0ojtPt0VVEzO0kMs=; b=f6L3dIH8cPCraFIaEUKTOdr9MIBxJc36qWbM4bBZ/5qQbqVB5n43g/XapqPo7yWdFEYe8qTYCaLovkgZk0pvPtdwAkZqS4ecy96PMmvkm4VfvWu9YVBe3xh22vJZ6wukxQLZsNZLl+HLRvILh3djyhk0qaiXkqgg3njJ08pwsy8= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720824765805.0825358500084; Mon, 20 Apr 2026 14:33:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287793.1568220 (Exim 4.92) (envelope-from ) id 1wEwF2-0002U4-HZ; Mon, 20 Apr 2026 21:33:16 +0000 Received: by outflank-mailman (output) from mailman id 1287793.1568220; Mon, 20 Apr 2026 21:33:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF2-0002Td-5b; Mon, 20 Apr 2026 21:33:16 +0000 Received: by outflank-mailman (input) for mailman id 1287793; Mon, 20 Apr 2026 21:33:14 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwEz-0001uU-Nt for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:13 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwEz-0054Hn-4x for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:13 +0200 Received: from [10.42.69.12] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b34-5cb7-0a2a0a5109dd-0a2a450c9236-40 for ; Mon, 20 Apr 2026 23:33:13 +0200 Received: from [40.93.201.80] (helo=CY3PR05CU001.outbound.protection.outlook.com) by tlsNG-d25034.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b97-62f1-0a2a450c0019-285dc950253f-3 for ; Mon, 20 Apr 2026 23:33:12 +0200 Received: from SJ0PR03CA0038.namprd03.prod.outlook.com (2603:10b6:a03:33e::13) by DS0PR08MB11092.namprd08.prod.outlook.com (2603:10b6:8:301::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.30; Mon, 20 Apr 2026 21:33:07 +0000 Received: from CO1PEPF00012E7E.namprd03.prod.outlook.com (2603:10b6:a03:33e:cafe::cd) by SJ0PR03CA0038.outlook.office365.com (2603:10b6:a03:33e::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:06 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CO1PEPF00012E7E.mail.protection.outlook.com (10.167.249.53) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:06 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHQ2fmgz1wdV; Mon, 20 Apr 2026 14:33:06 -0700 (PDT) Received: from BL0PR07CU001.outbound.protection.outlook.com (mail-bl0pr07cu00104.outbound.protection.outlook.com [40.93.4.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:05 -0700 (PDT) Received: from BY1P220CA0047.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::9) by BLAPR08MB6852.namprd08.prod.outlook.com (2603:10b6:208:331::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:02 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::c6) by BY1P220CA0047.outlook.office365.com (2603:10b6:a03:59e::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:02 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:02 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:56 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=MlNWI5nNE3RE6aKNHeg/geAHl/M/5+jk0szZEvpHN/4IBg9VhgjGj51PjooPA7smhynqT5OL0SIBFY1r/V4KZtxWCcT2Kp9Hnagwp8LnaLZD3eFU25NvAWKmE90Y+OndLPtH+n6KDE7yKScVCUYnC5hc9a6Da/IM6rJ5VBWq/9108ZOjcfE/kSuauPHI9S5bmMANWLxW4LuVA1pWyP5JyftbK03KK42/xVDnw0WW2i5h3fa2COj1k0eL4A1hHqUyd/ekaPju6Qd92B7SvMq4LyWMtKRQwVTcouAz36nHTeerIiim6p/+8ZiRfLns/LgwsMNmA3Ifuul1+YtZXPhTWA== ARC-Message-Signature: i=2; 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=ZHidNjasS/JOgBnj6tsz69bwCge0ojtPt0VVEzO0kMs=; b=Jw9lXaRLkg+1af7OOooanJO5wZVFgf2qHFqeFZeBXX+doLNv3NV+qdphEJXi8KldzQpejlU7AoHaElTjwk+Jfr7037eI5efZDecdtpUhBIg1ndMkOCAUpMaNuqT7Fwzz1ZgJdfbrYj3rQksf8Doy71ux5vUASflrGL1/jIxSocxPZiH+rErVT7EAy9MFgHlEUmsk8ViSsVi131WwuOqslSR1smMouJM+NIV22zvasr9XR0/NR46HqIDp+iSL5c8xiIpAPAAoxJ46bj+Xbgml3KNdOIi1wRFYL8JroCGkbnsk5z+ZOIxcxaRxitFIOYyVHMa9hFaJH7PaFhEjrP7xZA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.4.4) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZHidNjasS/JOgBnj6tsz69bwCge0ojtPt0VVEzO0kMs=; b=uSJH5wr0uloETPFnd9gFrSm31d+hspPeWODJ52Vmps04HX1MYvYdOp4uB3C10ElHTC0IE3V1wJxYzvT4YLHC3uSKTOj4u2d+zT9xk380Fv2fRjAvu2Tw1Ry2xAlTC8jVErttOJsfTrZwjdC0QMhIaE1v7GrnoTO0m6/BMQ92kuI= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.4.4) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.4.4 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.4.4; helo=BL0PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qpEZrF+2GDJOzKRjO14OL6Wwue0haqy/vx99vrUTXG7xgyl82OHNfe8xZ2qVWuSqAXxgvDMlTtJ0T4KNPoNnQA2YvmWNQrMb++V3t75G3EwZ70MaeVOg8Hgxqx9OPEWIrliy6BR1sLczNsRch1KXRRNDyLhQc3bHepnWH3ujinj5GNJXQaiGz2TnbF1nRw3EglB4WUr3d56h9+Y2///iintGnaqKRBU8Vaxu3ifmjHLP85SYDxMMLwxKfTF5NUoawj16n0y2CoQqKBe5iCT6wsKY1/Zw1N+mhCaPhDBS7BZ2PXBH664P8b1TI3nm6rOjD1k24r2HD8shr5Vu82Ullw== 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=ZHidNjasS/JOgBnj6tsz69bwCge0ojtPt0VVEzO0kMs=; b=wTVlZNkUgQnibDEvrzMvcqhNvxmjKyE5EYSMalNJ2W21UBNRUtcCrAOQU8u6y252uP6YQ9pgSCKmbn7NoStntIEY775YAqbx1qM3hq033CBcAfRlsEFb7KhWA7KnHWGdo76SxEwbX/KwqN/WuCAXiX31As/z5XH4ZTrp8iTCnCc4n9bVQv6uk4qXr8Ldmn3oDY3cz/X9ALikFKSYSBMxTvf/9exTufyTN4k+DJWEQ8yNRzjYoRaR8ieQ04IJTYuvnwTk0MTAqbCvBLBI5EfWbIxk46e/Ex/l90HkJwLiRJ40mlT/mGr1ugMC/dkW9UW8jEgNduQXYuL3bFVTvW+9Eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZHidNjasS/JOgBnj6tsz69bwCge0ojtPt0VVEzO0kMs=; b=uSJH5wr0uloETPFnd9gFrSm31d+hspPeWODJ52Vmps04HX1MYvYdOp4uB3C10ElHTC0IE3V1wJxYzvT4YLHC3uSKTOj4u2d+zT9xk380Fv2fRjAvu2Tw1Ry2xAlTC8jVErttOJsfTrZwjdC0QMhIaE1v7GrnoTO0m6/BMQ92kuI= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Sergej Proskurin , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [RFC PATCH v6 20/43] arm/p2m: Rename parameter in p2m_alloc_vmid Date: Mon, 20 Apr 2026 17:31:43 -0400 Message-ID: <20260420213206.208750-21-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|BLAPR08MB6852:EE_|CO1PEPF00012E7E:EE_|DS0PR08MB11092:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ed352c2-cd49-4ded-825c-08de9f24693b X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|36860700016|1800799024|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?RV3itJdLwC+xtypdeFrwPBWWZMPj7x3cbDrt701fT+k/V3PMLXclRkBtv0/A?= =?us-ascii?Q?OecuaNc7zFRd5ER0pwiqbGRr4KbPS34dDB85lIF77Nv4DakurWXXm7dQ9Klv?= =?us-ascii?Q?cPWcqzy0tuQQEVgNTKuo0cv6fpLWmpUnKIwVcxZ09wPWGKJYREqBItOiuTP/?= =?us-ascii?Q?aemFPe1TSWUwJjbAlnaOlVjajFOYvY64s/IeHX++Fzux8UMqQS6NaKeJZsce?= =?us-ascii?Q?EaVZ+wsMKSCe3OwVeYrwDIft3SX/Up+PkuZFFZKSDo9soqw40v3/uJo716GP?= =?us-ascii?Q?LDhOnNJhrrk9tNIiqeBZDMvEZmdyrxIsETlqgFXyIfkV4hU59z0oDNQA44WJ?= =?us-ascii?Q?ugU1sewJYh9H/TbWdqWihw93KeMxcmN7Fl2ZgNo1D2GzECDhQDA9KXAs1dZY?= =?us-ascii?Q?K8VDuzlr3+FyhDJfKm35GgfC0/7QxEehDMJVta4Q26WKFUBbvh+zV8mnUFXR?= =?us-ascii?Q?uQtLgQIKzayllWcF5JcwoUrtsdlF7Zy+l3gzdXZ8VQ09VEyumm0faXdXOob5?= =?us-ascii?Q?WoPqOIWh3bff4ZG6n8Sm2bXFyrqZsxHGZhVHBgHRmv6r92eNRMh+38eJ6NJA?= =?us-ascii?Q?LKG6JJXuhxBzytiY4gMw3SZvB784zNlXgGSp5BtQwUCcjgNri/KwkK3ZEDmU?= =?us-ascii?Q?sSJ1v3kW3cQxDB/yZOwv6dNgPZxkDhyPCU0p0jFLSopN8SLUPYZfUH5OCGEr?= =?us-ascii?Q?s1IAy9AXs3YBfUS++yBrvxEOxTyBmravA8WvSeF2tfMefhinJHLcCLr4STNv?= =?us-ascii?Q?CWt3R/rXdQ6S2YYjIVKDqK5k/vl1rYg4m2TFq1oJBJT58T0xlR0Usbm0s4h0?= =?us-ascii?Q?KwyxrPj9wZUAg77BXN+HE3/vgSKeQwkKskeM+7Dw2rnDbZXeFzdZN5ud2y+H?= =?us-ascii?Q?hB3v//1GomnA5EtOL7vovKgoXzWXXvzO6k1xF6mUgQ7y7eqAtXWH4yqnpXC1?= =?us-ascii?Q?dBl/BIou7JjBXxiNhbPPuy7VMwmLRqtK2v5SH1V+TBdkaZqbtqzQRO5xcA1z?= =?us-ascii?Q?G+pXYOk/5nXDYw9Bc4z61hRasMMMqqvSingQ/ebuBDo4Z6YdzBG1LMYCQhz2?= =?us-ascii?Q?crrN6kICDw3ftYGqQe2ReOZUJ/T9wo7GHCubliyImNwY+jVCH5w3PUSU2RrB?= =?us-ascii?Q?ptEMqMX0YJLuLqHVx4pvrGEnsv+Aoakrnv9dSx2BQmCv/E9AL7fOqKm1XTxD?= =?us-ascii?Q?tl+0SZvhxOp/h6xWgFTravg7+XVHLVdVa5TdGiNe4WGYoJ5Kcq5UWbaZw4Q1?= =?us-ascii?Q?hEqn4/31AZfi/tmsRTnrsD0RqLoa6etdthPfjxpFmw=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: cFNub0Cp2Gu7LAkWsjBdyPEE8JRLYR3KV6eAuL3gsXHhxML3WOZuN9ZckSZZfXn38ufk4L4wFloL/TIreH52aDm+zlUYXIj/gPdf+MYbRzpaxJ/7jZlbHc6HrLvqo7zzIdRqN61ywK0hEP7HR1hGHROqmVGPQ72p6BITI/fO0YZtrImHn6IlCSS2JM+agbe/OoWdRgKF//SdByApV4RZKPXFtn8Adrm0IaL0da7mj6w2FnKnaHCKBlJM1gOuGPzYAK+20yPtGkWwIfqiU7MLcQehJXrwP1Hn45jxrdu5XU9MIMTQtNxy3EFmjaZlvm6iemhsEEerx2pLDWiu9quiBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR08MB6852 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.4.4];domain=BL0PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.4.4];domain=BL0PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CO1PEPF00012E7E.namprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f11dc2a4-5827-49f6-a9ab-08de9f2466b9 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|376014|1800799024|82310400026|35042699022|156008|14060799003|22082099003|56012099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?qog8p/QUADAZt4oqzKBsBtZ1uVUg94eZSJTF3IpyMK0GPaIQjBLtiXkCcHEH?= =?us-ascii?Q?uwcDL5KWema4LU4oo3M8LZBX6ilMqTuQpjvkErEyTd9PR6uQTxCImOSwmPmA?= =?us-ascii?Q?Bzh6dpdOEa6WVNaLipYOHyCXGwYDkAV9ZZCUG6kVNoQknEi3pzKSjND5OO3X?= =?us-ascii?Q?xnZFZjtb7OjimD+jHwpurf+pxBZjfeGMk5OuTzsfzViLx5diDm4v3apGtdMi?= =?us-ascii?Q?4HXClCWIq1A0m0N0yIXomhgUlld6t2b6vezmpG6XP4NTNgsu+46q8Fluf0S1?= =?us-ascii?Q?2X7fzv8zlvVyma/ML+5XemZTS/w7ZQ8jIuiSO5+6WX31V1f+BpeB7i2FjjZr?= =?us-ascii?Q?EMlZkf+CS4p3HYNxjwHgubto24tKa73yOMhNAfhA+TOwdaJ8X7KZRgrJ6qCp?= =?us-ascii?Q?9CU2wNJnj6Fz2JaWx6b0hZGtXQNkqGigbB4yCTIesKpX32XE1la1VOQ9tGk1?= =?us-ascii?Q?nEQy7Eei89bhSYGNqwB9PI0LU0RqSCr4IJL/FYTuL8mBhlP4jXyxlTIHWJVd?= =?us-ascii?Q?w6VGFN9tVGjGo9T2PfdcZqXO3n0hFlWPY9CnbxzaBjZNhH2E8l39/yZanfk3?= =?us-ascii?Q?W0NixZUQNe0wqlwUsShWOXcqfx64hU7wOYC1ZK252V/MtimRBtRTlPXbscXi?= =?us-ascii?Q?tA/liwjzj4GGGTjqhcBYyWybeKf0J9juZF2V4lMqFzrhtCFB5MMnMvrtQZNR?= =?us-ascii?Q?yfTLHlmthBf9EbNJU5LpMPs/CvZ3qY8+mDCBtkeSKhZ12VidFCsdcjbNThhR?= =?us-ascii?Q?Dy0vJOBWLABcEnHo2WL5K8SbqdYKa+vzO8dP35/fiMcDTILJQ1BxXHPDsalZ?= =?us-ascii?Q?l6Obv9Wxv5otQQIcHYRXiHWyMg2xMMxiLqMY5WdegSHoPDvweWb8Mnw34nrb?= =?us-ascii?Q?Jbg6YZ5H+nh8p+TZEBAzJu6OvbCzsJeS4zaSDra/AVaJrLnjJn6i/Lakiyhh?= =?us-ascii?Q?JuM85QwP6Y+VGiZJDsflUqkW+G3GPyKXc6sXm/jmdAytWax9L3cWvOTG7nUJ?= =?us-ascii?Q?lvN1AvlM6nYsywEyBcrD5tLuh/83IDXUmOUb2eUv6/mmvhcqbuh4pTA9v202?= =?us-ascii?Q?haRAzTZvgj3TMoOiq1hDpNAPpHHeyTaFEr8LqxEnK0c9QCVId8vMeYHVZxqH?= =?us-ascii?Q?hU7AwiPsnxNLVbnbMGvZ0z0VqmnnhAPh+mf1z91Z+zZF7dVfX9WANkK1ZBp5?= =?us-ascii?Q?Z5O2b7sA8hXfPH90QYxZBHYuDhTbb+elq+NHRUyXbCJ/BlSowzTc4qOT5UcQ?= =?us-ascii?Q?HAYqQeUv93dJrZV6y6I22GPJ9C51fv57g6hXqBLzjA=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR07CU001.outbound.protection.outlook.com;PTR:mail-bl0pr07cu00104.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(36860700016)(376014)(1800799024)(82310400026)(35042699022)(156008)(14060799003)(22082099003)(56012099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8KgcZSACfPd7weUTJxqfV2C/MBSRX64PZUhHEWZp4k2oW30eo5D0EO1i1VKbWBG4Ca78tbCbLlV7gR+HXPUQDJ4F2erP2XYrC/BLbra2owj01dHh08YYIWFLHta5z8dmJ47h4GlAHRJXg9yjxoDsU83pA2AqaqlN/9MWKidV9Z0K8ibiqPNaN5SwVIp99wzpey4xqakGXL//nBU9ep7oVDQIvOYdDWaHiWg5Mnl0NZA6SW0+JuF5XwOf5apyB9tl4KSzBEakexfOmlMhiITNkidhWYcLD0eC9NE3XJAHf7uGLbvtBtBgadZFX9Yc7+W0T9km8r0PgeZd4G1lMHPpiiwB8le6LmcIXBOJ/Mx2+RYgWwzpWG1iGyZ9Wk765La03GP4B7COsh8HYQDGp3PooEbB4rv/RCUjNPz0tYmuROFH/Di09HtHok+bZ8z6w8Zt X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:06.5405 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ed352c2-cd49-4ded-825c-08de9f24693b X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CO1PEPF00012E7E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR08MB11092 X-purgate-ID: tlsNG-d25034/1776720793-6E577CF5-6076433C/0/0 X-purgate-type: clean X-purgate-size: 1341 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720825283158500 Content-Type: text/plain; charset="utf-8" From: Sergej Proskurin This commit does not change or introduce any additional functionality but rather is a part of the following commit that alters the functionality of the function "p2m_alloc_vmid". This is commit 9/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Sergej Proskurin --- xen/arch/arm/p2m.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index fb03978a19af..2c43b6033360 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -286,24 +286,24 @@ int p2m_alloc_vmid(struct domain *d) { struct p2m_domain *p2m =3D p2m_get_hostp2m(d); =20 - int rc, nr; + int rc, vmid; =20 spin_lock(&vmid_alloc_lock); =20 - nr =3D find_first_zero_bit(vmid_mask, MAX_VMID); + vmid =3D find_first_zero_bit(vmid_mask, MAX_VMID); =20 - ASSERT(nr !=3D INVALID_VMID); + ASSERT(vmid !=3D INVALID_VMID); =20 - if ( nr =3D=3D MAX_VMID ) + if ( vmid =3D=3D MAX_VMID ) { rc =3D -EBUSY; printk(XENLOG_ERR "p2m.c: dom%d: VMID pool exhausted\n", d->domain= _id); goto out; } =20 - set_bit(nr, vmid_mask); + set_bit(vmid, vmid_mask); =20 - p2m->vmid =3D nr; + p2m->vmid =3D vmid; =20 rc =3D 0; =20 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720829; cv=pass; d=zohomail.com; s=zohoarc; b=Ws4nyOQBmsILH/BSkA0e1Y8nSHEeBisVucauLJvt9uuth2EBRKBZFcQEPpG11jraofj2gnT8eMPcoD/rLqLKsC/e+80AKLNTV09LJiPYpTpatyJiD5Cac3kbtMVgN2+iSYXzqJg6a+08gUfENRWzAMoEka6AkZuMVg37gBD8sCs= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720829; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=oIAPv9xmUqmZOQALhD1wFmf2mfwJESnPZqbe9aDV5X0=; b=MN8AJid+bNhKhQa2jKPF6jZG27wW9B5/Fhzpcm+hP9XV2qlTeg64jywfT9VBiq1Bj8U8mSizszM2BH9jRBVsEVZMkm3Rc30XPkokY156YMTDi8KJpR2u/AjcgRa98g1y4AmPFWZjV2kF8/66YbbiQiP0272CmINYBasKMargfXQ= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720829371832.016678265968; Mon, 20 Apr 2026 14:33:49 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287813.1568247 (Exim 4.92) (envelope-from ) id 1wEwF7-0003Nx-ET; Mon, 20 Apr 2026 21:33:21 +0000 Received: by outflank-mailman (output) from mailman id 1287813.1568247; Mon, 20 Apr 2026 21:33:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF6-0003Kq-NP; Mon, 20 Apr 2026 21:33:20 +0000 Received: by outflank-mailman (input) for mailman id 1287813; Mon, 20 Apr 2026 21:33:18 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF3-0002hy-O6 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:17 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwF3-00CCKM-2t for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:17 +0200 Received: from [10.42.69.11] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b55-bab6-0a2a0a5309dd-0a2a450b9074-46 for ; Mon, 20 Apr 2026 23:33:17 +0200 Received: from [52.101.193.135] (helo=CH1PR05CU001.outbound.protection.outlook.com) by tlsNG-42698a.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b9b-212f-0a2a450b0019-3465c1872f62-3 for ; Mon, 20 Apr 2026 23:33:16 +0200 Received: from BY5PR17CA0015.namprd17.prod.outlook.com (2603:10b6:a03:1b8::28) by PH0PR08MB11076.namprd08.prod.outlook.com (2603:10b6:510:38e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:10 +0000 Received: from CO1PEPF00012E80.namprd03.prod.outlook.com (2603:10b6:a03:1b8:cafe::fc) by BY5PR17CA0015.outlook.office365.com (2603:10b6:a03:1b8::28) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:10 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CO1PEPF00012E80.mail.protection.outlook.com (10.167.249.55) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:09 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHT4Kfnz1wdS; Mon, 20 Apr 2026 14:33:09 -0700 (PDT) Received: from DM2PR0701CU001.outbound.protection.outlook.com (mail-dm2pr0701cu00101.outbound.protection.outlook.com [40.93.13.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:09 -0700 (PDT) Received: from BY1P220CA0050.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::12) by BLAPR08MB6850.namprd08.prod.outlook.com (2603:10b6:208:322::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:03 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::d) by BY1P220CA0050.outlook.office365.com (2603:10b6:a03:59e::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:03 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:03 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:58 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=IFJXlA/Nw6uuO4y49dGJ0dPDVmj4uDbzdOl3Esj99/nzp0d3dGGyR5NgjR2OUwF0pUyq2KKqaoFStHZH/ER0Fx/5wbDm2qV0zRWPiuAjTDmoggmhCdTG5uXJUZYMKt2Cp4vKZ+59KtLvGMTadd2OsHjNCDpc+rspnOgLT8m9Jgw2fG77I+X9drprNWHzJw8+E9QRCHc7Zan0UXZCA23apKbP3WSPeY04igxv6zP2b2xjrAC8Oxiw/5XV7ubtrcbn4Jp+STxk2AbZbFmlQoWOTo7yQdPEvZlT+ETkpovsbcu3pJfJ1XT1J0DNSfQ8nolohTP0Ed7sI1lP8NvwHRMgLA== ARC-Message-Signature: i=2; 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=oIAPv9xmUqmZOQALhD1wFmf2mfwJESnPZqbe9aDV5X0=; b=BOkOTKWhwWIuzqYqVS3vZwbNjBPlP8RujWRPkoHudZn/btcts/opBsLifgx3mJvSBvBxaTt1ELJAJ/M/BoeiGHAHE3xPX6vRzt7vEuSWdo+oTTo03k8JyHPjpMrthLwxKml+TQLN+70xh7+vEzneG/eZHAs4WTXigixZAO8PdOMQfNuXOuwgUetVVklAMjL6jqG4zYNeGFhyPvpS/YnQraA3jadH6KiXze/iMznmWoWpn+bGJRyUOFb7b1xlJ0lAnWBP55rolq7xU89+9FHoHk4fbGGX/1XxtTmgGlnibruNoF4zAJEuyeZ6ETb1cKmLriMlQx5qxbvPVLHem4Qmuw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.13.65) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oIAPv9xmUqmZOQALhD1wFmf2mfwJESnPZqbe9aDV5X0=; b=Lz6qM0Rp6TNmDNRVEpLB/OE7gQ08Bles5NCjjzGY9a6ZG6wc+wgF0Bf029iQK0QBRDtYq35lwymAILdr0tP1lKsIpaDSOUDwsLmc+DshkxEbSTbwJ0guqWo1SUjJMGT6RsE7qWhxHVY0T8aQx9fDB3WfNloCZJd4Rra3ZH8JUKM= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.13.65) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.13.65 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.13.65; helo=DM2PR0701CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YjKY49tnTydtyS2qWDss8GOSgPuQJ1iR5LZ+DGkETfYvUzTm6YsjvOB0BszpS4pS9dBqtiagMB09diBp9VgwUGHqVCCLS2VSHrD5tfw/8nqZZO25KkOKy6VWUcgubLWq8qEUUKhvH4GUfP1WqpedIdRwaLlKS5An+PbYKwZ5vSmDw+B167a+cbVrhiXKtL1cL6OZCSSS6bMssy6xgQMuwu7DVfXYrckGCowbCVq7aJ04hYVN5eHjb2UJTT3bpvUt6IimBUOB4f2gd8j0gIq8byKRCcNeeWmze509nE6fHEnioyVvfu8pT+FanFrSVXtxF1wfPttMBG02jagTw1BcFA== 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=oIAPv9xmUqmZOQALhD1wFmf2mfwJESnPZqbe9aDV5X0=; b=gZG+4l/3cHaTiiDY7AvwjYr2iqbky5F8jqdQaQoZyHrjDxJL/sbds+D+Dd12fYIhviUKP9zKZLmDEDMvQi/zVKSWM8AnbE4NqdGx3bGOSjZ5FyvsjdvKmB5S/Ek1tygW9ZVQ0KcqJCd3vxEwxFabdBpsJ/AOYdrHbhn09QZdDdKzFWoJ3DbxKQnM7YUl03fCrEbi6wCn+WFqIAAEHrYpRUjObocMsiSTsGvRIT+kur1zy1ROpkjGr4C7HanIp7m9IRsuDGewMp1S9nh1AeLjTC5XQiAcG110QVN+c9+QOVXQtOktgK2ZF0P3hkCNuX+axGPvTFM7/AoMcY6JI7x+8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oIAPv9xmUqmZOQALhD1wFmf2mfwJESnPZqbe9aDV5X0=; b=Lz6qM0Rp6TNmDNRVEpLB/OE7gQ08Bles5NCjjzGY9a6ZG6wc+wgF0Bf029iQK0QBRDtYq35lwymAILdr0tP1lKsIpaDSOUDwsLmc+DshkxEbSTbwJ0guqWo1SUjJMGT6RsE7qWhxHVY0T8aQx9fDB3WfNloCZJd4Rra3ZH8JUKM= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Sergej Proskurin , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [RFC PATCH v6 21/43] arm/p2m: Change func prototype and impl of p2m_{alloc,free}_vmid Date: Mon, 20 Apr 2026 17:31:44 -0400 Message-ID: <20260420213206.208750-22-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|BLAPR08MB6850:EE_|CO1PEPF00012E80:EE_|PH0PR08MB11076:EE_ X-MS-Office365-Filtering-Correlation-Id: 506760c6-d271-40b4-4ea2-08de9f246b3a X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?hshR0nMS4OSo5YHkJCHX27RuQkiqa/EVtyVd/3T/ljjmI0fTS/axaZLOkIMG?= =?us-ascii?Q?aJJnOhOCAqtoTHyoJjEbpZPWKSbuGWvjlX0jolym7vVsmLEQE7HJCs+jt1E3?= =?us-ascii?Q?qJ2YNxzziD2n9m2rUatySc8GypAkSw4ISk4F36rsmwtNHTeK63idOgAU0MIl?= =?us-ascii?Q?3mnaIQ9hawUqAMTitjbP4b2QCbb4jnW45qwpU28WRbxHYF9NDRWB97BEDmXG?= =?us-ascii?Q?xL1U+qroqs0d7MWd+6EJ+4L9g6Uvz6OwIU8EyceTEsTaiUh8n/NUKI3jOXNS?= =?us-ascii?Q?4O0Vv2U8cAcNW8Q0+qYz1PpFb+6MWbcVhIBplijL5wZLhZbESLzHBWidS+0S?= =?us-ascii?Q?ZBK7JFWBFdQ7DPUfg7XJJJzwDD6BDj8tZ1iRhq3Ft3iypvFi5ks5SI14peiV?= =?us-ascii?Q?w1A5936BiUgt1MaXrbmTenCfsvVagIlSES5GM2tfvpLosFQ09DNAda8kpGK7?= =?us-ascii?Q?V2Q0LySAzQZSjVMTfNJHbdL+YG5PiFsASwRZShQKAiOaUPBIahS/60jLqaDF?= =?us-ascii?Q?BD+ywY4f7ASTIoi4IMZTncJ1B79onX3heto2nQbIMkcWIRIzlwXwgy80/fOo?= =?us-ascii?Q?7lSqyhUUGH61wdmInNGnRq93W8WjaPtrJ81i0L0299twITUt+iXUXdZkFcgC?= =?us-ascii?Q?ulyixdbsZ1b60bMRjiC57PToOtE/BUf53gHG2wW4DjFGzG+4lDTO0ogmICku?= =?us-ascii?Q?Ua1BZSGILR0FmTB0lA4iI4KwR/8Bp+ujW70fSKc1YJ4wV9JlDCLbwezj0kk1?= =?us-ascii?Q?Gh/mdpski7YvQu17EPDacKRK4dgKLfA06As1gUTmREDaQKdHk3JHB+TCU6U+?= =?us-ascii?Q?aQUIFfaPjNtQ/YLl5Sk9H+OUenPDllyPHgLFTPtMCzk/5ZJrXEvQ61ZxPY+O?= =?us-ascii?Q?8/TNVFtHXNfDtqQFzvxWqgZtrRH9vYUEpALx0Ima+bjqXaDg2Nib0lv4cmpD?= =?us-ascii?Q?5me5qBcfL/22Q2QylsTn+xidZTU/EuJv7voiotzrutw7lqrGntwS/v4a7SqM?= =?us-ascii?Q?5pu9tS/sfzZCtv6Tc7DVynYc7ahoCZloxtQhi2/td0hkaA2pxq3+fYO3pXHu?= =?us-ascii?Q?6m4ioXWSoiDj6dCE8ScQTyIjm/qOmCDIpe5DpNikY0q2ovsc7c6rWi/Jse75?= =?us-ascii?Q?gLHF/ftj4fB/tcu7Q1evvZrTbQatV7vAP9J1WPlP89CktzYVxNS3Jj9TOtBP?= =?us-ascii?Q?pq87aQoMcAm7oQaGuk/m2GtWZAea3vT1KW8k9mBc3CbToCxCK3W5xNKbIjA?= =?us-ascii?Q?=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: V/8dX3MBB7hb+TqGGVpuPOjqi3yill0SQbdcD/QLEO+d/wJH6VBC31FtCzSExNemKOR4/lQcLIGFq5WdS/d4V53K3kpF9vFZQVE0fzk7xPjOjEHA10RKljT5lL0l/bEvV+xif2pM/YrEgShIvvu6ATVrPCTNFz+bRQvxqjWJ0sb7i+z2LaeYlY029qHKcI78mCl1G0EAKn8IdLfKG9yoHGwEOGW8YzgWZl4azmHwai/6ViTmhDacnExaed+IwF0AsTUDhDq51KiqAxrNCdNprhhAUxXM8rKUUiiKPuYffmCWqU1++i0cNraj+0qE3lJQwrnoP9WJt9ww+vSiOMtZqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR08MB6850 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.13.65];domain=DM2PR0701CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.13.65];domain=DM2PR0701CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CO1PEPF00012E80.namprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0ea5026a-c6b0-41eb-335e-08de9f24678c X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|14060799003|156008|35042699022|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?gKsJSLHddY95jEm9j0nm9+FRfGZd4GExHH6+SL4iCD5wNSjfSEFDnwEjQNzv?= =?us-ascii?Q?doktyHg4lDRNsfK3EJ+iYgHD2BG5kBC0MNB/W2n4Db4FlxgwPSKy1dh9p/Hf?= =?us-ascii?Q?5nSF19yRpcf452JP2WWIEeIM7Iz7q2hBm7EgMM32F1sxiLzGuARmMCgjOhI2?= =?us-ascii?Q?m/eolnDiyiBHTQIfFhdUq/ua8nQokmZp6kYmNixP1F3+oL4zf1+fya3MbH/L?= =?us-ascii?Q?iUPzk7OnqSkT0442Re1U1zk+j5sqqD/UQIv+5Q24IgRrfGRkLkDFn88rCvoa?= =?us-ascii?Q?yyjQX2joPWrfD1klkJCU1HtXOkQfOS/X0LBEJTBdXPy70a0OGOrGg/ENLl06?= =?us-ascii?Q?TyIYQrnF6aU774iyYRFHfZrxI8pIAXerUumsn8mPNcvmZqYkosjWILQWm/rg?= =?us-ascii?Q?wYeqw8A5jGhv1fTmy2XBjSKhVvhmZ4iFChraduE4yoc0uQdekeHoZ/bf0bu+?= =?us-ascii?Q?yYiQURth1fSoLNIg4tWbkI6gpnvh9WlZqs1rnrnEAOv1qcRAgxK5eKsArQUl?= =?us-ascii?Q?RUJHZXKU0uxFQsp7jIOsdS3dnJsUzk/iVvUM3ZNZpmWR8d2Jy9X0HMw2lVpK?= =?us-ascii?Q?gs4add5UZ8WMbEEHhVvyj19J/5KHezSr9y9kJVHR5jIxWsR8fg9AOh+4lG6m?= =?us-ascii?Q?Ks6vSseFALUEO1O304k9LogQ8IrmhP2uaihxaDpawLGRXOv6VOZLcvWpDdyl?= =?us-ascii?Q?sr8Rd34biTDhOffnPWRM48zAf/2KDVVhxrEDkjOkRX8vJv7PpSnghJT7ssuV?= =?us-ascii?Q?Ag532MTDJySFYxjJQW+OY+bh2+0UZA4PQdzL3pp2hvgeP2mpL4Ov2NhBr9n7?= =?us-ascii?Q?Y53ZiRl1ZQsbd6diIVo8lziNNnpN/kCHu2gaZvvN+dl1P0fw1QQZnu3/U7My?= =?us-ascii?Q?iQPz3miCjKhVUaBv2uVrm8qkdgTjw3d0pH74gLbuRZStJv5lSERTF9VtWY5Q?= =?us-ascii?Q?F7nJr+mCFBllHAVfS1KSsWctuE3yRuA1cd0/B5sCW8o8LojL3uHc5B7xfpda?= =?us-ascii?Q?qDgUUO1EA+XzLUkoXZP9zapSRz+Epq6Q4OdgmXyBfM1cNH2iOrwTRB8pLuCn?= =?us-ascii?Q?HIF16wlJ6QY4SdTlvFJFrmAWYSwlR83y4Zc/wJVXjw5zoCQ31bcT+diMMlNk?= =?us-ascii?Q?A1spCF9Wc5VMZmnCXEc1R5jid+rykImC++IapnOpfxoYPuenmiB4D/8oQdVp?= =?us-ascii?Q?/4qAGTdMoEgZXnh6GpzTberiMRDABS09IH196+H6FQzHsj/DnLjslW2pefs?= =?us-ascii?Q?=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM2PR0701CU001.outbound.protection.outlook.com;PTR:mail-dm2pr0701cu00101.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(82310400026)(14060799003)(156008)(35042699022)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: r5reXL1z6K5EdEg/2NZM7zmALNw0WD7hQk1Clp9adUSzPfVK1MxYBWEo4zuZJgWx7Mqjsj0C/z/jmRpb4in1+LEV+IhlA49cLyRyjp1qg9X0K0vMYf1bquxfqvxR1mTkfaXCtSIiW+ybLOTVCIZVMmDNuPubZOs/MEEfZ1JGaiQdPYYKdYpTqbk9Az4Dpl5ASmxgGTx0/j5vUBySMLaRFgPXxYofOu7+7wTX8g8fVt62IbKiUmXXzvcOjeZaTssPizSLYIwjlPU+K1bMy/yafmaa9whGULCidntFlwlKGj0Vq6c15ztuFEL/0KmneakgUQP3nmkGPxt+d3652j7MHlDPF4YPX1PHOM6/bizJduqKeHrzZ+uxh1qzbU8BjIo0q1ZhjTjVx+E0i9EHLLqJlzYxQN6JKgDfDdv5TOgZ10XVALXoUONmLe+9xu5ZiwOk X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:09.8813 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 506760c6-d271-40b4-4ea2-08de9f246b3a X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CO1PEPF00012E80.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR08MB11076 X-purgate-ID: tlsNG-42698a/1776720797-7E36CF3B-2DB5D848/0/0 X-purgate-type: clean X-purgate-size: 3941 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720831359158500 Content-Type: text/plain; charset="utf-8" From: Sergej Proskurin This commit changes the prototype and implementation of the functions "p2m_alloc_vmid" and "p2m_free_vmid". The function "p2m_alloc_vmid" does not expect the struct domain as argument anymore and returns an allocated vmid. The function "p2m_free_vmid" takes only the vmid that is to be freed as argument. This is commit 10/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Sergej Proskurin --- v3: Changed function prototypes and implementation of the functions "p2m_alloc_vmid" and "p2m_free_vmid". Changes in "p2m_alloc_vmid": This function does not expect any arguments. Also, in this commit, the function "p2m_alloc_vmid" returns either the successfully allocated vmid or the value INVALID_VMID. Thus, it is now the responsibility of the caller to set the returned vmid in the associated fields. Changes in "p2m_free_vmid": This function expects now only the vmid of type uint8_t. --- xen/arch/arm/include/asm/p2m.h | 4 ++-- xen/arch/arm/mmu/p2m.c | 8 ++++---- xen/arch/arm/p2m.c | 23 ++++++++--------------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/xen/arch/arm/include/asm/p2m.h b/xen/arch/arm/include/asm/p2m.h index 5c6dfe4a9789..62261d41e780 100644 --- a/xen/arch/arm/include/asm/p2m.h +++ b/xen/arch/arm/include/asm/p2m.h @@ -195,8 +195,8 @@ static inline bool arch_acquire_resource_check(struct d= omain *d) void p2m_restrict_ipa_bits(unsigned int ipa_bits); =20 void p2m_vmid_allocator_init(void); -int p2m_alloc_vmid(struct domain *d); -void p2m_free_vmid(struct domain *d); +uint8_t p2m_alloc_vmid(void); +void p2m_free_vmid(uint8_t vmid); =20 /* Second stage paging setup, to be called on all CPUs */ void setup_virt_paging(void); diff --git a/xen/arch/arm/mmu/p2m.c b/xen/arch/arm/mmu/p2m.c index f546f63f2489..0d37760ef5d5 100644 --- a/xen/arch/arm/mmu/p2m.c +++ b/xen/arch/arm/mmu/p2m.c @@ -1519,7 +1519,7 @@ void p2m_free_one(struct p2m_domain *p2m) =20 p2m->root =3D NULL; =20 - p2m_free_vmid(p2m->domain); + p2m_free_vmid(p2m->vmid); =20 radix_tree_destroy(&p2m->mem_access_settings, NULL); =20 @@ -1570,9 +1570,9 @@ static int p2m_initialise(struct domain *d, struct p2= m_domain *p2m) */ p2m->domain =3D d; =20 - rc =3D p2m_alloc_vmid(d); - if ( rc ) - return rc; + p2m->vmid =3D p2m_alloc_vmid(); + if ( p2m->vmid =3D=3D INVALID_VMID ) + return -EBUSY; =20 rc =3D p2m_alloc_table(p2m); if ( rc ) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 2c43b6033360..3342fafcc8a7 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -282,11 +282,9 @@ void p2m_vmid_allocator_init(void) set_bit(INVALID_VMID, vmid_mask); } =20 -int p2m_alloc_vmid(struct domain *d) +uint8_t p2m_alloc_vmid(void) { - struct p2m_domain *p2m =3D p2m_get_hostp2m(d); - - int rc, vmid; + uint8_t vmid; =20 spin_lock(&vmid_alloc_lock); =20 @@ -296,28 +294,23 @@ int p2m_alloc_vmid(struct domain *d) =20 if ( vmid =3D=3D MAX_VMID ) { - rc =3D -EBUSY; - printk(XENLOG_ERR "p2m.c: dom%d: VMID pool exhausted\n", d->domain= _id); + vmid =3D INVALID_VMID; + printk(XENLOG_ERR "p2m.c: VMID pool exhausted\n"); goto out; } =20 set_bit(vmid, vmid_mask); =20 - p2m->vmid =3D vmid; - - rc =3D 0; - out: spin_unlock(&vmid_alloc_lock); - return rc; + return vmid; } =20 -void p2m_free_vmid(struct domain *d) +void p2m_free_vmid(uint8_t vmid) { - struct p2m_domain *p2m =3D p2m_get_hostp2m(d); spin_lock(&vmid_alloc_lock); - if ( p2m->vmid !=3D INVALID_VMID ) - clear_bit(p2m->vmid, vmid_mask); + if ( vmid !=3D INVALID_VMID ) + clear_bit(vmid, vmid_mask); =20 spin_unlock(&vmid_alloc_lock); } --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720825; cv=pass; d=zohomail.com; s=zohoarc; b=HyrKB2sjalRNfXKbw+KawI6YDYbJtJYdAjX8lRK6q8GlDk0cRzJMt9LiSBIsi7alAfAAyK+QTe2OR7kAWpBwBabqle0US20lQDCx31hAUCLehyYqBfR9kIKr58YM9Y8gLKdyVOt3q/8o8Q/NWelwsrYSXhmX/sRr8hvRA5CVXlQ= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720825; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JXO5psDHXrr2lWhpVfZGIS9NlsT4Gk+n8+O5j94oxLM=; b=f+bgdFtRgt6MCkKe9DjVfsD7EkoXSjobMpAXYbn/OXCOZSDfZQL5EjevpKuVpOQyPYgH217664QuR7B4q/kValCvj7OHlG4m7f3IYIqmyE3CgKrxQR0EO2p9HEUYPaByfZ/8jj8zdJ5V5ZJPpLIgFvHsxlLdT+uAkCNlUdV6hIg= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720825486586.7304117737126; Mon, 20 Apr 2026 14:33:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287808.1568235 (Exim 4.92) (envelope-from ) id 1wEwF5-000323-AX; Mon, 20 Apr 2026 21:33:19 +0000 Received: by outflank-mailman (output) from mailman id 1287808.1568235; Mon, 20 Apr 2026 21:33:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF4-00030o-R8; Mon, 20 Apr 2026 21:33:18 +0000 Received: by outflank-mailman (input) for mailman id 1287808; Mon, 20 Apr 2026 21:33:17 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF2-0002YZ-T8 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:17 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwF2-00CD6F-9X for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:16 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b8e-2eae-0a2a0a5409dd-0a2a45028f2e-12 for ; Mon, 20 Apr 2026 23:33:16 +0200 Received: from [52.101.193.103] (helo=CH1PR05CU001.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b9a-af86-0a2a45020019-3465c167f58a-3 for ; Mon, 20 Apr 2026 23:33:16 +0200 Received: from CH2PR16CA0009.namprd16.prod.outlook.com (2603:10b6:610:50::19) by SJ0PR08MB6541.namprd08.prod.outlook.com (2603:10b6:a03:2d4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.31; Mon, 20 Apr 2026 21:33:11 +0000 Received: from CH2PEPF00000141.namprd02.prod.outlook.com (2603:10b6:610:50:cafe::97) by CH2PR16CA0009.outlook.office365.com (2603:10b6:610:50::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:11 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CH2PEPF00000141.mail.protection.outlook.com (10.167.244.74) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:10 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHV173pz1wdM; Mon, 20 Apr 2026 14:33:10 -0700 (PDT) Received: from SJ0PR08CU001.outbound.protection.outlook.com (mail-sj0pr08cu00106.outbound.protection.outlook.com [40.93.1.78]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:09 -0700 (PDT) Received: from BY1P220CA0041.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::13) by SA2PR08MB6636.namprd08.prod.outlook.com (2603:10b6:806:117::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:05 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::bf) by BY1P220CA0041.outlook.office365.com (2603:10b6:a03:59e::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:04 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:04 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:32:59 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=cgwoN8Tg3wUIWSINg0VhM7x1RpaoYgeQieY/FEADdO4YstX8uGamwQG0RhkYtxUZawrgoQk/+2HQ1uNrauP1qK1GeUrHMbKBcIe18xkW0YjQ6Ax0X8HYdjqOExOu+frwIOhcJNk/ihLd05JZM2JE9WNf8B/Sc1KbXZ3hKmzacLTFHv/Eew/YUqey66/1ME6IBqFvYkItp32lW3RghxvIQ/ljioUWMfVkAz1iQ+BkZx/OdxCPsvhI0QyPj8rftFqDBTUPJjWDhwVRmih5YuzHWR7/b+QEkRNdp6GTHexSeRvYfNbs4CvqRb9kqOaRM/RHmm+zmoTZp01YaUn0RD2mhA== ARC-Message-Signature: i=2; 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=JXO5psDHXrr2lWhpVfZGIS9NlsT4Gk+n8+O5j94oxLM=; b=ydpv2oTCLuTMyRUxeqVO6iUKbz++DJRyfnePpaFUkhUt89ysMsIvSJLsrd12Mt8kCdEVV5psZ7PY0T4UXLX632FeTzyqWAUJyMTrVx7oc7ujWoa37rdzqQS6vo9HRG0gH4SKL6xSItqeBXraY6DgSOmGxKM6sEDVzZjoDDcWQfyxdD1et+4G9LXDTiHBxEHLLzMkcKrXkaIw9H+Yi2P1RCKBuUhpFVIzyv7RQinYqnahgzJrv8Tp47ea7FmSwBbEIMTwoQpvBwVYz6hlpSK8WRKkNk+xybNE6tKb2DVTDcG8DKjzMNNNr6sJE37dR19HPMH9qs/ljmU38+/TlpW/xg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.78) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JXO5psDHXrr2lWhpVfZGIS9NlsT4Gk+n8+O5j94oxLM=; b=Xz18lriGP71qwg6B+PXBlYbSHSFe3eQw+vVN6FyY/T8GddY15PB2IdEmRUtumwI8mN8ZE0kmGar4b5y5jloPEEkKVRQWloTrYKLDA0e/Buyk9WafgZCaI4x2bQ/EwSbNtzbEmYXgD01or4CcH3MbPrRmKsIVGsPWMjmg5nVoh5g= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.78) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.78 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.78; helo=SJ0PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EyTwRyCbfyqSEktAEResMYyw/Si+idXUGjf0qIlXhx9i6ZM4j6GumJ0hdWoR3baeDHgrDJeL95qdFPtHO3/DUzU/IAwRBaPq0AoDGresgohtk1+rjlzZKT+ioWEAuTjbKbur/kq/IZG4ml+91A0OI9O56BjwzGBMHjRUpEOt0ZSsQYZwypT9Wdx81IFL6AoIWjeK9s4mgf4WCGbi9+4Ukm+uYr6pS6CK04+5Nbjan/e6fG87jQVtcIMWXZfF4Mprduj0fcsYCt9Bkr74e+Ms0/zFw2A/OIYXxUY/3rbRrRdV8GO3HJwQTBECfmAiGE35wyu3N2RaXMRalJKEumv8eQ== 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=JXO5psDHXrr2lWhpVfZGIS9NlsT4Gk+n8+O5j94oxLM=; b=XbVHF/1t89PPV7s/f13APAFMVD26cPjHnKdY2FXag08u1VL8k0GkImXkkZxsruadFT4qMh82oXf/CXyhBS3Dbjwf8W8IiTyKtL5P9DVhNJ+CO9buelJ0i58lr7Sy1muiiUEwXL+3jCQIC18upR/yiggoFdLonl2ie+fwox22+4ppSFCK0etWHY5/kqhwz+AYw8FH/FkgzIDTKV2SNZwFZkH9RYtSEcBc1lApPsa4yNyRg+Mt4+Dz4nAuaZ9k9nQT2uvJUU1jKsjtg2HI5hGhUMEy7AS/JjZHmgG12Gndty1bL6/n00mKmeSI8z+xk2GVaBYmN7xOm1sbvKpiWUTkMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JXO5psDHXrr2lWhpVfZGIS9NlsT4Gk+n8+O5j94oxLM=; b=Xz18lriGP71qwg6B+PXBlYbSHSFe3eQw+vVN6FyY/T8GddY15PB2IdEmRUtumwI8mN8ZE0kmGar4b5y5jloPEEkKVRQWloTrYKLDA0e/Buyk9WafgZCaI4x2bQ/EwSbNtzbEmYXgD01or4CcH3MbPrRmKsIVGsPWMjmg5nVoh5g= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Sergej Proskurin , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [RFC PATCH v6 22/43] arm/p2m: Introduce p2m_is_{hostp2m,altp2m} Date: Mon, 20 Apr 2026 17:31:45 -0400 Message-ID: <20260420213206.208750-23-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|SA2PR08MB6636:EE_|CH2PEPF00000141:EE_|SJ0PR08MB6541:EE_ X-MS-Office365-Filtering-Correlation-Id: a6ebd96d-aeb3-451e-35d2-08de9f246bf2 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704161811799003|36860700016|1800799024|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?za3NdQVRA7Efo0xB/d9YMo4DWECqOfNaz9zCRASgQqHFRseAlqvvnzif1Jgt?= =?us-ascii?Q?JUHRhJXD2CL/BftHu2AzA8nOCQR1eLtOpTUJPCijbrC1qTMlBjzDnLiaxv8Y?= =?us-ascii?Q?wZMYYzElfjDxlcGQhoe/8MghlGLPDijCy0DyJ/S58X2l3xcRv0tGk16ON2m6?= =?us-ascii?Q?TMWL/voxEpZKHp58fp/PDzzjmfUpfsw0aCu5xVqrGMLITRkR6r8Ajvn7PSuQ?= =?us-ascii?Q?vJ4ecm2fSCw/JjD5wbkDpraZlXQkv3u2fjdcyhc2gc2LqD4x+zaweqXb75Sm?= =?us-ascii?Q?DnAD09Q0saeAsdCjBsjpRo8MDqLbvGocX4O0nEDULpbGGmcUbToLuCnPuWU3?= =?us-ascii?Q?sWk17yqlCPslPUTjMD4ulWc8kxDhMaJrZd+M664rttOeXayppBsH/ifuxP7c?= =?us-ascii?Q?pTgUae9L4/gSSShaivohGkgUuGcn7ctEGd2VmNo36oGoQSoBdWegrOlrVzvY?= =?us-ascii?Q?3FY4kWmeUmZ5svC/kyJ6xM52OqpA6SlGTp3IABZB5P7O7a/gShpSJBnFp6ny?= =?us-ascii?Q?qji4DiqfH+YWBI3/v+MV1rAK/XbY1yuEXda4qW5O/hoinM1EUfPpeM95d1OD?= =?us-ascii?Q?9pPgguPZjl3SN+j/29vmsuyptpRk35LAe+lZm9QvzJPP7c9RULFfhW+kDOZF?= =?us-ascii?Q?yDAHnTg7LaNAJIO/xgRN5efOQV5vzt+FTnQoVqnDFzqEAdHHv9uiPMKCuu6Y?= =?us-ascii?Q?1CVsqMeRI9t3pqWh6J54cPIQVBLt3jCXG8sNoGq84dL6pn1jhNcz1sEpf+5B?= =?us-ascii?Q?STf3wBMUcBFgcQv9Bt8TIvggB2jubly2KaU2uEhLU6R3TKABtVz5lTM6hMIJ?= =?us-ascii?Q?hYo55JXFWIg2tlDakB+FVeDMGEbayhDj5Pko38HwvPw07WSo67QSyyIbGWXD?= =?us-ascii?Q?9WL6ZZVsyy5aLOZLpZPv9aPfvUiC+S3F7JR/eMnLjdbsrqoVjA+gvN1rFpr5?= =?us-ascii?Q?mEqJmdiqQyNGJIKB9c6XNFi9lsmve0s4HsP0pnSrGDvoefeiAhlV/vhuKPoy?= =?us-ascii?Q?bK6QsE1VcVb10XG8s7p8bo11Gmx9ULziyTcyei5mr8bhCX8688lTkchwhHEn?= =?us-ascii?Q?+YX59J8hdUvoDe/ZT0Ran1FFt63y9IQlTyDsdXuNnDcjeXjF2ZeLVDgAzMM/?= =?us-ascii?Q?TRBXCrEGKZOOli660PqyFJeHQnlY3mV076C57yP2nkT2XTm0/jFEvIDCwsGV?= =?us-ascii?Q?TkjCaHqX081DjOZ6?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704161811799003)(36860700016)(1800799024)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: m77iLZgQGkoC6WIehslYUERslLXId42bcMZMHPJ/2EvwM3op8N2QQIJ56Yas2y1x2wDxgTYIIk7WbJ6jVU8n8FJznKE/PaX6bTkqKjA6buWynIUFCNbZF4p0SibDXseBBALYhwe8aMPv0yHtSBXTI4VQDqNOLR34yKOvUC6SNuLFq7ke1Gi+paTAUzzAI+tqyK3ws1hn0BGfEtseaFPD328y0r5RIJdLAoYC9baTvUvyC1l6T/6Ry/02W0St2raeUz3QAlVkt8t4k/bWiGh2MRF+e1CIs9OOEhJMzzX1QKzM/DlrNjot3KyPzFDVXhhHThUsgldlX6i4HJOjwWTb9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR08MB6636 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.78];domain=SJ0PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.78];domain=SJ0PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CH2PEPF00000141.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: dfe16a1b-b374-48a6-049b-08de9f246831 X-Microsoft-Antispam: BCL:0;ARA:13230040|704161811799003|36860700016|376014|1800799024|82310400026|14060799003|35042699022|156008|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?L1z3KtL3NcefO0PgPb/96RxTZnpiQV7CGp8BLCRLGzN06jglsNOp9DKKxDL4?= =?us-ascii?Q?0qalGv6ve3KCILjeHsBcU7xQ3X5Y1uyljZSkQ5D9RKL06a2GwqHykU4sD4Cr?= =?us-ascii?Q?anltmAY05ApUIl6VD4c8adBeXge71cmd4V1wpV0TZFbWE4/jyMY+Nif37zSr?= =?us-ascii?Q?MbAyes746HKbtMozPWxOEvWI17pJliTcCXLpwLZJVW/V6ReZ7zpWZ+0Nh8Al?= =?us-ascii?Q?RL88tk+QETnbv4pF9JEPhYmEtpnrayXPgGjNyfxAmvoSnqsE+0w8FDmWuw0D?= =?us-ascii?Q?Mq+/a7PA5yvd0W4ZCzVZMLnICq/mK+/7cj42tQ3Yy9Zh9v5F/PNSn4xpe1OX?= =?us-ascii?Q?xjn3y7ZO8XGU+iZAEbqd/94mxFP37FMpDvyfaSHwVQlkoKQ8shXUvVI+60a1?= =?us-ascii?Q?dk3+g+sBOTJ/WIwlw1E/3gv7M55Gz84Yc3lE0Nfph+aGWiHK81XFswhSu0lG?= =?us-ascii?Q?XGisbZ9hKUNcajU+PdJYTXSLzu95rdL2Hocs5Tzhdjv1iJJgArDVFwcan9Zp?= =?us-ascii?Q?vncFlFrnoWPqUNjMEtOXkBb0VeMYv8tUWOcHpQdVB5K+/zHzD8Da05TyKGKM?= =?us-ascii?Q?MJQp22tMPtwWF8uxP4EtRsStCh8zdsb4VJw8p8HT2YVKdgoFTlhijHU8m5iR?= =?us-ascii?Q?3qvy6mCL4EhvlXO/cU4ko3rzt17dobj432JVOnEcEE97aYrrhi6zCQ4P7jYE?= =?us-ascii?Q?rv5tSJ39OGVGmOcnai5cL9VvvnY9Wz9eMp+1HgF6gwqBmJev9MOylPr05ZHT?= =?us-ascii?Q?f6PB1zTgkh1C4dmnQSBNlhS9Vy4ItShGcScDS06fLHm5ZZTossWPrxAQa73G?= =?us-ascii?Q?YfBb012lZ4YBy08bvG8QM5nurNDnPHORq84pgG5SKdIdDp55uA9Mob6N3ziN?= =?us-ascii?Q?IeE6Xa5t0Q/0Z7m0Mng+zqlf1llfjw2xEqEFJOJSaw83+j19vkgMBCnY721B?= =?us-ascii?Q?ULMFpXcxjOMBgnvDlOzPOFXgOSAG7VLOneWWG/OIpXI8dBciiAvRemG5Nklh?= =?us-ascii?Q?lZNdMrY2GFwFdd3OKN9UF9SGUtLXDCEg5TKLt5tPggsWbeN3+t3B4WaY4gXj?= =?us-ascii?Q?clyWPxqIR+XQNvpt2deJS+DMJkZxqfaILjpV3ANgNASiwCbC2t1gxdiGYxG3?= =?us-ascii?Q?tAb0/WGUWyMwTtLdoILW0XWjrvTJpbXGqSqJNgFlo56F7MBqzs5crT/RELPP?= =?us-ascii?Q?5SYzBejzAnXOqxJg?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR08CU001.outbound.protection.outlook.com;PTR:mail-sj0pr08cu00106.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704161811799003)(36860700016)(376014)(1800799024)(82310400026)(14060799003)(35042699022)(156008)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3zKjeuTBo5ThjLRAR4VX8MiSoHzlUKvbdA67uPmxOQWgAHJQH6nGtPhMiZ6HeMS0G8l15t1SpO60pHPhf9I2554hE39awFKnkUMAY433l8H7gGNJhw/B5KX8PMovQ3mxV0Yi5hMGITEg2o768T4X8xplCawY5/f9fcM2hJmLBtYUuQrEYARs2l22269jzIFbuvZGfK+dADqaUZUMAzqf6VtfC34JgLEdNOqnRWQEik2h22S5MLTlMBoGEokliTz1mJonIq5A/kvFPr0/2NRbFPS1Y33P+WucY1qnoGgK64+X6FdJkJSS5zI8QmluiEHoZiLS1E/b3jlZjV9LuTpH9HYuc7Zd1tPqDxkU4itABuQQLoUhUG0pSWulI10/7FMuCyPklrZPYScrpnWMRnulVohaA+vDBN6q78585pwc2USyKNP85p31so8ilQVqJd0Q X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:10.8475 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a6ebd96d-aeb3-451e-35d2-08de9f246bf2 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CH2PEPF00000141.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR08MB6541 X-purgate-ID: tlsNG-720697/1776720796-886D4161-1FEE0194/0/0 X-purgate-type: clean X-purgate-size: 1730 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720826879154100 Content-Type: text/plain; charset="utf-8" From: Sergej Proskurin This commit adds a p2m class to the struct p2m_domain to distinguish between the host's original p2m and alternate p2m's. The need for this functionality will be shown in the following commits. This is commit 11/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Sergej Proskurin --- v4: Change return type of p2m_is_(hostp2m|altp2m) from bool_t to bool. --- xen/arch/arm/include/asm/p2m.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/xen/arch/arm/include/asm/p2m.h b/xen/arch/arm/include/asm/p2m.h index 62261d41e780..8ae0cd7ff589 100644 --- a/xen/arch/arm/include/asm/p2m.h +++ b/xen/arch/arm/include/asm/p2m.h @@ -32,6 +32,11 @@ struct domain; =20 extern void memory_type_changed(struct domain *d); =20 +typedef enum { + p2m_host, + p2m_alternate, +} p2m_class_t; + /* Per-p2m-table state */ struct p2m_domain { /* @@ -111,6 +116,9 @@ struct p2m_domain { =20 /* Keeping track on which CPU this p2m was used and for which vCPU */ uint8_t last_vcpu_ran[NR_CPUS]; + + /* Choose between: host/alternate. */ + p2m_class_t p2m_class; }; =20 /* @@ -424,6 +432,16 @@ static inline int get_page_and_type(struct page_info *= page, /* get host p2m table */ #define p2m_get_hostp2m(d) ((d)->arch.p2m) =20 +static inline bool p2m_is_hostp2m(const struct p2m_domain *p2m) +{ + return p2m->p2m_class =3D=3D p2m_host; +} + +static inline bool p2m_is_altp2m(const struct p2m_domain *p2m) +{ + return p2m->p2m_class =3D=3D p2m_alternate; +} + static inline bool p2m_vm_event_sanity_check(struct domain *d) { return true; --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776721358; cv=pass; d=zohomail.com; s=zohoarc; b=QelxP/mrCJwDqMtNv87534i0n2ey8wKCDlv7d5T8+nCUqZAlbZ/lM0YONSlZHuiZqveXBRyxDovAKMAhauASLAoflEGIfb3NPpuy/hbE/HXO3pI6SU+PL1og5oRV84DcD1rKHc1DVE26+gbApl1CCQ0jlm48o9rDkhFCDjW4zXU= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776721358; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Bo2v4ugtYXSGdSqYmYudyzdTq4r/l5sKQLamsKzHkjU=; b=KKLL6klZhE1kGzFPrbkiGqMOOwgNZyZxIqrGD5Nje5AR2dvY0HknJHnwKz+YaZgfX8ifEKaQ4cwzXbuopVkxRWaEuguGnSOEXYMCwMI9VktcVV4N/VVZEZ9lfLdZadEU+Xxz8q3AVdflTwMWFhWfBYSOhDEI/qLIPJJerVfdhVE= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776721358595447.6468213864223; Mon, 20 Apr 2026 14:42:38 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1288160.1568484 (Exim 4.92) (envelope-from ) id 1wEwNu-0005wV-Ci; Mon, 20 Apr 2026 21:42:26 +0000 Received: by outflank-mailman (output) from mailman id 1288160.1568484; Mon, 20 Apr 2026 21:42:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwNu-0005wO-9O; Mon, 20 Apr 2026 21:42:26 +0000 Received: by outflank-mailman (input) for mailman id 1288160; Mon, 20 Apr 2026 21:42:25 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwNt-0005uP-B3 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:42:25 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwNs-008j7E-O2 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:42:24 +0200 Received: from [10.42.69.8] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69daa-bab6-0a2a0a5309dd-0a2a4508afee-16 for ; Mon, 20 Apr 2026 23:42:24 +0200 Received: from [40.93.198.88] (helo=CY7PR03CU001.outbound.protection.outlook.com) by tlsNG-c1860d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69ba1-63b5-0a2a45080019-285dc6581f58-3 for ; Mon, 20 Apr 2026 23:33:23 +0200 Received: from PH3PEPF000040A9.namprd05.prod.outlook.com (2603:10b6:518:1::4b) by DS0PR08MB8541.namprd08.prod.outlook.com (2603:10b6:8:116::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:12 +0000 Received: from SA2PEPF00003F65.namprd04.prod.outlook.com (2a01:111:f403:f90f::6) by PH3PEPF000040A9.outlook.office365.com (2603:1036:903:49::3) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:12 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SA2PEPF00003F65.mail.protection.outlook.com (10.167.248.40) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:11 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHW0zb6z1wdY; Mon, 20 Apr 2026 14:33:11 -0700 (PDT) Received: from DM2PR0701CU001.outbound.protection.outlook.com (mail-dm2pr0701cu00104.outbound.protection.outlook.com [40.93.13.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:10 -0700 (PDT) Received: from BY1P220CA0047.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::9) by CY3PR08MB10748.namprd08.prod.outlook.com (2603:10b6:930:100::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:06 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::82) by BY1P220CA0047.outlook.office365.com (2603:10b6:a03:59e::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:05 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:05 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:01 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=eha1VwaRxYuut5YLpUNEo8UEptBRumFr3Yq35yL3Eh89j1j4i3SwJzPWcrIbMCUc+SRqZTB6FzYagRI+kswv0CdA76QyPPHf5nMlEnAi0HY0p5qNYncqXJ8/Xu4OpsV6Ll9mj4+JCcPA4I0K07awSAiVrkKRfP2J320RYe/0hB+tC0anJk2eXAwLR7sKYdKtl1gRqlL/1aQyBappxIerspC9A9SZgyGcl/7mQap0T+Tsyyl9sSEfi9yYnne/TFTo09z/I7pIvY65/r4ihAyI45utE+yDGNI8RkoLkENXyGrzeZoF3PiBqDK2bP30vohvFGJ5WQvf5+RO56M4tBgElA== ARC-Message-Signature: i=2; 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=Bo2v4ugtYXSGdSqYmYudyzdTq4r/l5sKQLamsKzHkjU=; b=cDBjyQuOJZS727KsIWz74OVIjb/GrWvdEaQmGvNOvC419oBkjXFrutJ1vxYor2+ppqwwL6nHno3PZUdNSE1mgwHrnTJ/Vs6cqd7n1FV0P9pbGVfoeyAF0CuBABuChDZCPWMq3bb6Zq5EsoIaPndhlE21v35H9nt+nKh4WLvLLYYeUtVzqVr5dqW9YYt5/gLZK9czhPSuIPIcTGm+48NyWS+B6FaiujX88EiMbD/ufcvz6m0PHBMV7q2WXAOj9OL4U7EQ6HjCgpHdP88ffabjx1nrkiQL8AGx2vJdyj/SyMP5oWKt5NGYJzkJW1QHRkmr7pqkUzex5hH0wNwTTchP6g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.13.68) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bo2v4ugtYXSGdSqYmYudyzdTq4r/l5sKQLamsKzHkjU=; b=n3fVOwQUS//cMRWrr3gurd0dQBAk+t2SOJUOgZ9oO1cgiW1ZOjFV5zCNuOp+ZHQu9+jH1JsV/cfzgBKLP6pkZ3LmQdCon/Wz18kdH4mVJHMt8QNI+n6eki9UsbI9LAvyilmaNwuctVjRmfGgmtSy7X/RoAdN/2N1bUvf72ScnTQ= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.13.68) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.13.68 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.13.68; helo=DM2PR0701CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jnO6fntf58mlbTWaSf748FGIU3I69jxLSSl8JmPrOs0lAGHXpbHJVSh+wvXLtfCZYROCP5as/qnub/H6jLiu8mcCeOX0WFGzJjRvbAr6Svnb9gumUzT8HhcS2+CLP52UwvtrslnPytjPmWh2V1Jq+/jCa+t5KOMnpyt1qyKcAnvjikout5VrAdXCni3HSWiGTnVjM4CQwLYQxEcvOsNSFvCNqOOVnDHo6fbCIvvNJvyrlDlIb59pOHOUgs8C9VqaAiJ1Zb9sr5gmJ3jGaFTXuZGaCOc8hHgSh0OfmP1BXTLxscGsPKpjeWZ4p4hHhHeTPSThReulGAUOKfCz8aZiug== 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=Bo2v4ugtYXSGdSqYmYudyzdTq4r/l5sKQLamsKzHkjU=; b=wHb/zWfpcgM6vFiNrnFEoR+ABVdSVMi0Y9Nu7AVFrR3q9dc9q6i1AbLOX9sVGh+CreSxpirxcxL/M2cagAcf6+Uvuy4ZLL7Fu45b1Y8pSVVJi0njjv9WTsH6u48R+xEMGtAAp67y1ShJhtIAumHn3fyO72GvvofUwxPuBVp4BvMs6dMTtFrhyLTAu4gopV+G1V7C4G2TLnAqY5Y/z8zNgP0If/AJC17WkXpZzsPHByI7DVE+rLoJI05jaxvDm9rpZxDHkMYKdAeiiCXEuPbkddmX73TCnfpQmJY1Cal+hR7vfoYBmF/+Fj/6fPAz1Q2MRNAV3LpEhLlOveFBqCEpRw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bo2v4ugtYXSGdSqYmYudyzdTq4r/l5sKQLamsKzHkjU=; b=n3fVOwQUS//cMRWrr3gurd0dQBAk+t2SOJUOgZ9oO1cgiW1ZOjFV5zCNuOp+ZHQu9+jH1JsV/cfzgBKLP6pkZ3LmQdCon/Wz18kdH4mVJHMt8QNI+n6eki9UsbI9LAvyilmaNwuctVjRmfGgmtSy7X/RoAdN/2N1bUvf72ScnTQ= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Andrew Cooper , Anthony PERARD , "Jan Beulich" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Sergej Proskurin , "Aqib Javaid" Subject: [RFC PATCH v6 23/43] arm/altp2m: Add support for altp2m init/teardown routines Date: Mon, 20 Apr 2026 17:31:46 -0400 Message-ID: <20260420213206.208750-24-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|CY3PR08MB10748:EE_|SA2PEPF00003F65:EE_|DS0PR08MB8541:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ec4ddb7-dd66-4878-c2b7-08de9f246c93 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|7416014|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?EherKj2DNK3ooVZ9s0xYv6gY6ZLA9DPNTqcFoJ1UNvyo3OwljZx+FGUi9GP2?= =?us-ascii?Q?FgzZNxoUvgREsDRQSek6cE1yUXawpz5Mv3KwDnfzfSgdSM/8CTtei4USDm5l?= =?us-ascii?Q?3Nibtay80nmQn1U2Xi4xAQDjv2aWPfn8Q5Gst5OanFlZT6fJGTS37ZsX8vkO?= =?us-ascii?Q?Y5FpYuqO3FSqO0DXkU14bJexpw0gG/SuYVJAOMAuwxPB4sgmVfaIMc0aNNsf?= =?us-ascii?Q?qraYj9vk1PH4EaEDELpZTBQ1oAQPPra4rNJI+aYcIqgagVI5Gx6tbf7jxOgC?= =?us-ascii?Q?kMyIa1ZjdVflmpYMccdf5jIjTig6xlFCAYFHm99tXKH+SRvl9gTbRmfsgHx5?= =?us-ascii?Q?s7YwDbeVMcgQjuaiJSm/zsyDW6Ff+AVAl8Jbw5ZTXM1O131rHoFiK0cxSpJD?= =?us-ascii?Q?Z43WpoWytmBx2t31qKAFie+uW7hLvDOSgBwPTDIHaCLHttDzFdLaLtcwCQ0a?= =?us-ascii?Q?OIsA3vyIG6ja+p2IJuZkA3eaugYkQ86NmT7qUb0IBY+Sj1cYEHklLMpJgG5J?= =?us-ascii?Q?fMp0ERilU/MW9tAVtx9k6Yp/L6qcKqfIgelBjgpaXcnJ6m0Gn9XUVpM/o1dv?= =?us-ascii?Q?onCmndyhbiGpk84RnCDrtD6yjYh+1VmeKQ15jJkFpDm/Aw+grxOnD3HWgxIr?= =?us-ascii?Q?Lf81cOiQHEzd+2sm5765B6WkTK8FXU2Vz6re+lzU4vnzErZ9aUgchIJ5N7P5?= =?us-ascii?Q?zDPsEF3YOXMaIwJzccLs6pb+wVjRp+BdYmh7n/Xnos+7Pg6BlNRVBZg2uZDl?= =?us-ascii?Q?0B7CxgaQdyzVBA1NvAyJeVuhSdCzkKNTGr6p9DcTCuFDFsyqrkiyrAvzTNRz?= =?us-ascii?Q?/TK1mPTBRDNGrFE4+2IRJgPaZbEJmxxYZPXuBqk716yZnKYiU/3o1gPLZTmg?= =?us-ascii?Q?XfvJyfGVX2DF8ncl42zHjpBml5P487GOczHHWXkCPatdU6FCcJ7cr93adeGQ?= =?us-ascii?Q?uPDF9wgrou2bBCIjQqM04k7gnkMaR7N8DdLJlOrbk72hOFxnvYYgrBo+TcXy?= =?us-ascii?Q?nWhZcjpwrBJ46voobQpVVNFSgmaXUyGH9XXH7YWzTMHYFqdsa49EaYneLj+z?= =?us-ascii?Q?BVJuqnTJnKpgxWIdif173X4vmIrS6bU6NIFEz5sJ0oVRjxZgWQ7NG/loFzuD?= =?us-ascii?Q?Mzog0/3T36fDpm4VJ29BretiRRtecTpFPNgKHq9sv3udsGnzAnsgcl31kJHx?= =?us-ascii?Q?F+pLBx1qQoQPv9CKROhHOYIW3Cu276r7TMuWs6r3njSqPiF4l7/hxQUxQ98?= =?us-ascii?Q?=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(7416014)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: d3uW8v+Xv6qGv7ugB3sG0GDaz8XvM3WrK63WtOeP1QjZ5MbPN40VAc9T8M1eOnhyhUbPw4HHZZD5/GSYSKQUuhRqrNPwlsxCCPXJaRr+A/psAzuRUrfS7LN+GuWamIvmUMSGnLNWMU6gEyq6gGuzNX3FteKwvHcAwUpNzo6cAZ2tiStgfOuZ2EDgUI2fPqKuUMNQWTo2983ZwfHTIeZxgFKsnvOWj8kSCL7Szy/qnSbYMei6U74burFgcN/6vEbrmD9rRp0b8IzIieY97RrGn8sKXwwhPQ4oTUSAvxcK+GSuyYtUAoYuN/ydfMGJ5ZR68Nwj7xXcz3phQ7nQCsIBEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY3PR08MB10748 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.13.68];domain=DM2PR0701CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.13.68];domain=DM2PR0701CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SA2PEPF00003F65.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f8d8d55a-67b3-4f08-bfc1-08de9f2468bd X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|36860700016|1800799024|14060799003|35042699022|156008|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?LXKzP1Kt7WvGFmN45H+KtqDCjeqaJ46/OyFBw37KugPWki0TrQnDY+EzEy7H?= =?us-ascii?Q?Pr6G+eZstVV/Fyp11lvmEcFz7K8yTn+6byr5BnZmerJgPCZd3smKJJnNwh4/?= =?us-ascii?Q?LTsjwvoWEXeLlqIfw5zX5Vg5WzEoCvjafIXrQ8wqaOUIw9GuGN93HDZg5F3+?= =?us-ascii?Q?3YVx/HcG5PdcjhuzcykGiW26WDGkR5vvdb02Yy2bluwUo9jM0BEMYlSX3ooD?= =?us-ascii?Q?y0FFAM463Lg/xEFpTqNilf/BMvr96qb3mHdWNOIuHVTPKYwezPbP2BJAjegp?= =?us-ascii?Q?lPPjez8Hf6VBfboH1IaIaEiIjZXlMuSUSVx+0rnX2UVecUUHFyfYcXBZw4nz?= =?us-ascii?Q?KwTbNnq/9MctwBe/q35jmJY+fClnPegxHRpKWkxEAWT/sGWMffqTzRfYwHJW?= =?us-ascii?Q?VJ6gvqAfPsiu5Rpr+O+tieBUqb8Sak1dzSP/iPNo8JaOHxnLVBdzKGUqYhmz?= =?us-ascii?Q?JsnLGqvuqbQIVTY/aUp19xJAxewzvnfPesllnmL6jPfCWcYch0CeHYpdCO15?= =?us-ascii?Q?qXi4w9JS+Om59vtG9ve3yw0PyVrCLH//zJ4D80nfgXQgId3n204bHoPtblHU?= =?us-ascii?Q?augU/rL6F6bvVE1B/Nkh4DztHe1Itlat1nMsFDuf8rQzbtd7D3d/EwYM4Bwb?= =?us-ascii?Q?v0M/jj1wzh7HICGwl/wINLHFRKVV+hhwpFST6svo/wbT/+h4tPXUbUebNY8f?= =?us-ascii?Q?CF8KnmuulohJf8K1MwxGppnJJzIi8qNfbAX2HRci8og2SVjgO2pJx5CJ9Kn+?= =?us-ascii?Q?VdElna9iFgVQcOnT7UbD9EX6ol29PdflqX12MIsQ6SchRo/ZpSLtWshuPNqe?= =?us-ascii?Q?bZxud6isFiK6YELSm120OpIjch4dTby/Esb+H0ZX+aO7mYTuQ9wwUUR2+oA8?= =?us-ascii?Q?YGMK3G0abp0BsCitT4Hb14g6qoDBZnSqRX96CsSECxrk+EGVZM5OvcpwZSnw?= =?us-ascii?Q?wOxUqdjgy6pJ/W9J3z8e/4g8eX/08rYgum+A9jy8K0ji/yHagHCKzmi0ab4v?= =?us-ascii?Q?Nba3dJ6OcgJq1fK/PLU1x4lHix6s2LLtYFoLSDvkg4JFYT/V5B7Oy4bwZPZn?= =?us-ascii?Q?ZsDdTqwW5wSPUBg8jOth+gRTzCUVTbFt2WTj+HHkf91Ux3yyRuilBu1Jozjy?= =?us-ascii?Q?dxf+XZpBuNeKcQs/k2fWeJNe3HFHnWETT8IGaWwLJep79cD0LTmE7PcE7C1h?= =?us-ascii?Q?tQi321cu+s07MnhCVGipKsSe4zbVpbaL2BBZDljZE+s6WZEsDJIQ/j+FCMc?= =?us-ascii?Q?=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM2PR0701CU001.outbound.protection.outlook.com;PTR:mail-dm2pr0701cu00104.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(376014)(7416014)(36860700016)(1800799024)(14060799003)(35042699022)(156008)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: q9b0/8OOMM0eMr4FbIda31N4yIbjebZqGyZx7EqXLeSUdyiDUwC9gKFlUs7THpn2Z+iSHuFyLMNP5qIQevshVSHI3nOqF8vWZfsEbWR+Oj7aps0GLHbhcySz8PFPSqtYquaVLLzNX0k0rYlmAT4XScVD4JwwFseg3GJWc5uJZSaOS+AyGVtr/CfBmUZFHqsWp2zIZX2xIuFRL03k4Q3sLSuT03J8NBBoOAFwS/VW70Pd+iVIzqPhDVXmLYGTvNWfUwPQ9U2iBII4Mt7P+qOzX2HWdBF+8zvC2SetAbqVfeu3FPCE34Sx16jjtv+EP1ua4IWUsYOhi4JAJfiPHT2Dvoa/MwTJ2rFgkfflxwEwRXFFivhHRg82PyDp2hAimyAhZ3pTYMIkTUt5YjVi8/03AjWYaAlF4dbtrvF0SezJo6QTADTWCOuBuObFaJa19TAJ X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:11.8995 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ec4ddb7-dd66-4878-c2b7-08de9f246c93 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SA2PEPF00003F65.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR08MB8541 X-purgate-ID: tlsNG-c1860d/1776720803-38567DB1-9DEF0F34/0/0 X-purgate-type: clean X-purgate-size: 7788 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776721359961158500 Content-Type: text/plain; charset="utf-8" The p2m initialization now invokes initialization routines responsible for the allocation and initialization of altp2m structures. The same applies to teardown routines. This commit adds the prerequisites for the common altp2m_init and altp2m_teardown functions to work on ARM; No further changes were necessary other than removing the CONFIG_X86 gating. This is commit 12/12 of the altp2m_init/altp2m_teardown routines phase. Signed-off-by: Rose Spangler Signed-off-by: Sergej Proskurin Signed-off-by: Aqib Javaid --- v2: Shared code between host/altp2m init/teardown functions. Added conditional init/teardown of altp2m. Altp2m related functions are moved to altp2m.c v3: Removed locking the altp2m_lock in altp2m_teardown. Locking this lock at this point is unnecessary. Removed re-setting altp2m_vttbr, altp2m_p2m, and altp2m_active values in the function "altp2m_teardown". Re-setting these values is unnecessary as the entire domain will be destroyed right afterwards. Removed check for "altp2m_enabled" in "p2m_init" as altp2m has not yet been enabled by libxl at this point. Removed check for "altp2m_enabled" before tearing down altp2m within the function "p2m_teardown" so that altp2m gets destroyed even if the HVM_PARAM_ALTP2M gets reset before "p2m_teardown" is called. Added initialization of the field d->arch.altp2m_active in "altp2m_init". Removed check for already initialized vmid's in "altp2m_init_one", as "altp2m_init_one" is now called always with an uninitialized p2m. Removed the array altp2m_vttbr[] in struct arch_domain. v4: Removed initialization of altp2m_p2m[] to NULL in altp2m_init, as the "struct arch_domain" is already initialized to zero. We moved the definition of the macro MAX_ALTP2M to a common place in a separate commit. v6: Reworked to use common altp2m init and teardown routines. Added altp2m_lock_init macro for use in altp2m_init. Split altp2m initialization in p2m_init into a separate function, p2m_init_altp2m, to more easily gate code behind CONFIG_ALTP2M. Pulled in addition of active_vcpus from a later patch in the patch series. Split teardown and free of altp2m views into p2m_teardown and p2m_teardown_final (part of altp2m_teardown), respectively. --- xen/arch/arm/include/asm/altp2m.h | 4 +++ xen/arch/arm/include/asm/domain.h | 8 ++++++ xen/arch/arm/include/asm/p2m.h | 5 ++++ xen/arch/arm/mmu/p2m.c | 44 ++++++++++++++++++++++++++++++- xen/common/altp2m.c | 2 -- xen/include/xen/altp2m.h | 2 -- 6 files changed, 60 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h index 698c35427e75..5a217f48b103 100644 --- a/xen/arch/arm/include/asm/altp2m.h +++ b/xen/arch/arm/include/asm/altp2m.h @@ -19,6 +19,10 @@ static inline bool altp2m_supported(void) return true; } =20 +#define altp2m_lock_init(d) spin_lock_init(&(d)->arch.altp2m_lock) +#define altp2m_lock(d) spin_lock(&(d)->arch.altp2m_lock) +#define altp2m_unlock(d) spin_unlock(&(d)->arch.altp2m_lock) + /* Alternate p2m VCPU */ static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v) { diff --git a/xen/arch/arm/include/asm/domain.h b/xen/arch/arm/include/asm/d= omain.h index 576dbdec20af..9e69d62086cd 100644 --- a/xen/arch/arm/include/asm/domain.h +++ b/xen/arch/arm/include/asm/domain.h @@ -128,6 +128,14 @@ struct arch_domain #endif =20 struct resume_info resume_ctx; + +#ifdef CONFIG_ALTP2M + /* + * Lock that protects critical altp2m operations that must not be perf= ormed + * concurrently. + */ + spinlock_t altp2m_lock; +#endif } __cacheline_aligned; =20 struct arch_vcpu diff --git a/xen/arch/arm/include/asm/p2m.h b/xen/arch/arm/include/asm/p2m.h index 8ae0cd7ff589..db715c4f8bfc 100644 --- a/xen/arch/arm/include/asm/p2m.h +++ b/xen/arch/arm/include/asm/p2m.h @@ -9,6 +9,8 @@ #include #include =20 +#include + #define paddr_bits PADDR_BITS =20 /* Holds the bit size of IPAs in p2m tables. */ @@ -117,6 +119,9 @@ struct p2m_domain { /* Keeping track on which CPU this p2m was used and for which vCPU */ uint8_t last_vcpu_ran[NR_CPUS]; =20 + /* Alternate p2m: count of vcpu's currently using this p2m. */ + atomic_t active_vcpus; + /* Choose between: host/alternate. */ p2m_class_t p2m_class; }; diff --git a/xen/arch/arm/mmu/p2m.c b/xen/arch/arm/mmu/p2m.c index 0d37760ef5d5..04d17e787259 100644 --- a/xen/arch/arm/mmu/p2m.c +++ b/xen/arch/arm/mmu/p2m.c @@ -1,4 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include #include #include #include @@ -7,6 +8,7 @@ #include #include =20 +#include #include #include #include @@ -1486,6 +1488,20 @@ int p2m_teardown(struct domain *d) { struct p2m_domain *p2m =3D p2m_get_hostp2m(d); =20 +#ifdef CONFIG_ALTP2M + unsigned int i; + int rc; + + d->altp2m_active =3D false; + + for ( i =3D 0; i < d->nr_altp2m; i++ ) + { + rc =3D p2m_teardown_one(d->altp2m_p2m[i]); + if ( rc ) + return rc; + } +#endif + return p2m_teardown_one(p2m); } =20 @@ -1499,6 +1515,9 @@ void p2m_final_teardown(struct domain *d) * where relinquish_p2m_mapping() has been called. */ =20 + if ( altp2m_supported() ) + altp2m_teardown(d); + while ( p2m_teardown_allocation(d) =3D=3D -ERESTART ) continue; /* No preemption support here */ ASSERT(page_list_empty(&d->arch.paging.p2m_freelist)); @@ -1595,6 +1614,24 @@ struct p2m_domain *p2m_init_one(struct domain *d) return NULL; } =20 +static int p2m_init_altp2m(struct domain *d) +{ +#ifdef CONFIG_ALTP2M + int rc; + + rc =3D altp2m_init(d); + if ( rc ) + { + p2m_free_one(p2m_get_hostp2m(d)); + return rc; + } + + d->altp2m_active =3D false; +#endif + + return 0; +} + static int p2m_init_hostp2m(struct domain *d) { struct p2m_domain *p2m =3D p2m_init_one(d); @@ -1608,10 +1645,15 @@ static int p2m_init_hostp2m(struct domain *d) =20 int p2m_init(struct domain *d) { + int rc; spin_lock_init(&d->arch.paging.lock); INIT_PAGE_LIST_HEAD(&d->arch.paging.p2m_freelist); =20 - return p2m_init_hostp2m(d); + rc =3D p2m_init_hostp2m(d); + if ( rc ) + return rc; + + return p2m_init_altp2m(d); } =20 /* diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index cda653b713f0..989d8bdcb923 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -15,7 +15,6 @@ #include #endif =20 -#if CONFIG_X86 int altp2m_init(struct domain *d) { unsigned int i; @@ -60,7 +59,6 @@ void altp2m_teardown(struct domain *d) =20 XVFREE(d->altp2m_p2m); } -#endif /* CONFIG_X86 */ =20 /* * altp2m operations are envisioned as being used in several different diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index 85ef22c2b29e..238c7a935586 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -13,13 +13,11 @@ * regardless of CONFIG_ALTP2M */ =20 -#ifdef CONFIG_X86 /* Initialize altp2m views */ int altp2m_init(struct domain *d); =20 /* Free altp2m views */ void altp2m_teardown(struct domain *d); -#endif =20 #ifdef CONFIG_ALTP2M =20 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720885; cv=pass; d=zohomail.com; s=zohoarc; b=Jy759LTRO1XoqXHT30Dw67Xr2UQEEdaThYrtBVOeLUCdTwNa4COohYSGxK/8xEmy9V6WEwYEJXeM1zCBP+AHAqaAvDm6QEgowFewXq0V2BAa1+kiu2kTQGBPOH6bIpd/pWcD1bMUbcj7koc0hRcDRwB1Lu/pSGboe8mF1qYOang= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720885; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/xFPvcddJmAh/7k7Gzv3o+d1z1DGyz3l1lzwxv3F8MY=; b=XWQJQpt0edMGfF30KeAPSTQ91sGHKueI/uO/299h1OfvQ2fXPvYklo1KLiSYrkYQZd/bXU2IF/d6f0n/Pm0s9kBe5Z9x2iNbpZpyaMr5Rp0rcyrQ6f9OTOVNjo4mRis2Vij0qzZbqaNzwQM+VYZiefXT/wFznYExQULiSLvhsgc= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720885060163.5746363418216; Mon, 20 Apr 2026 14:34:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1288048.1568439 (Exim 4.92) (envelope-from ) id 1wEwG6-0006bS-8o; Mon, 20 Apr 2026 21:34:22 +0000 Received: by outflank-mailman (output) from mailman id 1288048.1568439; Mon, 20 Apr 2026 21:34:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwG6-0006bD-5e; Mon, 20 Apr 2026 21:34:22 +0000 Received: by outflank-mailman (input) for mailman id 1288048; Mon, 20 Apr 2026 21:34:20 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwG4-0006Pi-J6 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:34:20 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwG3-00CCTa-Vc for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:34:19 +0200 Received: from [10.42.69.10] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69bbd-bab6-0a2a0a5309dd-0a2a450ab8e6-38 for ; Mon, 20 Apr 2026 23:34:19 +0200 Received: from [40.107.200.94] (helo=CH5PR02CU005.outbound.protection.outlook.com) by tlsNG-4011c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bda-56b3-0a2a450a0019-286bc85e257c-3 for ; Mon, 20 Apr 2026 23:34:19 +0200 Received: from DM6PR07CA0099.namprd07.prod.outlook.com (2603:10b6:5:337::32) by SA6PR08MB10377.namprd08.prod.outlook.com (2603:10b6:806:442::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:13 +0000 Received: from DS2PEPF00003441.namprd04.prod.outlook.com (2603:10b6:5:337:cafe::6d) by DM6PR07CA0099.outlook.office365.com (2603:10b6:5:337::32) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:13 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by DS2PEPF00003441.mail.protection.outlook.com (10.167.17.68) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:12 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHX1Mrqz1wdW; Mon, 20 Apr 2026 14:33:12 -0700 (PDT) Received: from CO1PR08CU001.outbound.protection.outlook.com (mail-co1pr08cu00105.outbound.protection.outlook.com [40.93.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:11 -0700 (PDT) Received: from BY1P220CA0050.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::12) by DS1PR08MB10100.namprd08.prod.outlook.com (2603:10b6:8:20f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:07 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::9d) by BY1P220CA0050.outlook.office365.com (2603:10b6:a03:59e::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:06 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:06 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:03 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=FMSJb+aycSBeSNUd2T2odW6B6bxjmQ6Rm8gpTxZ6fSBUSxTFtwJokiIXh1/TkgEdTefxjrFQIP87cd5OsUEm2lhCL7NpwMReJAUWh/8ADSWHiXpsrsArTygBKwxLJ8ZOA8S7YymLOwK5JqPy69ZD1z1r1BdmQ8ykm2GhEiauuQbQWJZaWhOpC74qhKogZrtWK4NIWhJ9HqMCfTjhb+vBfeCx+XifgOBgIEA++3oA1VlwxH/E3sbALtKxDOKXqmPkJJyKll06m7Ix1Y0GbstFX67X7RlgpnkJAwcslZHq1Im9MwMDjGdRNrtirU6KbSLkYI82JGHTug0ZKWBA6GsfZA== ARC-Message-Signature: i=2; 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=/xFPvcddJmAh/7k7Gzv3o+d1z1DGyz3l1lzwxv3F8MY=; b=FtO5hosF4UFmybFgkE5MNXObp9CcuUkGfkAsyOaO6x5jr91YWzqiEYm8TI8/kCMG/ucXudBzu0XQMjLiNGlHPpRrFzKgOrRg159uUzJHABRA9ki54/aevmq4WVwOgTWa7xcZXT51XUMOAsqGbL1BXm9FsFn+983PGBkrSfHDDais0vD4oYnQyhCCjje02ogzUe7304PWaLJzY4CIroFJlbi4waWg/sxPawI+5VoL5YbpAwGZTBaESi5UXCnUk2IdDGHNU/5GUOQpw/RcmoSQnBjRIHJzVuvfrLXhlNm90/WhA6Q03Xx9/HkBY4FzfmEREBWXnMJY6Gy6PnQE5681iA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.10.101) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/xFPvcddJmAh/7k7Gzv3o+d1z1DGyz3l1lzwxv3F8MY=; b=Do+yb01PklVe/ucKnNrT5TGaO5B9IhPKJf4Jqav+iIHTFb8I7gVa6LxD9CevNrzf90um7qnIeBvYmgQQh9DkvRzTqYqb2YAO41k9+Rni1SUs4/0Qbv5vlg5ROw7cw8XcUQX1lca/ZxYQYynArxOWCwgw1DQpe7Ry3lgbRzj938s= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.10.101) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.10.101 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.10.101; helo=CO1PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GBCsg2ercueuEKeF0TYR6sv3g/OnwKJI/KoHsck0DQNbLFjG5pIepqMPcVHXAzBObIn3zIKw/2/pl7exPVM5nRBwds3pu7y714zCSxcVPPNkQUy0chpCq6GaMXqc+6Skss3/IJJulxmhPQr0fOXnbSFEaYomnI9JjSMB1so5CEO2QmXppDp4U39c7Wf/Wu97ZFRsjt5nsYsZwNvQqosO+GI24VpE4oYhnSwK7zPSEM6XVKt4RWkE5Ew9e/6buI5Uq+EW8+h+RiRsRNfYSiIbbwepCnzg2IvMBrI1BY8/fuuKdwAgovvFXmooD+FhHhKJuSKHcK4LNpuyUqnxfB0eDA== 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=/xFPvcddJmAh/7k7Gzv3o+d1z1DGyz3l1lzwxv3F8MY=; b=ToZBUZNWZo6MlM2dD8W1B4+Q9cgbz/akBeKRXuWhVEnaG3Xki+ozy5dk2DOvIUJy7ot6If9Zyq9W/5B1m3M+/ILe0m1dE2dMKDc9HQiQ2pASmnz6pjd91JHxCGP1OS1y98izFgSPmWTmzfvxWMbQ3/KeZlIfKQowco23K5BZNiiM3+hxaeF3iZxoxBXDuGzI81uRz04o331FXfrw/vEd0kAsbLKJnu4Y3PPZfe3RhvXNC9W7o+IOifKdk5HJGmHxYHFR4FbwDwl3Zjrx9dJCSWAMpwoPTfCpB01VmMsevQG9Oq577gHB3Wzq7em0llBJa+vzDaHfJjIQnB2nWxwEfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/xFPvcddJmAh/7k7Gzv3o+d1z1DGyz3l1lzwxv3F8MY=; b=Do+yb01PklVe/ucKnNrT5TGaO5B9IhPKJf4Jqav+iIHTFb8I7gVa6LxD9CevNrzf90um7qnIeBvYmgQQh9DkvRzTqYqb2YAO41k9+Rni1SUs4/0Qbv5vlg5ROw7cw8XcUQX1lca/ZxYQYynArxOWCwgw1DQpe7Ry3lgbRzj938s= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Anthony PERARD , "Michal Orzel" , Julien Grall , "Stefano Stabellini" Subject: [RFC PATCH v6 24/43] altp2m: Move altp2m_{get,set}_altp2m to common code Date: Mon, 20 Apr 2026 17:31:47 -0400 Message-ID: <20260420213206.208750-25-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|DS1PR08MB10100:EE_|DS2PEPF00003441:EE_|SA6PR08MB10377:EE_ X-MS-Office365-Filtering-Correlation-Id: ba8a10f7-8e77-4801-bc5f-08de9f246d21 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704162011799003|82310400026|376014|36860700016|1800799024|22082099003|18002099003|56012099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?plf4No1i4qaig8xaNEwulhp9ZVMS/ZyAQELNLk/dGWWGgshsKxx1P1JLJnDv?= =?us-ascii?Q?LlCTn9jFUx3napKq/tRKiWvv8+peRaJN3g5ekR+JzY6kxARfsjqZ8sskLrJS?= =?us-ascii?Q?NwyAHS/RQbrwkW/CEPq65+1Wxan2M4NzUfLzPXLX4k3e93bfS9JiTdCzWili?= =?us-ascii?Q?2UFRIPrp9u7ilIInwWfFIi3PXbeVJl4jH/ecdl0ZBMhBq+cGLYhr082FBo0H?= =?us-ascii?Q?csPTdBw+G9UHyzp2sugI5PNjlT+Z19VV3/kgZZcqbL3M79SbQuEZR9apPXsJ?= =?us-ascii?Q?GofE0d7SgvnAfvNx7TXcsYNL2BEMGMOXdPGOE9FqljrXem48zSdq31ZmCPQe?= =?us-ascii?Q?74SJjYqFtuB/9JzFwo0FwYbjyK55mi12svYDlfrFNCw+hSGUdIbPsStw+5uK?= =?us-ascii?Q?v+rkife7z9IvxZ1beIbUPNGbHNlQMBf6cGL04qfOn6QXnoWlr1bJktQ0BCms?= =?us-ascii?Q?k4bMNl4M4IcnQEWDgvMxdAH29Y8ZJbOuspq6RiUc1I9SHfbVUoE3XsZdsuJC?= =?us-ascii?Q?OK+mNkbCEdTWYkLbvhREtFAsZytrRfQSq/ghwZXDk5FHiGikR9zJ84222kzH?= =?us-ascii?Q?mMIsddWewL7qdCVyDaEdV1P8PeffyCMNj5V0UfWERvG5vyTPBpkyvoheaEFB?= =?us-ascii?Q?ypfeMJBFzxSwk2OxruCQU4ISk+u6jKxMDouB69xYAtgdJF/dA5TDTzAFeTUH?= =?us-ascii?Q?vfSybHG5vXgcUgEJrpXA2HicuRCvScpEP+FKkHvFQ//q6XXFRVA9/fU7j79L?= =?us-ascii?Q?SlYt5QOZQbkFJOavlF5YyVTQkPwn9wn7OajD09WXX01yNypvuSF3+VvbQKcB?= =?us-ascii?Q?jjRm38HTwKgJjKFnd9mk54NxgyV152rpJFMtOOZXM8Rn5qF7rFDOnL1gBeEU?= =?us-ascii?Q?f0LxjqrxskXNi8Esf9TloGOfM9NPOPmPlZiKxSIuCMmkdudExFQM0yoJtxsz?= =?us-ascii?Q?wPeKqxH7lIx4yF3NFKXz/HL/06/l/PM8YOmoriWzxjJ0Q1Zpvlv243GF7jTe?= =?us-ascii?Q?Udg8CsopbZeEfv+6Vugw//l0Q8JovXXzyYltwuvfyscwXh2I53boir7SRgbc?= =?us-ascii?Q?15A1zV4uYUp7FpaEGQAFikayhrLIhT2zFDtbWkP8mYVobYc9cEk=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704162011799003)(82310400026)(376014)(36860700016)(1800799024)(22082099003)(18002099003)(56012099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: kF+1R3q0ur4DjIQj5hLgP9cliSm+EMnL67vX7yTykMLxpaQSoX4ILvEwjYndQaNVoe2aE07imtcVPlpiIOUPgjMqtevpmlHwPgpFH9b+GaqXUehF7jgc50/wQoRUmoRRhiq56yrlj7ZYWTTIvWLxvx//ipfw48Na0x93WjVkmRbnpJ+qxIAbZ7ImPf6/5Kqs+5dKSGMskOUC7Dtuk1TZvXU72zhsW2Zsyp5RdASssIjG+Q/QL7zkZ0yKCE2ZOI87PvkJ+K6uyO2jwJ9xVrIAiZ2f+ts36kng37q8Ao7frfC2SDOC20SloRYvBGE4za+bNMrTi+Hdu39+8pSZ2Uq8Gg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR08MB10100 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.10.101];domain=CO1PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.10.101];domain=CO1PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DS2PEPF00003441.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4527a19b-3f7b-4a49-a2b8-08de9f24695f X-Microsoft-Antispam: BCL:0;ARA:13230040|704162011799003|82310400026|14060799003|35042699022|156008|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?jzNqBdScYahaIBUAshj2iQ7+IFxB2vjNP9H9zhY3GQ36KzBL9aW2ieKFtMcF?= =?us-ascii?Q?q/LqRa6sx2R2DQPtfbtShrVRrrn8EWueEZCGjIA4l6OUJrcjr4nT2SWMvXiD?= =?us-ascii?Q?50qu5ZDCLy7euOi+Vok2ryJ9vTAtZP3EMWdAJyjxdZ6Jv7KukbU4FRprrCWC?= =?us-ascii?Q?OLQ6ADPdU1/bLud2AxqtJntqI4BOXsBYVCS4sR3QSZJD21oYuztI3tCyvt3u?= =?us-ascii?Q?Pe7n+eXPn53flpinrJCjbX7w3wPaRvhNyX+wfoZHuTr5FPzYDJj09HGujZEE?= =?us-ascii?Q?5YzrEYMS0BdqKxjeY8ZVKgY3fwLh9BmUqbu28FHadDY1b4AmVOCz2Su4osij?= =?us-ascii?Q?ZTUkLbLiRwCtxiGdmmcW/PPaoXIs5lbmvoBPf1Vtk7BgEp+DoRvUVWfLu9lW?= =?us-ascii?Q?4NjTOKkifnty1Wqjqr2XdwTwXXxAhsxAjid+oorKgGLRHEKbCcaUCOey+x2F?= =?us-ascii?Q?y0ZYPRcwe44AZGR7V6sXrWqy+TVf1Tlf8JQv05vVxWIPhPKd7C2vbhoEiOW9?= =?us-ascii?Q?yG2J2Xl+Y/l7xgGWvKsxdrQZ2nq/apqvxgZ06o6i4mcteNihVpI6XnG7TTYY?= =?us-ascii?Q?qwgsrhZpd1YiBVQHUQlmrgy0E66SDr7cCXhfiGBAMXIig8sHor52crGhqtrC?= =?us-ascii?Q?1UK5I+09qCHwmqXbcFAJ8tSc1fFI7vvzDMPTDfg2ihIKvCl1dioaciy9J6/C?= =?us-ascii?Q?d382OW6MemMP8ucs2W809VtYyzEwxItON53ttiXQ8xaiBxxhwR63EZL7CnTO?= =?us-ascii?Q?jkaKfWEhTSDjwdqDriDyFDx1QgowIFABTqeXjwbDth8IX0Ej2VD6RpiMgSKW?= =?us-ascii?Q?UrcEg+Z2nGqdqe+pyWIP/snGljz838x5zfpVHFyK5GFPFigS3BMQSZRgqXMh?= =?us-ascii?Q?sUJSELYBOe/BlYA/HfsOTOeUQm2LF6s2NeP91bWP8Tiw6QSadKwsrJ+uFiRy?= =?us-ascii?Q?aE4ou4eM6gLI4O6A+tj1nD4GWGnNQaQlN+3p9wQJW3Fi9l1A7rU7t3qvyEIT?= =?us-ascii?Q?H2bSSPhpmxhLv+XeulACct0Av6rJ4VUXt6lDRqVlyHg2P6FNbQwyAQ/fcici?= =?us-ascii?Q?9JjZW8rioYW4r+c5yLzPU7fkVr9rcefE5kUSuCbwoj8zChrGEeQ=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR08CU001.outbound.protection.outlook.com;PTR:mail-co1pr08cu00105.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704162011799003)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3gCVpOTRP8Rxv8bgbH/+D3/HnDM2ynhus4TnTzhKaXuJDm2Zudoxylf315XGq04vLUnO4+522F55/KyPAx5RrEk4cA2nIZc8Mg2veO8B9PM67jxoPKZlA+ySKE2E5BCGY3fGMWsVd1BOcjv4FCc7qLxVGocV0jEZQYTINvZHMSJfhy3F4C2UJIPZUGpx/8RJth6P7OCjkUObxCbgUuf7ocgqEgARksOXTsZAlsLUfEqZpcDFlXf7aD3fu36qFtSh9oSZgI48z5A1lYApV3o0NI+5DYnbwIkbSfJsvvgVJ709SzXYfOlUJnLyaeP9MjbGmGSBDPr2CE6owEzHeHHwZepjvTuswlgpSSa1HtzV/fGesWA8xx7QqNi8QJGf/WKOM2FQXX+mF2jcf5H96+3dQcVGf/zE+DWWRh20SJIuahx1lTogJy5er3MG4m4cWHO3 X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:12.8485 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ba8a10f7-8e77-4801-bc5f-08de9f246d21 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-DS2PEPF00003441.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA6PR08MB10377 X-purgate-ID: tlsNG-4011c0/1776720859-81B878B7-49AFD179/0/0 X-purgate-type: clean X-purgate-size: 5044 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720887874154100 Content-Type: text/plain; charset="utf-8" This commit moves the altp2m_get_altp2m and altp2m_set_altp2m functions to the common code. This make sit possible to use them in other common routines (namely, altp2m_vcpu_{initialise,destroy}). This commit contains only code movement, and no change in functionality is intended. This is commit 1/4 of the altp2m_{get,set}_altp2m phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/include/asm/altp2m.h | 35 ------------------------- xen/arch/x86/include/asm/domain.h | 2 -- xen/common/altp2m.c | 1 - xen/include/xen/altp2m.h | 43 +++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 38 deletions(-) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index 13017525a62f..a1b078783b3e 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -64,39 +64,6 @@ static inline uint16_t altp2m_vcpu_idx(const struct vcpu= *v) * Alternate p2m: shadow p2m tables used for alternate memory views */ =20 -/* get current alternate p2m table */ -static inline struct p2m_domain *altp2m_get_altp2m(struct vcpu *v) -{ - unsigned int index =3D vcpu_altp2m(v).p2midx; - - if ( index =3D=3D INVALID_ALTP2M ) - return NULL; - - BUG_ON(index >=3D v->domain->nr_altp2m); - - return v->domain->altp2m_p2m[index]; -} - -/* set current alternate p2m table */ -static inline bool altp2m_set_altp2m(struct vcpu *v, unsigned int idx) -{ - struct p2m_domain *orig; - - BUG_ON(idx >=3D v->domain->nr_altp2m); - - if ( idx =3D=3D vcpu_altp2m(v).p2midx ) - return false; - - orig =3D altp2m_get_altp2m(v); - BUG_ON(!orig); - atomic_dec(&orig->active_vcpus); - - vcpu_altp2m(v).p2midx =3D idx; - atomic_inc(&v->domain->altp2m_p2m[idx]->active_vcpus); - - return true; -} - /* Switch alternate p2m for a single vcpu */ bool altp2m_switch_vcpu_by_id(struct vcpu *v, unsigned int idx); =20 @@ -178,8 +145,6 @@ static inline int _altp2m_get_effective_entry(struct p2= m_domain *ap2m, _altp2m_get_effective_entry(ap2m, gfn, mfn, t, a) =20 /* Only declaration is needed. DCE will optimise it out when linking. */ -struct p2m_domain *altp2m_get_altp2m(struct vcpu *v); -bool altp2m_set_altp2m(struct vcpu *v, unsigned int idx); uint16_t altp2m_vcpu_idx(const struct vcpu *v); void altp2m_vcpu_initialise(struct vcpu *v); void altp2m_vcpu_destroy(struct vcpu *v); diff --git a/xen/arch/x86/include/asm/domain.h b/xen/arch/x86/include/asm/d= omain.h index f8038087e612..72460e38f581 100644 --- a/xen/arch/x86/include/asm/domain.h +++ b/xen/arch/x86/include/asm/domain.h @@ -277,8 +277,6 @@ struct paging_vcpu { #define MAX_NR_ALTP2M MAX_EPTP #define MAX_NESTEDP2M 10 =20 -#define INVALID_ALTP2M 0xffff - struct p2m_domain; struct time_scale { int shift; diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index 989d8bdcb923..a731ad7cdab8 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -5,7 +5,6 @@ #include =20 #include -#include =20 #include =20 diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index 238c7a935586..58e74be6deb0 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -8,6 +8,10 @@ =20 #include =20 +#include + +#define INVALID_ALTP2M 0xffff + /* * Common alternate p2m declarations that need to be visible * regardless of CONFIG_ALTP2M @@ -27,6 +31,41 @@ static inline bool altp2m_active(const struct domain *d) return d->altp2m_active; } =20 +#ifdef CONFIG_X86 +/* get current alternate p2m table */ +static inline struct p2m_domain *altp2m_get_altp2m(struct vcpu *v) +{ + unsigned int index =3D vcpu_altp2m(v).p2midx; + + if ( index =3D=3D INVALID_ALTP2M ) + return NULL; + + BUG_ON(index >=3D v->domain->nr_altp2m); + + return v->domain->altp2m_p2m[index]; +} + +/* set current alternate p2m table */ +static inline bool altp2m_set_altp2m(struct vcpu *v, unsigned int idx) +{ + struct p2m_domain *orig; + + BUG_ON(idx >=3D v->domain->nr_altp2m); + + if ( idx =3D=3D vcpu_altp2m(v).p2midx ) + return false; + + orig =3D altp2m_get_altp2m(v); + BUG_ON(!orig); + atomic_dec(&orig->active_vcpus); + + vcpu_altp2m(v).p2midx =3D idx; + atomic_inc(&v->domain->altp2m_p2m[idx]->active_vcpus); + + return true; +} +#endif + int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(void) arg); =20 #else /* CONFIG_ALTP2M */ @@ -41,6 +80,10 @@ static inline int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(vo= id) arg) return -EOPNOTSUPP; } =20 +/* Only declaration is needed. DCE will optimise it out when linking. */ +struct p2m_domain *altp2m_get_altp2m(struct vcpu *v); +bool altp2m_set_altp2m(struct vcpu *v, unsigned int idx); + #endif /* CONFIG_ALTP2M */ =20 #endif /* __XEN_ALTP2M_H__ */ --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720828; cv=pass; d=zohomail.com; s=zohoarc; b=RhISBWszgqKOrumpfENBC/kpBQRl/BlDi3RRHVPVdaHyRfiTAL7bkIgeCq+Mb81LNPPK+AZiAgjyrK+3ptNOtboqYUPtkaIUnT4fUqFFZ8jxl4dtYVNhcQAz3uBtZJxL/cvWUIeSTzxs9p/5ZlY/XaJukAXpDJK/lIu+PMPwtUk= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720828; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YyF2sek1Gl4M2bt+N59A0D5zPi4VE0N2VV6Dzby1vi0=; b=B+UXHEZKyUu0vNikmUraZN+Ge9B8u2knHkuXWUBOAWPKNNbVUxHowI+e56A1WWYnvcJ6Y7lLNWy9hJxvE46j9OqDweyBSx1V2GDW8lTiKVBu7xSh1+X/3/CqUraEvdNAtNfavfhPNTSUwm5Vz/gSZ2G5j5VsHkatGd5UPKNeweo= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 177672082867393.18521961349018; Mon, 20 Apr 2026 14:33:48 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287817.1568264 (Exim 4.92) (envelope-from ) id 1wEwFB-0004E6-Bw; Mon, 20 Apr 2026 21:33:25 +0000 Received: by outflank-mailman (output) from mailman id 1287817.1568264; Mon, 20 Apr 2026 21:33:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFA-0004AS-Hh; Mon, 20 Apr 2026 21:33:24 +0000 Received: by outflank-mailman (input) for mailman id 1287817; Mon, 20 Apr 2026 21:33:19 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwF4-00030Q-Tq for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:19 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwF4-0054Hn-9c for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:18 +0200 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b93-5cb7-0a2a0a5109dd-0a2a4504dc78-12 for ; Mon, 20 Apr 2026 23:33:18 +0200 Received: from [52.101.62.107] (helo=DM5PR21CU001.outbound.protection.outlook.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69b9c-1dec-0a2a45040019-34653e6b23f9-3 for ; Mon, 20 Apr 2026 23:33:17 +0200 Received: from SN7PR04CA0051.namprd04.prod.outlook.com (2603:10b6:806:120::26) by PH0PR08MB10954.namprd08.prod.outlook.com (2603:10b6:510:383::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:12 +0000 Received: from SA2PEPF00003F63.namprd04.prod.outlook.com (2603:10b6:806:120:cafe::e5) by SN7PR04CA0051.outlook.office365.com (2603:10b6:806:120::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:12 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SA2PEPF00003F63.mail.protection.outlook.com (10.167.248.38) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:12 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHW33vXz1wdZ; Mon, 20 Apr 2026 14:33:11 -0700 (PDT) Received: from DM5PR08CU004.outbound.protection.outlook.com (mail-dm5pr08cu00404.outbound.protection.outlook.com [40.93.13.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:10 -0700 (PDT) Received: from BY1P220CA0047.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::9) by CYXPR08MB9432.namprd08.prod.outlook.com (2603:10b6:930:e5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:08 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:59e:cafe::82) by BY1P220CA0047.outlook.office365.com (2603:10b6:a03:59e::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:08 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:07 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:05 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=gA66qJ1qr9aYoIM5IssLJzzsSas8fVxu/c5AmC9I/YQn2Q9A1tr7XY3Vu9A/GxyMFlTdUNT368It7QXpYvVxV2vLtEhdalnM0OWNm2EcGyzsG885yh4LEbxszsRq3SXWbGQAnBFud/0YzXBwkV/WPNNlB5eVQQ2KJD5eJf8Ikcf9H7aIu260IZNwgyPsAcAXsNMWRCpJfolfr+4Efb3vlKRGoOXxJO8IKR0TOmgWLJIJoLUa5XP6NpdHVLOdVg1Oww8ON4xQRuRkMWZy8THvUQ0m3i0nWPwmP86R6+RrByZid7YGKwL4/l4yhlWJtTShpe0mzctqDGffF6Q3c0a9uQ== ARC-Message-Signature: i=2; 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=YyF2sek1Gl4M2bt+N59A0D5zPi4VE0N2VV6Dzby1vi0=; b=wnCGf150i/7w01QvMem5/ix7wTNuRrQIApEfiJsyjYayp/r8O+YX9gxMRIFzsuvjVeTcWvJeDsFQjzCxDM4rN/fFxqnegCkP9bSsgKjDEUHfMVcMvgb23fEs+rVUVOJvWF1T39B9pcFdljVJG+A2/hlJWzIWEWZXdSHUJuz7JYhOztZnfN9I+DU6y0pe8Jx80Kmh04RtEYKjqQDSCNTkHQyrWuU0HwPxYa/WC4lapALRL6Kbd6gooT7Tveo+6kkQDODOUfRF400lfQqiBiS8opE/LbjrriEt1mRfHMGdxzOkm1bIEbihfBJkMNmkS/hickeZO5AheGwVa1ibTVXCqQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.13.100) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YyF2sek1Gl4M2bt+N59A0D5zPi4VE0N2VV6Dzby1vi0=; b=THCmPKYmR4mNKVFXzs4CHRnXw/CU0va6qOrv1kWN9MLrxMFnJCKgknBzQpkhA9AeEuajOUIija31UZ6jgFSnb+ueBtv/vegZvIFL9TiE4veiGk7zWp9wygHEV6eBrosVQK6Cd5ZziVYMm/PYQyUSbbcmMa6829BCxXsL6t2CMm4= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.13.100) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.13.100 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.13.100; helo=DM5PR08CU004.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LqwhXpYbI7+4tnBowhn+W0TszIQV4DVijXufMJHC9f4cEOoZRejEayA1hyqJ9xxtClmS9i/D3b2zr21GrHhbFEFjSrsq8ONsTsdC7gawMGUStRN/W+4QP9eWDzkeL/X+ioJgigO7L74ubzyBDktnp7cp0gEqG/EisUGPDAfMQw9DTHufLSSLDpntbXYBLbNdSUsSc4Cr6G66PQ5Oeb50U6GveIa6GpeUM8cPC0A+F8TBV8KvjQee+PCrl31i3MsgCLgPlD/L9S76Y23TCqgl66PJFcTEZ56Vs3OsIlAN5wHnBs9c7vCl/s2eS+l/zDZ15r0agSwEEwGaKDPzWqOunQ== 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=YyF2sek1Gl4M2bt+N59A0D5zPi4VE0N2VV6Dzby1vi0=; b=uo7owkK779+Jyq+s+nDeOMw8B71wLx8mxtvS0gVL61YwX28YXWfSc5iYCMmVKWHyq2vX63onBSvZtA4nx+MOAsSAZ9GdHFXxUCXkfi4IbTGgJbuS0izEunYx7mo0cLA/W/x5DYn+DYdPVBdgmmbdIBvlFiNhV6hzJaEc/v16VG9dtMLP0nifSFiMga0vKD2XFF0gOLmdZa8pwE72hvohZC86FxMyuBmhsXDmE9udO4w/D7f9SsRvSwZwyVlsQgTZS/LuL65zgaBjIVM6t3I6oNuZeT815tiV/BNv1866JOikXfjfqtAblAOmq4cK9D86+jvR5pmxYEfiRYImfHoBjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YyF2sek1Gl4M2bt+N59A0D5zPi4VE0N2VV6Dzby1vi0=; b=THCmPKYmR4mNKVFXzs4CHRnXw/CU0va6qOrv1kWN9MLrxMFnJCKgknBzQpkhA9AeEuajOUIija31UZ6jgFSnb+ueBtv/vegZvIFL9TiE4veiGk7zWp9wygHEV6eBrosVQK6Cd5ZziVYMm/PYQyUSbbcmMa6829BCxXsL6t2CMm4= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Sergej Proskurin Subject: [RFC PATCH v6 25/43] arm/altp2m: Add altp2m index to arch_vcpu Date: Mon, 20 Apr 2026 17:31:48 -0400 Message-ID: <20260420213206.208750-26-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|CYXPR08MB9432:EE_|SA2PEPF00003F63:EE_|PH0PR08MB10954:EE_ X-MS-Office365-Filtering-Correlation-Id: 558191f2-997b-4489-a2f6-08de9f246cbc X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?7Ghb1HU84mtv2uHW7K9PpWSE9hUaeEg9Z5RP4QbbjZ8ZKMwVEqLO7m8oLEOZ?= =?us-ascii?Q?MLUCvdNpSV4pykqo0cqw3ykDgUE6DcpizpjCXxNFE/PnYVPFdNuezQpL9UjJ?= =?us-ascii?Q?zOXET97q8Ys+RsoVE8otbU5Ig72LVWVnoQErwRceltAyqTp1pP3ykArC1kdb?= =?us-ascii?Q?zC0vyPPlirexpEQY/LxbjQHZdkh7LzEY8YSde1Pju536ohB20VKPUEQ47D8g?= =?us-ascii?Q?4Or+zWp7cB8kl2ivCx2fxPVNllsme++Xreiu22XGC8XYEUszOQG+MnY2IB3r?= =?us-ascii?Q?q6OiWzhzWYIhhJB0kW6Ybt/YEfFSjviRbCeOEv6LAexiXxHdSjJOSSRMRZkz?= =?us-ascii?Q?ojIxKGSclFati+lgPuCDHmv04aZBrbu/ut900oBVrwUUkftNMppxNuauUMFH?= =?us-ascii?Q?9fgRFIcy1WOiXtT6OhxPDcBpX2ORx2hHo8Jxb2htToB3xaUBnD/jVA9YNSCh?= =?us-ascii?Q?f9TQhkEeypsc7rcVyEm3oP1MwnkLyMXZUeB/uIxbMYs58wYpd+BgetIjgY/L?= =?us-ascii?Q?ZuSMNr8LrY46frKIH1Mg9dzWpvRQ2qJJOYCjtavwrPt5m1cWPxNQkW411gTY?= =?us-ascii?Q?WVuoOu964hd2gBWkDCOi+OolkwLtnaX8vSKruFIhGKdwTcdpEK1p/Q8a8s5S?= =?us-ascii?Q?U2zjCKtbB7kCtt1JF5EISBUfS/mn+q0EGw2/q1oFp5F2HM3qFwLOYx9abP+y?= =?us-ascii?Q?92Lso/2jvZl5pssAYORElkUtU5argSOLOeyIT7dXn/kqgLDxq1MUfEqGrvYS?= =?us-ascii?Q?5TMquytUwaEV8DVa3jVkr/GeYgf5kaHqZQOTyHnFxIytErxVpHfArzQSF6yO?= =?us-ascii?Q?nC2aH420ZoqFzBy1BtK9a2sC+C/ToULbNx/y5gvfNwAAXNl08yxk+4LggRJW?= =?us-ascii?Q?76IJ5aL5GfDnLTkM82gI4sfYg92+BblmwRDiZlmccmApib2qGkoPEHlwUoTk?= =?us-ascii?Q?69icvkiazn4m+Sm/WA8p3fheC61t7v4zct+xdGHa0c6OlxmZ9G4/Pk5CBf4c?= =?us-ascii?Q?CQHUOBmhmGX7vr16LDK1G1NgN8cgwBQv6iSJfHSvwxwqb6HFBRHSC+u1/z/S?= =?us-ascii?Q?B+cUDJLQ94n/Z5iOhysUyuYgkQXa7Dih4DhsJsPOIUKxcfrfg3olQ0EJXb0N?= =?us-ascii?Q?Fsau9Ms1VbVXZrbq/hC3MQb6DvI61cgFu/rA+DUpycD2g61oD7l701XGqXqV?= =?us-ascii?Q?wrdx8g1ytBHQrNMt?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: j7gEgFlDKiCBoTWJzwZ8nQTHvzGIdeI6kpJPS80llnwAvS/icOnuBYKFNlh2vDUecsfIVCTPX4tUAd5vgueFw4vO05nAx4jE9tAhrNJdE1OqvKRjddPxOFt6W/bRSpWMVZWpbRno0OEqtCB15k8ug3ZEwcO/M34woMfj8dcERry0CmclpJZQJIc/6ixwRoaysMy27cJ8uFLa9J2B7uA6IQiYvdXKI9aCdBC6/IWkJZJOb7vWWcfWKMBcZULif+vrU2H2MtZB78N5YfztUMNqY2j0i02XTEajax4g7+rEv0gy6UL4xOjGR77toch1EOInFxykwqsWiW0A98BCq1tDBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR08MB9432 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.13.100];domain=DM5PR08CU004.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.13.100];domain=DM5PR08CU004.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SA2PEPF00003F63.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6a518397-6404-4f65-65a3-08de9f246a21 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|14060799003|35042699022|156008|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ZAXdAa8Uiw9Qy0AH0NcwNiO7SNiVbdRav7pirYgZk2V+EM0nNBkw+c4jeNGH?= =?us-ascii?Q?07JlNVPMnqufeGwXwEB0uguilwTqKfFw32Xi6eVm3a0zddAdESjlO5KP3A7r?= =?us-ascii?Q?2o99ekmMVUJj5jdGFXwef9bi3jMcDTp9djofYcfjpVdzY8xHHb0frj3QYS/D?= =?us-ascii?Q?24i9NC+mTTufNBSYwBWoKVg1p0yUnvgaJuEO40PLG6BNdVhwbbQJcqMpKlhM?= =?us-ascii?Q?QgeSuSun5SC5MIaUKJTQSRCk8vSTsUmCvq8xsz3GnDvhbqAr2HrqruucT+KX?= =?us-ascii?Q?KNwN4Uo4Eyw+ab+7MgrNJQpdw/JfUsaFi/zYY0o06UB6AC8eGoIBatOqimR7?= =?us-ascii?Q?7iPSUpp0KoYWJNXZys5yBxwxT9/+EQwD7fbhsPFCEMaMjWuINuRjttSMCPDT?= =?us-ascii?Q?1HY+JiHqMfuM6c0o6wvWL0SButOaRUu9dme8IuedPXZrXI2gus7c7bECSOCn?= =?us-ascii?Q?kRGlpkg1qJmcKjeFpb8VbVeDSN5LuWSCwH7xD0x00/sdjMyDOuJVbDs5Z4gY?= =?us-ascii?Q?3ZABgLPJ0hwJwN0SseMtfAWUmwp/wRkRPdtqnFwYzjmcgEB7F/YQ+3c8kjf6?= =?us-ascii?Q?c5jB9KZ3scvyW5cC3K5nVIlt5efswurR+hyI82JGC1IFuKzc9YyhxLeCMV45?= =?us-ascii?Q?KnSTV9x9E4qCpxR06cZy0/nclxIKOgN+dua6xXro/nwm5WNlIhNqYWxrQOCB?= =?us-ascii?Q?GVa9iqXa8VV593er3LXzmMh0lwsNqUeLRpwJ4QiK8bT+lqQaHu8r3n2Z9mo7?= =?us-ascii?Q?OW71IqBjsEkOu55LhmylhCEqwG0BfgEsvjyxmm+UliZNn5kBhrCbW28dEL65?= =?us-ascii?Q?x+vK+9KQyd9xwsbQy7yFnZJ1QNfe+0Hfvmshmom2f1PL6wuwIEJ1uax3EMjS?= =?us-ascii?Q?uIPVR103mS3/qWXKKXtiKrJUnkNZ/95G9+HYPniQEKlrqXo1DV/fJsaMwiuH?= =?us-ascii?Q?ahu5aWZii2OFw32F0FLZoR14n3xnLKOtVTuGsp8OyFU25kwf835OGeoHOKiz?= =?us-ascii?Q?JI8IQseJ71VuxjnGa7p87Z2Mreu2eGnfutuWWUXJpyvmKyoxEcTxRKnapl8P?= =?us-ascii?Q?PwrX0n3J4Wtccg1/0wK+anpW92jJh6REPOg3nuMAwCwbKKVU3WjSXUH6U6C6?= =?us-ascii?Q?M/KHn17p6pmaWlLy0/5gi0oWW4EWKlHkLDr74V7Zuw4GuvaAnNGSQOs2Avxx?= =?us-ascii?Q?lJBO4BZX58lIkNZm?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR08CU004.outbound.protection.outlook.com;PTR:mail-dm5pr08cu00404.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6Q+0lxUSrYdC1w0ZC9H5r/Y807GB/iwhObWzzKFzu17Pgu2WWS2KrsUwPGv1fmqXkCnXZPkTPnOCeWfD6M3+kM4Pvs+Vg2cLQNhlbxCT6kVq35qgqcbIkhGKfl7IefkfCktIOHbUWwSHQYjRWtXjZkgACYCYEGYbgDS+oF3JEQ4s6TUOuWhqDJtBmkyDWU94mbETxaJLLaeSrTRe5BiG+6H8xHLdIoRk9KRfse5GmtgYvyCCQmL/2OvQok0F+8UCDBL1BlIi12Ib7zTQzLUyvcoWPM73xvjr2blnpN+4ge0XcOtNhiXP7HAoqocSZq/Og8A+YLoLGUw1GAg1HYhB5K5ZviJX4Arkx53p+YRC4CvK6rDP3MKP4YLWldstNh43rvvkFelehWGlhQZMnxmVqecZ0b76ypq8NZ+ZTvctRdWMWe0nj5onVgA1QJR0F1Sv X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:12.1554 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 558191f2-997b-4489-a2f6-08de9f246cbc X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SA2PEPF00003F63.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR08MB10954 X-purgate-ID: tlsNG-ebf023/1776720798-2AB633FF-B9597DD7/0/0 X-purgate-type: clean X-purgate-size: 1874 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720829303158500 Content-Type: text/plain; charset="utf-8" This commit adds ap2m_idx to the VCPU struct on ARM. This makes it possible to track the current altp2m view being used by a VCPU. This is commit 2/4 of the altp2m_{get,set}_altp2m phase. Signed-off-by: Rose Spangler Signed-off-by: Sergej Proskurin --- v6: This patch was originally part of the "arm/p2m: Add HVMOP_altp2m_set_domain_state" patch from the v4/v5 patch series. It has been extracted into its own commit to make the patch series easier to follow. If it would be preferred, this commit can be squashed into another commit. Added support for the CONFIG_ALTP2M option. --- xen/arch/arm/include/asm/altp2m.h | 4 +--- xen/arch/arm/include/asm/domain.h | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h index 5a217f48b103..bc695018e62c 100644 --- a/xen/arch/arm/include/asm/altp2m.h +++ b/xen/arch/arm/include/asm/altp2m.h @@ -26,9 +26,7 @@ static inline bool altp2m_supported(void) /* Alternate p2m VCPU */ static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v) { - /* Not implemented yet */ - BUG(); - return 0; + return v->arch.ap2m_idx; } =20 #else /* CONFIG_ALTP2M */ diff --git a/xen/arch/arm/include/asm/domain.h b/xen/arch/arm/include/asm/d= omain.h index 9e69d62086cd..4d497a21b648 100644 --- a/xen/arch/arm/include/asm/domain.h +++ b/xen/arch/arm/include/asm/domain.h @@ -249,6 +249,11 @@ struct arch_vcpu struct vtimer virt_timer; bool vtimer_initialized; =20 +#if CONFIG_ALTP2M + /* Alternate p2m index */ + uint16_t ap2m_idx; +#endif + /* * The full P2M may require some cleaning (e.g when emulation * set/way). As the action can take a long time, it requires --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720832; cv=pass; d=zohomail.com; s=zohoarc; b=iOl0LQ0tHNUjXh7TZ8sNAAeCaQ8HNIG8TKj0PghXUzoPeAteZParZwrtHFtMdx/2Yd1BjWSg2Z4OVd28H4qHVywcfOwCijbGMcHBR47QIqXrSaC3l15xQz8xz3cnNIwgdobuKYvuLaoKbTO3O4DaTXYQ+2JxIPva8CGmXGzl0fI= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720832; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VwN6LjYBkj1+FSQXCFug5OOMEvPQdMZIPBr0As48NFk=; b=Tn39DQcw6aKqM+6VIOzO5HvATX3YHuJ92rbFwCp8uQBkzQ3TPHUUhbtsO0O+xw5KxTS6xNyNAx2HhBTJmffj7qfMfien+NKPh37uUz9k5mmKBlYFVqiCE9bXpTDrVUzckMvNJRaQB8AXPPxt9VTMT1997eD0zR0FAKwta6Xv9sg= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720832129735.03057696774; Mon, 20 Apr 2026 14:33:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287840.1568279 (Exim 4.92) (envelope-from ) id 1wEwFF-0004yt-5D; Mon, 20 Apr 2026 21:33:29 +0000 Received: by outflank-mailman (output) from mailman id 1287840.1568279; Mon, 20 Apr 2026 21:33:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFE-0004uk-3D; Mon, 20 Apr 2026 21:33:28 +0000 Received: by outflank-mailman (input) for mailman id 1287840; Mon, 20 Apr 2026 21:33:25 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFA-00047h-BQ for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:24 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwF9-0054Hn-OA for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:23 +0200 Received: from [10.42.69.12] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b9f-5cb7-0a2a0a5109dd-0a2a450c9430-6 for ; Mon, 20 Apr 2026 23:33:23 +0200 Received: from [40.93.201.115] (helo=CY3PR05CU001.outbound.protection.outlook.com) by tlsNG-d25034.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69ba2-62f1-0a2a450c0019-285dc973c522-3 for ; Mon, 20 Apr 2026 23:33:23 +0200 Received: from DM6PR08CA0044.namprd08.prod.outlook.com (2603:10b6:5:1e0::18) by SA1PR08MB10871.namprd08.prod.outlook.com (2603:10b6:806:4b4::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:17 +0000 Received: from DS2PEPF00003446.namprd04.prod.outlook.com (2603:10b6:5:1e0:cafe::70) by DM6PR08CA0044.outlook.office365.com (2603:10b6:5:1e0::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:17 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by DS2PEPF00003446.mail.protection.outlook.com (10.167.17.73) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:16 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHc2Rvwz1wdW; Mon, 20 Apr 2026 14:33:16 -0700 (PDT) Received: from CH4PR07CU001.outbound.protection.outlook.com (mail-ch4pr07cu00105.outbound.protection.outlook.com [40.93.20.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:15 -0700 (PDT) Received: from SJ0PR05CA0146.namprd05.prod.outlook.com (2603:10b6:a03:33d::31) by DM6PR08MB6379.namprd08.prod.outlook.com (2603:10b6:5:1e6::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:11 +0000 Received: from SJ1PEPF000026C5.namprd04.prod.outlook.com (2603:10b6:a03:33d:cafe::4) by SJ0PR05CA0146.outlook.office365.com (2603:10b6:a03:33d::31) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:10 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C5.mail.protection.outlook.com (10.167.244.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:10 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:06 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=YABom5rJD70JrzzZcb8JZA98Qmss6TyupJYgErNShrHCC8hE0Qom4DcBT85MmJj45SO6sUXOaLUZldOIJty81MpqPuuIhMkYTPPVaSsWOLFlwcsWIQ3NTszWZ3uIFOWl+Kh9VgTMrkDq/MVyr/XiDjQth1T5sbFl8eQxX/v1OW/shIvppvLWezspeT8mFVWC0+gcESK1KYKtbL8CtDyfi2dpJ8tJY9OdSHe2oBiIPvtmau/8qnTiDL5Cz4Gp+3r4CbE/5s1E/htnDdsgK7KlmG4hJwOLgo7TI47o9cXkpFu/gsKKWL+gznM5J2etyp+LEdz1mKRES00dDccqtW+TVg== ARC-Message-Signature: i=2; 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=VwN6LjYBkj1+FSQXCFug5OOMEvPQdMZIPBr0As48NFk=; b=RTazfbEd/lTwFPfGyadETTXbfs1bV+rGe0FhmtVlSUNT7vejkKgEHk2BE2wS3PGHUNhY2gaegAyAKQwbMZXYmzG02xfZ1+0ADNWcTMNejGyGfBxfOwAEVqli9kZXyJK06aqpSZEI9DdeR4mSs09sWtBbTgIGK4AaS1bt4hIpQ0k/k+EVlBSvZHL9MINZzPgmtqt9gOptJsx3PawqWdYRt8i+v21oM2ZlfeXF2mnf5nowkuU5QAgWTZtUaG7ZNlfgcJ+kRs8hC6iKUChqaCV+KRPeRn+lal6fYkVpMAVFZXFppHkKgejqR/nuLQLEG/7rp7RBDkR7rJxfGlSJUb96oQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.20.101) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VwN6LjYBkj1+FSQXCFug5OOMEvPQdMZIPBr0As48NFk=; b=rupthdiOGDDVhD2p8B+b3s4GhB2Wl4Z+Ofw2TqIljUe1cAXPZCy7wxPqgWLyBSdbm6BWtYn+F7EcleuSpn0hXItNErQ43GRTd4lPWPzRIY8Kuoubq4s8OU7ZzNda/+jh9BPMin1v1vUp4Mc2C3MAFyRS7iQZafIOEOLmXgM9yIQ= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.20.101) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.20.101 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.20.101; helo=CH4PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mqjQWC2h/0Thlvb9j7tl93KXKZFEL6SpD10W+gNt2G4mgnFUgDq1iDbzYwB4r/TwIsKKh2WNx9GBx2TcMWaNPj/FrNGFwAr2r5cEzFfq+AH0B6jJkzLTeXZs6wpR2Nbzm0SjP4ZgyTYEMAgeA5G/33plTggNyGJT+ke2j2piQ/d32ubAWkOsPL3OYHhhj4GEmKKzRshHAywAO3t5wPWZzL/TN9hLtJalM0QSHmgplq3iJyvJeVdbc0OywgCdQWyhpoLbb4chgCmp/jyGLNSOcwLN0Dqa/0AkY+pss7AB+PePQs1UT79Ia0dG9raBIes5OHUGVhbtAzgsW8KKYjLuXQ== 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=VwN6LjYBkj1+FSQXCFug5OOMEvPQdMZIPBr0As48NFk=; b=J8gL6fnarhg3iBqLcbQ/wcKSi/SNL7c0nBHYrVlIupRP6TcCzttUuNx5hqSLD+Rp5hmxGg3AjG1lAk6heFUmJdwqrKb3ovbZssXWQTPKDXWFBIUovq5lr7zhiNfvZWepb0x3wh9rzjNsZWDJj9eULKn2FXxU5N8GAHeM6d7N67OTWllQ1lBYlTwFaD7LqEF0qHkRV4B4A9IzAwFU63Me9bokssnj8qzfGWR97S/7djAl2PayNVk5EvS9vs+HI6gJzjnWSq6SJjcMgsV0NEei8Pbi2K+1EtbHm8eYEnaKLhzjHnop3GeFIHuGCMqmt1PshjMLwNH17oT+43lv9mwgpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VwN6LjYBkj1+FSQXCFug5OOMEvPQdMZIPBr0As48NFk=; b=rupthdiOGDDVhD2p8B+b3s4GhB2Wl4Z+Ofw2TqIljUe1cAXPZCy7wxPqgWLyBSdbm6BWtYn+F7EcleuSpn0hXItNErQ43GRTd4lPWPzRIY8Kuoubq4s8OU7ZzNda/+jh9BPMin1v1vUp4Mc2C3MAFyRS7iQZafIOEOLmXgM9yIQ= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Jan Beulich , "Andrew Cooper" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie Subject: [RFC PATCH v6 26/43] altp2m: Add altp2m_set_vcpu_idx Date: Mon, 20 Apr 2026 17:31:49 -0400 Message-ID: <20260420213206.208750-27-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C5:EE_|DM6PR08MB6379:EE_|DS2PEPF00003446:EE_|SA1PR08MB10871:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f277f4c-68c8-4c54-ffdd-08de9f246f97 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704161411799003|7416014|376014|36860700016|1800799024|82310400026|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?b+OhAJUgl5hKUmQQiAfaT/rj9xTP32aWtH8wmHR3HuM4MAb6GFC9KMWcg0Yz?= =?us-ascii?Q?wHlsF/BmQawtRi509HMe2h7doMdXQdTPfE5Y/sMcWpR4GphwcYaSIdtkvFft?= =?us-ascii?Q?VkGYc+BSKgsB5i4CHUEUsWMpqVrrOdxUSNk/Bc0tPoJ4eK4NsQMgkvKVIWbU?= =?us-ascii?Q?PsXnDAzDBtn1KdiRdUkLLKweIufp+OHHatcncGwPAqoVINeJG8P7vSeoo6Oo?= =?us-ascii?Q?WD3DmQuIl+uG3m+qYToiIPe8Uucfka59Ntd2MLuoHOstWDBqnBb6vmZbFZmF?= =?us-ascii?Q?VWVZ113hef/EDSwF75eWNZuxKTxreZZQPil+3VMsfaUy3ViZ3asONyPG6nEJ?= =?us-ascii?Q?OxlZXQ5oZmM41VtByfibsQqA4NSYa2NRFI88+wmgja6Nk5FPxtYfS93NSUtH?= =?us-ascii?Q?g5GL6VwTusKPwFN6rYy59I4hJZzy+tLDVM5dVa6WicNUZ78pgQKZgvHNWYmw?= =?us-ascii?Q?HhA0GgWwOVHJ6UEVDmknNrYE3j7B3ycuJc6VpPxcvQr6th9hsIlHnDXdr7Oy?= =?us-ascii?Q?1jqOiQ2ygXO575gvT5TYhRO763+L+ERWP5Nehe6z4XLGC3vywB+zutM3jWyG?= =?us-ascii?Q?L82Al2lfIsdNMI/2mahv1kNNs1EsALn+zcB/YioKj6noS35Otyq7p0CE57JK?= =?us-ascii?Q?/rOCbU/oTQTknHY0DIHleYWnHrPa34n2chpDKgNTYT2b3TpqFBHF6aixyjeL?= =?us-ascii?Q?tBMkpMwDrhN/eyV17XI76joniWkm9T8Y0KhdTSv9YP46W3KXx6BuWmduaWDo?= =?us-ascii?Q?4czUAVSk5NColGwvGKkQ+k+466ZPZ9C/59hLU02ad0NzZ2jtBylLm/KgaT6X?= =?us-ascii?Q?gwRb0ClJPeozwDGHryutNVottvpOJdZIUgJznUHpoo0O9kNmoLAMAZHyZ3vm?= =?us-ascii?Q?pL/W4OJ+VngVbPfzWUC2MNZyNEu2jRvI0JDJ7tmCSK9pIvK+pw8Lebj1kd7o?= =?us-ascii?Q?ubcj6knFyQCvi6aBIdLlYT5nPcsXsh4DoEsYxnsuw59EO5sNN5GdUWmPeQ7T?= =?us-ascii?Q?TM9xP7y4WKY7wySWTtnkoaPdhEce86qiSk63xq8Gw3NBRsU3ReNk1feRWay8?= =?us-ascii?Q?dcCEIFQGyEHcHv0hEtRmJ9vEZUHRglEXIJ5aeqFj3UekuzZpwR2tDin698tb?= =?us-ascii?Q?5bbXFaJ4EcuUij4xr6bGxbPvOjhhWgUcAw=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704161411799003)(7416014)(376014)(36860700016)(1800799024)(82310400026)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: dOaZGe2Vw2cY/WEuEm5qk/VZc+7RQMVLIwmbwUqKOvCcgx2XVEkhG043S/44lcOHOrnPtBe7fllM20HPoaeOeC9QWcz1svmjyhMCw3pFkY0b8n9ubw7SLPs3/WpkKRe7BB+9aARosmzexql/siJvfTpL5c0GRhFY12qSab+OJ3X4qlOFQ/4KAn2lfrhCQouIwzuMhUCehAZyaOCLlfeRAHokPN+l14Pl7VFJVW3i74rh0GNL1SeiVODbjJav2oUx/VaznVTCg/3hKALAOKbKe4VZwXodLLUpSWQAIgDumcQ4l77nDwsbNT4bnqo80+pTutQK+rV77USa9IdrGzf9kg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR08MB6379 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.20.101];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.20.101];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DS2PEPF00003446.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a2a66152-bd78-4c57-7a07-08de9f246bb0 X-Microsoft-Antispam: BCL:0;ARA:13230040|704161411799003|1800799024|14060799003|35042699022|82310400026|156008|7416014|36860700016|376014|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?WI7O0GfzgUNDhPIZdcuDqc2XDtE1r4kNp8drniUKdrELs3PWw+6dcYljnLDZ?= =?us-ascii?Q?gw4rO6Ai+NAI4mHt346EUKHABmZeO2hgjPmpU+fQbMPvsEeHfiVf6u3Bgp2H?= =?us-ascii?Q?ZUGCvdgc/aHEFWFOsNX3++AV4HgUX/CUg8IDd+TJClhFKr1i/hseo9GP3oPA?= =?us-ascii?Q?RDU8QWYHGO3YG1Qvwj7xZXNzM0NUAbdhgat67pH6O0rGF5dWqWcG3d/sEv1k?= =?us-ascii?Q?QGHrwi+uIW6AhVnpkHAgKwdHA8IgYv/ax6bmNLQf5bSFrba9DhhGn1aOV5Hu?= =?us-ascii?Q?loLNxhAWzRzWmlkSIbKEIueZLipCKcKhAL/ji2Dsdd1CkV1LGJ2dFm+jOU4r?= =?us-ascii?Q?fyOHyu08nrcDSO4563EUS+y04Gg8/b4Pz15X9LcvMQ1l6iADKRUCj+8IxM+F?= =?us-ascii?Q?//3+0KPZNnNkXWcN6gjYGS8E1nphpC0aAWhD2jLOuu8unFXVzFb9/S7zGG4O?= =?us-ascii?Q?LMZ4ULVreeO6wSJGkqvTQVS7RgyvyV+yBfh7+2VnOLZnI91gU/xbEbcxWPit?= =?us-ascii?Q?S50aK4XigRRwgUv+0vV3LeqHKRyJQSfvNF/QAFUZ1c7G1dHT+6A/bfc3szyU?= =?us-ascii?Q?+QojsgGB/gTcCNCL3J7Qels0AarDvvZ6aT5lTo0O2B/lPZKqhJNvAwyJoRWS?= =?us-ascii?Q?6OORHvhi3zvUc4d/Lrl5WeLL2jv+lX5pRm4dVDdIx+wAPmL/7MeYv837jaxr?= =?us-ascii?Q?JyFScPk/hr5VLLRWH1EboAfy9LcAT28IxRrkCyPmg1tBZtw1DcsHU+ZG8Mfo?= =?us-ascii?Q?9bTaY1miZW54jb29QbHjaOnItsN6faW8PD8Axw8s6Sy443BCLYmsIy4jpMrR?= =?us-ascii?Q?L/CtjmhzP527FOnIKAfzUMyhoSFD08829X1QcbFHyl7HMyUssfDhfzWW33Wt?= =?us-ascii?Q?vcxbSS5eB0YO8jcVFgk4vXrr91GR/oZ9YpR/gmQW3QtIO5BZNjkUbRTdPOT0?= =?us-ascii?Q?g5Q3oDkYCcDGzmVUGIgm8syGdg7bTr4qDD8gRxGDOAnK8843ncZm0JCrazh1?= =?us-ascii?Q?DZ7wpzteT4qRIazIaV/NzHTsuUUhigznOSnY/Lav13hy9jGQbqppZKgZgoR7?= =?us-ascii?Q?wvIYyZk4B8pizjK6bDGBVIawdXb2eL+/Xg3Zcg3ZKAPqdAQdfbib8fpqmSkd?= =?us-ascii?Q?PAhrSW+AuK/3J5dpxXB17gmdonQcL8skTw=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH4PR07CU001.outbound.protection.outlook.com;PTR:mail-ch4pr07cu00105.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704161411799003)(1800799024)(14060799003)(35042699022)(82310400026)(156008)(7416014)(36860700016)(376014)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lEnYNFwXbNo+tWP6FwCDEEuxsCurDgN3tGFmRfRiibJctrsKVi/ApggoZMHH28UJ7OOW8YskOcvdt4yMC89e0h66TBwNHGPy2J01sI6IwVCdAR6dG/+2V6FVMKOsUDAlqteTXyqZJo2QY6oOw2LgQ43c45syHXoNqP5Ytuooj6dYIq5ihRawb1f9sCFuxOEYpRDon8DghKPkBTUh8K6MWcsUDa0Yq9hPx0B8uB6vUh0TjqvZzyWVX0e9JKEqYiIylLq1CcZIpaLQyMsfK7gf4Nc08auuw/xy+O7c/lpq2evr3UguWPmQzC8Y3HFqpHvmJKx0wOYW446COR1VEVTFRwEtEFDqASmhm/O2dp2CIcaoi+8CCRlz1A8hhk17hEDm0c+Vj8ykgkMbjvhW8R8jvpXcg/DG2JhOi8K8KnKYANIGqnPSB6jkipXngT1Zbroo X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:16.9783 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0f277f4c-68c8-4c54-ffdd-08de9f246f97 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-DS2PEPF00003446.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR08MB10871 X-purgate-ID: tlsNG-d25034/1776720803-6D56FCF5-715972C7/0/0 X-purgate-type: clean X-purgate-size: 1653 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720833303158500 Content-Type: text/plain; charset="utf-8" This commit adds the altp2m_set_vcpu_idx function for both x86 and ARM. Since the altp2m VCPU index is stored differently depending on which architecture is used, the altp2m_set_vcpu_idx function makes it possible to set this value in an architecture independent way for common code routines. This is commit 3/4 of the altp2m_{get,set}_altp2m phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/arm/include/asm/altp2m.h | 5 +++++ xen/arch/x86/include/asm/altp2m.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h index bc695018e62c..f001e022a213 100644 --- a/xen/arch/arm/include/asm/altp2m.h +++ b/xen/arch/arm/include/asm/altp2m.h @@ -29,6 +29,11 @@ static inline uint16_t altp2m_vcpu_idx(const struct vcpu= *v) return v->arch.ap2m_idx; } =20 +static inline void altp2m_set_vcpu_idx(struct vcpu *v, unsigned int idx) +{ + v->arch.ap2m_idx =3D idx; +} + #else /* CONFIG_ALTP2M */ =20 static inline bool altp2m_supported(void) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index a1b078783b3e..b3d348386a00 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -60,6 +60,11 @@ static inline uint16_t altp2m_vcpu_idx(const struct vcpu= *v) return vcpu_altp2m(v).p2midx; } =20 +static inline void altp2m_set_vcpu_idx(struct vcpu *v, unsigned int idx) +{ + vcpu_altp2m(v).p2midx =3D idx; +} + /* * Alternate p2m: shadow p2m tables used for alternate memory views */ --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720831; cv=pass; d=zohomail.com; s=zohoarc; b=ivbgEQXl6Wb9zusKDBIK2PvBcmXa8Q11eP/3FzE0QUjh8JycibKbi+tCuODy+zcahHtviIaYvFYU0jbDl3OmAG7UzBK9UkJpJxNWi/1F6HMHGG46TeqcRpZqyhBn86BKdhi9ATZPyS9X2FhasO8kIZIn+H7DDi1DCDaYaBP4x+M= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720831; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2GKS7huUjzjhqkDR3rg4P6NQTDEiD+t2h7OWKwFuOAU=; b=nEhb4WdVO30Vr5JidVEcu43Hmc3jcz8KKaDPSDD3u/uab+9ULCODMXwXKXzxcSuOj5FLHzgmNkrpkj3m7qcsNpwMkjdERPaMyccOjA9yiih0Q81dXA1QC3O0SAVlamXm1E7jxtyIFrdJNNeBm1xgQUL/gqfNjoa06S02sOqu9Ro= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720831402799.4352725921495; Mon, 20 Apr 2026 14:33:51 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287847.1568287 (Exim 4.92) (envelope-from ) id 1wEwFH-0005Me-4q; Mon, 20 Apr 2026 21:33:31 +0000 Received: by outflank-mailman (output) from mailman id 1287847.1568287; Mon, 20 Apr 2026 21:33:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFG-0005Hr-3l; Mon, 20 Apr 2026 21:33:30 +0000 Received: by outflank-mailman (input) for mailman id 1287847; Mon, 20 Apr 2026 21:33:27 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFC-0004Wu-Ir for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:26 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFB-00CD6F-Si for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:25 +0200 Received: from [10.42.69.7] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69ba5-2eae-0a2a0a5409dd-0a2a4507a6d6-0 for ; Mon, 20 Apr 2026 23:33:25 +0200 Received: from [40.93.198.132] (helo=CY7PR03CU001.outbound.protection.outlook.com) by tlsNG-ef75cf.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69ba4-229c-0a2a45070019-285dc6847bd8-3 for ; Mon, 20 Apr 2026 23:33:25 +0200 Received: from BY3PR10CA0009.namprd10.prod.outlook.com (2603:10b6:a03:255::14) by CYXPR08MB9321.namprd08.prod.outlook.com (2603:10b6:930:d8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:20 +0000 Received: from SJ5PEPF000001CA.namprd05.prod.outlook.com (2603:10b6:a03:255:cafe::11) by BY3PR10CA0009.outlook.office365.com (2603:10b6:a03:255::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:19 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SJ5PEPF000001CA.mail.protection.outlook.com (10.167.242.39) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:19 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHf6lGvz1wdS; Mon, 20 Apr 2026 14:33:18 -0700 (PDT) Received: from SN1PR07CU001.outbound.protection.outlook.com (mail-sn1pr07cu00106.outbound.protection.outlook.com [40.93.14.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:18 -0700 (PDT) Received: from SJ0PR05CA0131.namprd05.prod.outlook.com (2603:10b6:a03:33d::16) by PH7PR08MB8179.namprd08.prod.outlook.com (2603:10b6:510:15d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:12 +0000 Received: from SJ1PEPF000026C5.namprd04.prod.outlook.com (2603:10b6:a03:33d:cafe::1e) by SJ0PR05CA0131.outlook.office365.com (2603:10b6:a03:33d::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:12 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C5.mail.protection.outlook.com (10.167.244.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:11 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:08 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=YTZ9PLxYVLJw9+iaRVgHYAPxDmph3BUORtRrfuUdt3szLrM5m+Px7m9WnfQX2cDBTCUb9jaeRUkvkgOS6PRMHoRY99XCHT6+IRWib5KOZzs9JcA86YGfIfqAKHBSOnQK3Xz/1tJJc2q5iI0NlKCsnGZNcdaxu4rFwAod24RvAMU00qan4Uac7CYpKa1n1Q49PfLDEyjAQBsvywqp02R5yV5aM9Qist9z0NRs47PALY+DwF7V6gIQhuU1F9bv36ehXCOUgVhrdp/GtGz1p0BZ1maxlulnTUEg8jvCwd7PUqMITht+w0Q2eMUwxMleRtAd8pe2cf+CkhrrvShh/rtdGQ== ARC-Message-Signature: i=2; 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=2GKS7huUjzjhqkDR3rg4P6NQTDEiD+t2h7OWKwFuOAU=; b=pZcVMxBlWKNCAuC0wq5fB+OxqZ7QEAb3cefYgTzN9fjLO/iO1w0Ni+Mtpjr29h1ACwdKWJijSOH9YFJ3HO27IJFLdtXod8xFwxvasXdJXUaKqbj/fCs8lGOZWK09vtsA4sWnYx5jOs5xe9cJx2M2LUmW0DA+UJeXHYjo/OHhjnhl0iOCL1+tJOva1Ven7P11tXMk/lDj+Cx3xZKO1solbn3b0nX4Mec6UmrhDOORX/O35PwLXFZaHUhLim5qDTh3JIhHu40G3f6JB92Fm+7TVD0NB4lH9hlN2kl93P4Bd09gtSLYX+cGLfNPkSuDYkozycEkw7QiWz/XsEbgFMVC9g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.14.102) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2GKS7huUjzjhqkDR3rg4P6NQTDEiD+t2h7OWKwFuOAU=; b=1VQqidNwjqYSxrjHGICCjdD8Ar4gKWypkx+I7zfg4upTrw1f19yefVmMw7+Y4jEe06eMfPbHcLUCQH5u9WbStl4H0b7m1P+YDo9wzwZANtpVyqtlKularEl/xHP6+47VfDkz37h6MBadpRhIcZATxsM/royIwX8Nlzqfc62tXJA= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.14.102) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.14.102 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.14.102; helo=SN1PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aQcBDk3xeVNDFjWmLOcNKrqzF7njqybv5nCzVGtgasmGcSPDcOAFd0wqe0+stJVcxKXSsL00uTYa2RcMVwfQaTKQdP/pFA4TECwJVPZssB04dSkEDPPbkkI2sX0N4CIzjKqZGKwVWp/xdgRipBSDZZNI8G3fvdgBV2pYt7T/ellTftsXyniGYU5EQDas2MFsHmbdpww91WsLQhx6jOBtH8d5qdm4Li6DE/tsdNzr74w+GlDOhY/EabOoZEhb7BMIwOP3oPCurXJgwzvx7juGJMgD7XBPkShQ9NgKPY6GHNr1TyQbkq3HQDIkmL5gOvLDAPYRXUhlzks8tzlcAUp7zw== 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=2GKS7huUjzjhqkDR3rg4P6NQTDEiD+t2h7OWKwFuOAU=; b=Dw3/haY//C7Ii7UOxpqHvDbNF9GALTH4KK0N7mMb669saII/4Rt3WwfyDgq2ebmGEbNZHeuq+eZe2ct3V5+D4nDSzYgMcX1xhGHXUglwVie/4JpmD2PqmiKpPpBvhcrK5xAibu4Me90z1D/KfpdRh2A+LDC1x1BQk7zotAHoQfhMIzhiO2lTgYSzpdQ2W60DWsGzzp39Dn1jpZOtso4tvRzN+sQZo905mCOEko2Zwy4lEmGe1nPLrsmYwdcUI+3XYpgTh8tuUEyQfMSMPR4qWDrPMwtOGSpmqd8+EyKSXXx15DA+1NPCMABhX3bL+CNnNaifLq8sx6SYoAW8rCEwUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2GKS7huUjzjhqkDR3rg4P6NQTDEiD+t2h7OWKwFuOAU=; b=1VQqidNwjqYSxrjHGICCjdD8Ar4gKWypkx+I7zfg4upTrw1f19yefVmMw7+Y4jEe06eMfPbHcLUCQH5u9WbStl4H0b7m1P+YDo9wzwZANtpVyqtlKularEl/xHP6+47VfDkz37h6MBadpRhIcZATxsM/royIwX8Nlzqfc62tXJA= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , "Julien Grall" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [RFC PATCH v6 27/43] arm/altp2m: Add support for altp2m_{get,set}_altp2m Date: Mon, 20 Apr 2026 17:31:50 -0400 Message-ID: <20260420213206.208750-28-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C5:EE_|PH7PR08MB8179:EE_|SJ5PEPF000001CA:EE_|CYXPR08MB9321:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c9bd3d8-bb54-4dbc-7c83-08de9f247100 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704161411799003|36860700016|1800799024|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?Qbnj3+LRkZr3oC14PJrZ3EqbuB/Im7qwaoBBxSxGtGjDF1MQwqKoHluXwPWv?= =?us-ascii?Q?apxaj2k55iqxYMzaEbp9SRnvLKjlq0DtwPoeMlaR4xgiuG6bCUb7u5Afy7Yb?= =?us-ascii?Q?6U5sKb6Vlgyux+i5xXjQSAFppKSqT+4YHb2SV2Ruck2lDv0vJ9wi+h0jC8Pq?= =?us-ascii?Q?jhf5AonIxGqoS7YCtiqUk4erE5DuaWXlMrCBb20BSuXkbrt4mTR2EI4UZVgi?= =?us-ascii?Q?K+2H8L3yzI2TjeKcTQfVJp6MitEDpk0ZTvK2wT3Ne04E3ftzr+Ld/L74zuq5?= =?us-ascii?Q?vSnXD10irj2e6vqQ/4kUfhieL+eQ6ESOrdPqz01g3dHj11Q5Y4Xizh4qSWpl?= =?us-ascii?Q?64Wzr0kA0xZChhZHqez337zx7KIDu+OjB7ZVykcv1Fc9MyX2hWMyryZbPuI1?= =?us-ascii?Q?+JFRtHXyv8+Poa10zoJruXEGXPE+p3KroX9dTUnIdSLAJfR3nPAJFAQ6X/p3?= =?us-ascii?Q?TEiZAOXQHkK+B7VlyC4srCk9hptJIhUCZBuOrEfYMJj3FV2De72/PkEeFolp?= =?us-ascii?Q?yovWJFG3KNILbxrIic/xCI73RkfXqX1KTWo80lF6tuLt3Wg9lS4BrEpWRm2x?= =?us-ascii?Q?HLMLYBRnv5nuMApR/59k5P31kXFbb5aa9RCRQeXQHHIYYKv5HgN1g//qyphl?= =?us-ascii?Q?ZvJPCtgb/oih21ofEJG0aej9fRgvPt7s+9yrNiamsJfo3hnm5MZgpGHftjqN?= =?us-ascii?Q?SucPxAQvLXQDw5Whu1H+FFxvuD6JGgpuLe0el6hrAOYjLZ8zp3yo1V0EHps+?= =?us-ascii?Q?IzJ+68b5WDqb7Pdwd+ptanndtZEzbqtRnY/PyGPmZJxApV+mpqk2/B/VN2PR?= =?us-ascii?Q?NSaFOEzA7pYQsTac09s1kWTI7utKpa4FU+Qc3WpAn4UWHo5C0vNVY4bXqrdt?= =?us-ascii?Q?baCCwTtFCunJFWJBEfIltF+xuWIIx7+FDUuSz1z5rsKXIwDGNwVkop0jneU5?= =?us-ascii?Q?XSQU2oRUVXWuAoZ9Hk6BP9QGA9GOj62U+y8ZrVF4z/jm69cDIpZtMb4wf68K?= =?us-ascii?Q?3sIa5e0WuZHrm7Q6P6LNegT1VEiGB1SkBY0Fd+PEeUw6Gxv0UDZA2TcHl1t4?= =?us-ascii?Q?CHJd8RSKaxdY0cOXaeSa47NzCmozOl+SlyaPD3Na3F/iJ83PlzZcVt2R4/tq?= =?us-ascii?Q?FPcSu7mDgXYj?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704161411799003)(36860700016)(1800799024)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: fbkxuHJ2WviD4afycZ8CYND2dwCigXQxzrpWdUItRIm5PG+vo0Wh+w5ygf8rEos2caV3qJHQsQwvGvzG3Zk18Z49R/ghBA3Gv9+f9B4KhDShEEIoqxZfcY84EFyan0jLYW+n9DuvD0ynjUKMSDCqVldVNrgw/hIehWAnRYlp/cXgZoxnPoqhEAsVUPqTIOfbYCY4uyWvSNYo4iifZSROkCh+MWjRfHHwRZ7p3tjJg3lfTAQne3KL4w78JSj82feDJVHWmkBcscXbjTUmhtqw9+lNpGQQrYtUILqmoLl0DfxVBjDpsSwATyMyvQkw2kkZuVrmm0ieQ9tC9vGgxcYgKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR08MB8179 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.14.102];domain=SN1PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.14.102];domain=SN1PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SJ5PEPF000001CA.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: af969c1a-ffff-4434-21e5-08de9f246c74 X-Microsoft-Antispam: BCL:0;ARA:13230040|704161411799003|1800799024|35042699022|376014|14060799003|36860700016|82310400026|156008|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?SbFSRTCnG3Tn3LYMThnGHyzgTlUho6sfft03B89cS8isD5/9c5FiacUf/KBt?= =?us-ascii?Q?LIZaHFaGyYNY5Bc0sm45Jb0azn36Y8fLu+bqOUss+7DXcuu1SKka8T6qbkli?= =?us-ascii?Q?mQohUqiRzY4FbHxidBaoKTVA3hsjlj8ZiKlmqZWgEFsOqkONNJgK/gnIfDFs?= =?us-ascii?Q?oY3Fhp42RfeZYL5KEf+i8NheLUniv3jzuHXiqaJTGjfgQhPFiXVoTtIkabPE?= =?us-ascii?Q?4k3beOiKpDUwqNqIJK80fJoZzEqYVR6ivblxgkfaPrLJgqfXcOq7fCGS24a3?= =?us-ascii?Q?bHmggFN/XQYtamobEmf77NWJNuCfRP6dzLdY37vUtcPN+4a5Pvqnv6UTkSwI?= =?us-ascii?Q?v9Hg8ycglIltuXVXqT78/tPhpbykI20rihD9YYEiNzVsVA9qiWIv8wcSSSsc?= =?us-ascii?Q?H3nBhERDG+ZXhH+B4CPOvv/VsKaA+NTgZ4esTifv3PufZq8Afjbd+PBdWCs+?= =?us-ascii?Q?E6yjx7o1Uy+frvpOGLCrfTe2sXAdZULKK2SqUN06giZ2qm6TD8PnBN9M0wyH?= =?us-ascii?Q?n4lXf8Afg1CQLX3uZ9OXbAb++F4c1dGA0eltX/63j31hvE3iqy/vf6C1KGh6?= =?us-ascii?Q?VFEzg3ksoFYknqAoQdVJ9UG1jQbu29AhJc6Teu/wGp0lO7q2LF1h+lRxSyZX?= =?us-ascii?Q?xVEZk6OzN0uFXRY0lu4roYAkMbRdhv8DTvhpPFMaqNpEc1cJmXdAaxWDO/3c?= =?us-ascii?Q?FXxzQqHADPJnv0wB6x9krXJb2iPCTMNqdn4jsO6AHxlSjCaET+vcG8PS1Ckr?= =?us-ascii?Q?rWoUZX19jJc2PoiaJAbPsIigElK6wV9cCZHMoZBXSfMKMAG7XWNY5ZnX2AQ1?= =?us-ascii?Q?SWfxpS/1wEZ2WXIbOZwDcIh9xqrgijCnI+LcKtxx/bSt+oK4L1KTODhzJvwj?= =?us-ascii?Q?vO5HhtfT9pmKh4G0rxmW1lrGAKTLk5YlK12RTSwcRNRy+ovecLt0pwsCpYzN?= =?us-ascii?Q?iihL+2+MrhKAxJSY2plr2OZ1/fcA8Ux0AvUWC1gD2RMTfsekXwM2Vbyhnzz5?= =?us-ascii?Q?PK5/EDf12+vFX3KfRN+sYMHvkUegKy9eZG/auVjP+weSpJFCAq9NbqWGm5B5?= =?us-ascii?Q?+W42sFotfdnyfxv9jsNsBp+my50J5xR9jVoVg3sVJXogDbm4C6VqrYtWTFNe?= =?us-ascii?Q?RLYuMdGchJfF?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN1PR07CU001.outbound.protection.outlook.com;PTR:mail-sn1pr07cu00106.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704161411799003)(1800799024)(35042699022)(376014)(14060799003)(36860700016)(82310400026)(156008)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +U5MP/qAvqabj9vaHrSAxddta1q6t9drd6hhsUt1Q7uy66BoCbmsf9AvewP1gB1hWNOfnJE3be3yipIYHdnnqDlPE+8BhXI7nlfufjSGBxnV+JoI1eLwrvzu2li+hYJ3VvekOxiG09zQZNELcj/d5Icbl7JxlFBGGZ2OQ/WeexLuTuM+gwEz2lriap498VWG4bZoA4KOpxxpzIl/V2URabzvgGnuThpKGZMpyyQJYQmr7Dkxhm3Ijyp2mPMaOc9rKSHhnPYPT5Bll77eAD4mEwxoQU4WDEmJ1HdhmJodUen1/LBumn3mQx4vw5EoRnFjsVCC95LyQgaxZS9bK1SO7ZHvAY+8nNJL2/fP39vzDkOx5ZGWKIarOtoDyzlWkQDGfszSBV9VwWgNAa9500vqVtiorhUI8z0sRuljjXF2PYvVdhBeDmGvwObD2cSa3Ef6 X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:19.4172 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7c9bd3d8-bb54-4dbc-7c83-08de9f247100 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SJ5PEPF000001CA.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR08MB9321 X-purgate-ID: tlsNG-ef75cf/1776720805-2BF7EC48-CD86CD37/0/0 X-purgate-type: clean X-purgate-size: 1778 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720833295158500 Content-Type: text/plain; charset="utf-8" This commit adds support for altp2m_get_altp2m and altp2m_set_altp2m on ARM. The x86-specific VCPU accesses have been replaced with the architecture independent functions altp2m_vcpu_idx and altp2m_set_vcpu_idx. This is commit 4/4 of the altp2m_{get,set}_altp2m phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/include/xen/altp2m.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index 58e74be6deb0..f5a4d0e60562 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -8,6 +8,7 @@ =20 #include =20 +#include #include =20 #define INVALID_ALTP2M 0xffff @@ -31,11 +32,10 @@ static inline bool altp2m_active(const struct domain *d) return d->altp2m_active; } =20 -#ifdef CONFIG_X86 /* get current alternate p2m table */ static inline struct p2m_domain *altp2m_get_altp2m(struct vcpu *v) { - unsigned int index =3D vcpu_altp2m(v).p2midx; + unsigned int index =3D altp2m_vcpu_idx(v); =20 if ( index =3D=3D INVALID_ALTP2M ) return NULL; @@ -52,19 +52,18 @@ static inline bool altp2m_set_altp2m(struct vcpu *v, un= signed int idx) =20 BUG_ON(idx >=3D v->domain->nr_altp2m); =20 - if ( idx =3D=3D vcpu_altp2m(v).p2midx ) + if ( idx =3D=3D altp2m_vcpu_idx(v) ) return false; =20 orig =3D altp2m_get_altp2m(v); BUG_ON(!orig); atomic_dec(&orig->active_vcpus); =20 - vcpu_altp2m(v).p2midx =3D idx; + altp2m_set_vcpu_idx(v, idx); atomic_inc(&v->domain->altp2m_p2m[idx]->active_vcpus); =20 return true; } -#endif =20 int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(void) arg); =20 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776721134; cv=pass; d=zohomail.com; s=zohoarc; b=CGf8DSyHv/e01UXgR0SaYJQm56ug/ilhCvHschg4kiVXxI6G6rlBmYWcfOztNjfT6634uX0cyX0v7yTrx9Vk6MSMekpvE30LQfIk/sQ1nhPAq6apVxcpNQsbOgGATaoE2+1YOFjiOaMEC8VZifk0u/f4/jJda1A57NQl4A+n11s= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776721134; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=RlgX5a6AGvq5jH49n4U+x4WcIr+mTwnUzMyljWt2R54=; b=cajiIuger4xIA11kl5r+iBvRZ5p0jnpIp1Hy2pVUS1ep5nJVN2JbsMpojPSO+SJgTHjmWEWcMzqhdo36KBuV8NVLsb7xV1EsLOtaGWKVQm8On6uZdDho1/Z8XrTRIcvtHaXAf07sFfY61KvWlj434Qr/D3G1nMF1wfa55hu6xTo= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776721134947491.7734570621783; Mon, 20 Apr 2026 14:38:54 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1288146.1568465 (Exim 4.92) (envelope-from ) id 1wEwK7-0002q2-IU; Mon, 20 Apr 2026 21:38:31 +0000 Received: by outflank-mailman (output) from mailman id 1288146.1568465; Mon, 20 Apr 2026 21:38:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwK7-0002pv-Fk; Mon, 20 Apr 2026 21:38:31 +0000 Received: by outflank-mailman (input) for mailman id 1288146; Mon, 20 Apr 2026 21:38:30 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwK5-0002oZ-O0 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:38:29 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwK3-009Rra-Hu for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:38:29 +0200 Received: from [10.42.69.11] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69c8b-e002-0a2a0a5209dd-0a2a450bc78c-42 for ; Mon, 20 Apr 2026 23:38:29 +0200 Received: from [52.101.57.126] (helo=BN8PR05CU002.outbound.protection.outlook.com) by tlsNG-42698a.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69ba7-212f-0a2a450b0019-3465397e0c33-3 for ; Mon, 20 Apr 2026 23:33:28 +0200 Received: from DS7PR03CA0016.namprd03.prod.outlook.com (2603:10b6:5:3b8::21) by CO1PR08MB6514.namprd08.prod.outlook.com (2603:10b6:303:9f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:21 +0000 Received: from DS2PEPF00003447.namprd04.prod.outlook.com (2603:10b6:5:3b8:cafe::8a) by DS7PR03CA0016.outlook.office365.com (2603:10b6:5:3b8::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:20 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by DS2PEPF00003447.mail.protection.outlook.com (10.167.17.74) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:20 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHg5fTnz1wdY; Mon, 20 Apr 2026 14:33:19 -0700 (PDT) Received: from SJ0PR08CU001.outbound.protection.outlook.com (mail-sj0pr08cu00103.outbound.protection.outlook.com [40.93.1.75]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:19 -0700 (PDT) Received: from BY1P220CA0019.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::15) by LV3PR08MB9404.namprd08.prod.outlook.com (2603:10b6:408:20c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:15 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::76) by BY1P220CA0019.outlook.office365.com (2603:10b6:a03:5c3::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:15 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:14 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:10 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=nfNdqWvBFPdLGrxASEBjEhHacn6xnu2Jl8VdIhj2sE1n9cHDvHmu2555+nEvwQp/qL2fZac+uNqGQMSExwEW1iX5ewUED85oUx+oJsu+b2/Q6ARIyIYHcqCnUVRG6SyfLJDhb+b9h8Nkb9u09ZPS+e1Gtzm2iZXSxTTL2cR+IBHJhevHHgw5orf+BmhUUBrrwFosGWcWe8TvJwFHd/H1GtM2i9tyVyxOqBcpyZYzteNkuKOHsg8n9C91xZwXVwubPJbyrF2VFe16/cAr8V+BwnSPAvAKeHLrKMlHE5W1j2/iFiJLoBS/N4h7Unb/M0gIvZyGiQSfSoYn9uiR2mAVIw== ARC-Message-Signature: i=2; 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=RlgX5a6AGvq5jH49n4U+x4WcIr+mTwnUzMyljWt2R54=; b=cmcbjgEMUgSas6jS6YlGhpwwN0npdfl5PdM4q5oe5Q+4plidV2MWYjuF+4jKU+N9bWAnT5tDLzsUtELfXmaa8SbVvVulFY9b/yVcmGVLs9YzeoZ3SXBrftDkT6rwtr0VrJKTkE0na5CjUY6UpbSt0fQOYPhCROdK5fexud+Yju4sMafzR3lI50PHPYldnWOSAPmx6VjmqFfW8yhJZ5tYcWP9IK8wZ7Z5fCs0B9b8PXVFQLIJwKb8gk/Ly9TFJQESXgfTB0U05ykLRN9aH45TXwF9FY4abW9GuC8thDQdGJFbW9bvnv0xI51BZyJKA1Sz6hcTmBZmrMaHIKsbNL+s5A== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.75) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RlgX5a6AGvq5jH49n4U+x4WcIr+mTwnUzMyljWt2R54=; b=FjFe4cNF4nDpsxt06fKP0qMdSQP1dCt4R1YUZTlKkIjDdfj6qr6wQ5GM2GPHoycxdJ7c7KawZlWPYolq81cx3fePTNq/vRnA02NIjYvBemLWatHazYru2itfnEgfwMM/yj30+akXG4pmsUxRLH+QfWbMn6gNtYCkXkaMRA9CNiI= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.75) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.75 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.75; helo=SJ0PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fPQW1XKPayoCvNuTGEEpna9M4lJxB3l4rBQ9y1fcEZQU8f+X9w/w48sNf8QgG5/226VkRjhGF+g/rwOF0Sd10sc/9zLVQ2ELlcy759iQNMwWAg9Hh/klfUi9dslTI058Q05FM4Wc/ErQg+Ex/KnCncV+1JHiSGUKKPtV6LfhOywpZtFf6cx+dmW73NDA+a1VwzWp4h+/l9PQmEPB5M8/txhRVn0OCSq02LbflFPp45hiA5Die2ASBu705d3KKtIhDYs3ieZYFoeGZgQQUnasH7b5M6O9rtk5ZuUdItpqN8SfSQMmBySVo6VPk2sJDXWBxK87RdcaZEJRN/zDIP5wOw== 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=RlgX5a6AGvq5jH49n4U+x4WcIr+mTwnUzMyljWt2R54=; b=CWQCUjsCOFCj/9qGrTnbJEdMeYNf9PssYXOa5rLb+Hb/KzwbXmYrX6UuSMrdZGWu5tGoBGG17JkargPBbFFw41RE8vS+L8TsVmrHu8aI+PscK+zC/APXs5Sg8IXe7KPbiGt8s7P780D6LYCRjSphhSghpn7Ob2g/kpT5XBQbmSN0ERJKR+U5yUjTAgWlqkpAHIueLwLPCUATW+rGvJblZd89W9eNyIjW/rZWiszbJjkl6lxtHieSZPYrozYzN+X6r4QqR849nUpvDJ532p+L1vLxqnM3GHtMnBHmk4BkZEjHSb6Zl5lH7hD0c+gzUcq4q85JFIYOJv5JkDlmPUITPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RlgX5a6AGvq5jH49n4U+x4WcIr+mTwnUzMyljWt2R54=; b=FjFe4cNF4nDpsxt06fKP0qMdSQP1dCt4R1YUZTlKkIjDdfj6qr6wQ5GM2GPHoycxdJ7c7KawZlWPYolq81cx3fePTNq/vRnA02NIjYvBemLWatHazYru2itfnEgfwMM/yj30+akXG4pmsUxRLH+QfWbMn6gNtYCkXkaMRA9CNiI= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Anthony PERARD , "Michal Orzel" , Julien Grall , "Stefano Stabellini" Subject: [RFC PATCH v6 28/43] altp2m: Move altp2m_vcpu_{initialise,destroy} to common code Date: Mon, 20 Apr 2026 17:31:51 -0400 Message-ID: <20260420213206.208750-29-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|LV3PR08MB9404:EE_|DS2PEPF00003447:EE_|CO1PR08MB6514:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ed4810a-ed96-488d-a5ea-08de9f2471ad X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|36860700016|82310400026|376014|1800799024|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?AK9iWy8vPTDcuxGkt+pAXLcDXKChu/bA4TfdHdz/2P922sx5YWW7yTINiaCL?= =?us-ascii?Q?7UYZ0B9njPu3bCC+zxWSVWWXh/RKoN7RUG93TY6nhIEdz0P2eIUhhpyvgNvX?= =?us-ascii?Q?aNb8685V1+ze/x3xoPSQURLWwusdti4O5iVPcj7tgulh10sJjvk2mLXemjON?= =?us-ascii?Q?ryzI3fTGRGVhTMo4d4JfGiIfp8DpGYN2WQeup+e2jOQ0RpUGn0QtkxR8z/B+?= =?us-ascii?Q?wp6moSPbHMGHd4mdwJPEb1seXaMHckuMK2/dbl3CvvAXYZA3lwi1Ma8NKCf3?= =?us-ascii?Q?lsIUi6lkFoBJCGiXJpkfwtcq2VLxz24LdWeoY81V5micJoE0u0KIar2vnyYX?= =?us-ascii?Q?6vNF7GCJrZAcWM4CWVLLppQwLmu/V7+yYkkYKLwznpnQi1k+2GXnn24YuSow?= =?us-ascii?Q?e4ST11JYdsb+BYQaKQTGcdYNkHMYNsgGVYzBssBX5BYcW3a2ToollkzqubPG?= =?us-ascii?Q?XklCUa1+nVOlW1R1J+DoNXLLNBHcdH8jdVxgWO0M0e9oaUOzHEqC8jtH1z9V?= =?us-ascii?Q?nPJb1pMwxcKI44al7MeEqBpJRECx+9vVFocnG7tdcOjnYo0bVfE4PjaT8Nw7?= =?us-ascii?Q?WAcYMme5XqsordfqcTyyiDRqeBhcHqFDwkcZDVSzWpaWEtGgAyg9X+Wgk/Ox?= =?us-ascii?Q?WUHjar4BSmZmtKCq7X2tCP0dDe5iKFYDEqpxEa2EZM1WEij8pK3+V4RPmpDu?= =?us-ascii?Q?CtLSu8v4ISfTwg9gdFuDw5bxeh/rdSTxsRAO3t9T/oz9VGGptAvT2VvmkQEj?= =?us-ascii?Q?n6T85WTDxwC+tYvcLjErebXThUA4KmWBLVmB+rc/UDhFRLmXTBPY/zPbT5+4?= =?us-ascii?Q?wiYTCwJJo5jvxs1k+X0Gp/JjbgbrWdL1TT0WrzkrtiXF3CUAu0kM0wqxw5w6?= =?us-ascii?Q?JfTje3PZMjGXST5yJZ39yrvRsvsnWH/E3R2ft1Brn28tAuiZswTRaBQh4NSa?= =?us-ascii?Q?FylGycb5OiYdV36sB0Fo+nMYD9s393W5Jz6RE+J8cFgp93dRBqfZXe4v7IVh?= =?us-ascii?Q?3cRtfavc/SMW2x+AhIqSpwzaHmSneE5t7CO1rWsArhXHZCMVH7wXCreAs1wj?= =?us-ascii?Q?xLGXt987kSv4czBH3Q5X+NpO8YtFohef/V0+GG4GBaMyoLzJOKPJDPqSZQmY?= =?us-ascii?Q?ioWN2r7GhLoeU4WE0XXm1MhWqwk1L/dhrGdk1pFLWfPASI8Z4MS05KwS3w+j?= =?us-ascii?Q?6HZkIWUywuCY92lk?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(36860700016)(82310400026)(376014)(1800799024)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: l6i8UTH/yhxGq+dqEXoc+A8yYEPv2wK9SDl3NnGKfwbcAuMUkGJPpTLUarsbrXQjjxjTOibTbzc6ieLX5u4sjdA6AInluPJu7Cbyqr18Is2US2+bZNGUROlLdE0ng7i5nXbkkSfGYDdB5DU5W0NjMklvl0qqOovz+x3vjNanCKYi9Jup+Q1VS4nOnKhY+7HC1r58XJMfNepEDw6Hrlf9oROdnXauKWgB7/3pvnI2tvmwTr8w3PnqrlB3R8ZBzYVTzewPsbKeneDT2iEitA6y4oNSR53mdALMhS6LirwQuD3x7f3dquKS8ER8jDoSgj6htELcbGTzol0zRSVUKIN16Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR08MB9404 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.75];domain=SJ0PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.75];domain=SJ0PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DS2PEPF00003447.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 7330784a-a186-48dd-2f2f-08de9f246dee X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|14060799003|35042699022|376014|156008|82310400026|1800799024|18002099003|56012099003|22082099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ohqt8wDHpSblp5fwOlhtVJLnXAQC9GmVHfwRZCbu5M6MOA1aivKRBg6xhsnj?= =?us-ascii?Q?oNknsh3CBFuGD1XjnLIKWP+ALZjupL7U75r/EEj0ImiOp3ogQkKW4tacNUlG?= =?us-ascii?Q?my8AbBkEptkBUYLstOOHVbkDZqEN5shforL/G+1akg4lo7kW1jh4dR8/KPet?= =?us-ascii?Q?xBhE7WRF45ONZge6+MdVdt7SPEGYIRQHybJBM0K0sEC60YxWMhis384X/RPN?= =?us-ascii?Q?y22tV9PDUUDV3sydZJg+D4oIWL693kVYQ2ffc69xZevJV30KqGy54YBZOJQD?= =?us-ascii?Q?yKfb/lyVOH2xxnbegc5VFK/eQRSkxU3hePcHSxjdXjojLf9B29x3s7yu3Xta?= =?us-ascii?Q?5SxUzivgJ12DgqiTnluSafcPSnnB3UXhMmeA8DbKfpbwcrTZauuPMs2Brnqo?= =?us-ascii?Q?Js7mk4WCI4UB2EKGLzmQfGWNdOpzZaRg/uJMlJu+4q/qZzT7cizI9iJgBLxl?= =?us-ascii?Q?na72sOkd555fxsv0ck97kK6V7VCJXZGpMvmrPUpvMEkDLLklDWnug9eCtJrT?= =?us-ascii?Q?iuiKi8GStJ2YlVF4Ztqh8KoCQSA57RI2W1tVSNpZlEgjLjXeavVy3vqNGXf/?= =?us-ascii?Q?7ZcLcJoKGG34JBLOBxbwdqiijrzenuRV6+fsaqG9CJEJRm2wIrQWcT1/EA5t?= =?us-ascii?Q?GCi9SabVvHNURkFhVH1JWz8Go9K0HjroEsc/f6r1jJXGl+6hvgN3Q89cPjsf?= =?us-ascii?Q?v1YDR8SNwDk3Ig+811hqvx0JZTjsO4ROMlNQF34tjM198rhJnwdvedxSSr+k?= =?us-ascii?Q?chtDpYWmB6kKwJdGz0H9wLQWV4ggr/QCv2DsJqw65wG/NqblHPQzcbyjwGM9?= =?us-ascii?Q?SRFcx+zYWhUaaucbLwizlqDgJjMvuFeFyBo0LxASnMO6sRDE/Rku7yHmRxAu?= =?us-ascii?Q?1bky1bnRQeuq8ZGFJ4D6J68WYxGcjoJt5vOlzDRkJAxdI5rR6LUnz+X6HZEN?= =?us-ascii?Q?nImX8U+HcjRSmTVm9ubftrIM93DHcKM3m9Ijg4k/B7gVNkxVlq+IS9maMP09?= =?us-ascii?Q?51UAVskIXdp2hdlaxHovI4xbOzAExFlS2ciyPYNQb1rf084lZE74M+wY5o9i?= =?us-ascii?Q?1nNl3i4B0HGkK0uZy5lnBYcoHp9KwUDcLXzTMR3+DUQtFy90o9XKUgxFWrfd?= =?us-ascii?Q?EohQWiri7xEV2tz3h9P04PeuhjYp8NH7t0zoagSfQn80BKfOPhUO3p3X1mWK?= =?us-ascii?Q?ILc0TB3e6pzKeWSS?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR08CU001.outbound.protection.outlook.com;PTR:mail-sj0pr08cu00103.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(36860700016)(14060799003)(35042699022)(376014)(156008)(82310400026)(1800799024)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HppJ1eW3+j5+5p7/IvuE6vlafSEuF9O4HEC2JJy7HqE/Uadga5qwUB0/UXMUQgyNEt/V0UG1zsF6o+D9QfM5Rv27vUVa2FH+i8/VPqHNjhSZ0eplx1xM6wJnuf4bwK6kbXTBxOxJrUFpzC953M6dNd/uBzl0JV10qDxYSZoZpLEDG/rX1noMqNpBp6/ouBAdS9iZ4UbBe0t3EieNMiLrafsswPbH5nYaO3Atx8UBzLBtrQ1bFuhLsugrb0i/Vor/+1wIVivn1V/14FxiQ9iEuv5QKTOBk1Tuwl1BKXCsV6g5xFTWq6ARkvORibjViCo2vG45I44ifACRMUispw9mBSdeCI0GLBwg48IXKV7uKLrFClVubrdY1K5wq/Tdi4VvMCpd5ZC2pJUQQ2TrjUc85ntm9s3jbfYgHx23Y5n2dDwd/sQjN6ijYEVHFxqQuX5H X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:20.4572 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1ed4810a-ed96-488d-a5ea-08de9f2471ad X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-DS2PEPF00003447.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR08MB6514 X-purgate-ID: tlsNG-42698a/1776720808-06D77F3B-028741C5/0/0 X-purgate-type: clean X-purgate-size: 4659 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776721137034158500 Content-Type: text/plain; charset="utf-8" This commit moves the altp2m_vcpu_initialise and altp2m_vcpu_destroy functions to common code. This makes it possible to use them in the common implementation of HVMOP_altp2m_set_domain_state. This commit contains only code movement, and no change in functionality is intended. This is commit 1/2 of the altp2m_vcpu_{initialise,destroy} phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/include/asm/altp2m.h | 6 ----- xen/arch/x86/mm/altp2m.c | 41 ------------------------------- xen/common/altp2m.c | 41 +++++++++++++++++++++++++++++++ xen/include/xen/altp2m.h | 6 +++++ 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index b3d348386a00..43dd5d2acd9c 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -105,10 +105,6 @@ int altp2m_get_effective_entry(struct p2m_domain *ap2m= , gfn_t gfn, mfn_t *mfn, p2m_type_t *t, p2m_access_t *a, bool prepopulate); =20 -/* Alternate p2m VCPU */ -void altp2m_vcpu_initialise(struct vcpu *v); -void altp2m_vcpu_destroy(struct vcpu *v); - int altp2m_vcpu_enable_ve(struct vcpu *v, gfn_t gfn); void altp2m_vcpu_disable_ve(struct vcpu *v); =20 @@ -151,8 +147,6 @@ static inline int _altp2m_get_effective_entry(struct p2= m_domain *ap2m, =20 /* Only declaration is needed. DCE will optimise it out when linking. */ uint16_t altp2m_vcpu_idx(const struct vcpu *v); -void altp2m_vcpu_initialise(struct vcpu *v); -void altp2m_vcpu_destroy(struct vcpu *v); int altp2m_vcpu_enable_ve(struct vcpu *v, gfn_t gfn); void altp2m_vcpu_disable_ve(struct vcpu *v); =20 diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index 46374373848d..0542e3ef9196 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -14,47 +14,6 @@ #include "mm-locks.h" #include "p2m.h" =20 -void -altp2m_vcpu_initialise(struct vcpu *v) -{ - if ( !v->domain->nr_altp2m ) - return; - - if ( v !=3D current ) - vcpu_pause(v); - - vcpu_altp2m(v).p2midx =3D 0; - atomic_inc(&altp2m_get_altp2m(v)->active_vcpus); - - altp2m_vcpu_update_p2m(v); - - if ( v !=3D current ) - vcpu_unpause(v); -} - -void -altp2m_vcpu_destroy(struct vcpu *v) -{ - struct p2m_domain *p2m; - - if ( !v->domain->nr_altp2m ) - return; - - if ( v !=3D current ) - vcpu_pause(v); - - if ( (p2m =3D altp2m_get_altp2m(v)) ) - atomic_dec(&p2m->active_vcpus); - - altp2m_vcpu_disable_ve(v); - - vcpu_altp2m(v).p2midx =3D INVALID_ALTP2M; - altp2m_vcpu_update_p2m(v); - - if ( v !=3D current ) - vcpu_unpause(v); -} - int altp2m_vcpu_enable_ve(struct vcpu *v, gfn_t gfn) { struct domain *d =3D v->domain; diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index a731ad7cdab8..e699b64678d8 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -59,6 +59,47 @@ void altp2m_teardown(struct domain *d) XVFREE(d->altp2m_p2m); } =20 +#ifdef CONFIG_X86 +void altp2m_vcpu_initialise(struct vcpu *v) +{ + if ( !v->domain->nr_altp2m ) + return; + + if ( v !=3D current ) + vcpu_pause(v); + + vcpu_altp2m(v).p2midx =3D 0; + atomic_inc(&altp2m_get_altp2m(v)->active_vcpus); + + altp2m_vcpu_update_p2m(v); + + if ( v !=3D current ) + vcpu_unpause(v); +} + +void altp2m_vcpu_destroy(struct vcpu *v) +{ + struct p2m_domain *p2m; + + if ( !v->domain->nr_altp2m ) + return; + + if ( v !=3D current ) + vcpu_pause(v); + + if ( (p2m =3D altp2m_get_altp2m(v)) ) + atomic_dec(&p2m->active_vcpus); + + altp2m_vcpu_disable_ve(v); + + vcpu_altp2m(v).p2midx =3D INVALID_ALTP2M; + altp2m_vcpu_update_p2m(v); + + if ( v !=3D current ) + vcpu_unpause(v); +} +#endif + /* * altp2m operations are envisioned as being used in several different * modes: diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index f5a4d0e60562..7defe6126563 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -24,6 +24,12 @@ int altp2m_init(struct domain *d); /* Free altp2m views */ void altp2m_teardown(struct domain *d); =20 +#ifdef CONFIG_X86 +/* Alternate p2m VCPU */ +void altp2m_vcpu_initialise(struct vcpu *v); +void altp2m_vcpu_destroy(struct vcpu *v); +#endif + #ifdef CONFIG_ALTP2M =20 /* Alternate p2m HVM on/off per domain */ --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720838; cv=pass; d=zohomail.com; s=zohoarc; b=XgNX3s0O+2N28GZgoYTcQt6xczj/J4GHRDDzH78/t4yraJvzYc5mExAxbSgbKWqEKKXWtAna26+hI/Cs7j6Nl2ciPh3QkqKpxBsqoKWuj8udMI1AhrMHvomxeSzFqVv2buope4T3emhhyAgTfL/SKSbEeLjKRdXbs/mBJ5lyBS4= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720838; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=GvY1Hq4hwLu2aLmi7v9CAxN3huVX6llKANSCVnMm0ZU=; b=JigyAO6UuKc3V11fpPxzoDnQpYxNyfbc31vraZL2rTgSh9drsC3v2GJAppBi4RfaEzMKg+pyNuCuHDnL/P1odwiHUkcUiAzVA6CmieOj8Ezj1lmpZwIYxfmUTEYjwFG13MmmhEcNixVVpUiYaN0X6QbbbIenvGGMjo5C74/YnAU= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720838900577.9920952093989; Mon, 20 Apr 2026 14:33:58 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287873.1568313 (Exim 4.92) (envelope-from ) id 1wEwFO-0006rk-Nt; Mon, 20 Apr 2026 21:33:38 +0000 Received: by outflank-mailman (output) from mailman id 1287873.1568313; Mon, 20 Apr 2026 21:33:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFN-0006oW-Lh; Mon, 20 Apr 2026 21:33:37 +0000 Received: by outflank-mailman (input) for mailman id 1287873; Mon, 20 Apr 2026 21:33:34 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFJ-0005xa-GO for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:33 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFI-00CCPQ-Su for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:32 +0200 Received: from [10.42.69.9] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69ba2-bab6-0a2a0a5309dd-0a2a45098212-8 for ; Mon, 20 Apr 2026 23:33:32 +0200 Received: from [40.93.195.142] (helo=SN4PR2101CU001.outbound.protection.outlook.com) by tlsNG-bad1c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bab-2497-0a2a45090019-285dc38e3c53-3 for ; Mon, 20 Apr 2026 23:33:32 +0200 Received: from BN0PR04CA0009.namprd04.prod.outlook.com (2603:10b6:408:ee::14) by CY3PR08MB10695.namprd08.prod.outlook.com (2603:10b6:930:10a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:27 +0000 Received: from BN1PEPF00004689.namprd05.prod.outlook.com (2603:10b6:408:ee:cafe::48) by BN0PR04CA0009.outlook.office365.com (2603:10b6:408:ee::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:27 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BN1PEPF00004689.mail.protection.outlook.com (10.167.243.134) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:26 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHn6qLFz1wdM; Mon, 20 Apr 2026 14:33:25 -0700 (PDT) Received: from DS2PR08CU001.outbound.protection.outlook.com (mail-ds2pr08cu00106.outbound.protection.outlook.com [40.93.13.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:25 -0700 (PDT) Received: from BY1P220CA0016.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::13) by LV3PR08MB10496.namprd08.prod.outlook.com (2603:10b6:408:289::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:16 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::7d) by BY1P220CA0016.outlook.office365.com (2603:10b6:a03:5c3::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:16 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:15 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:12 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=v/WqEAjdi/sxfO/Mt7R+n9t7NVTg8iWZwrBpS7qjICG5Tkx5OydKjlhsYw/UxudsEuwDH/yjtDmcdaHVZBKMJLDyLLmWzPhJDa4EL4zazMgeafSDOJa5S5ia4zseIA/OxvdF7FA26eMzTYkjHJp+r92a2MSf/i7sbHExbeZCuEgrzbUJWfABl/m3Bm6iN4k78PSX7pxfJalSwPGtEwwCDA6ggJ9GIlvIm5VinYJMb+Vn5Bu3zCQamLOTL5OgDu2c0jJrDCM6jhGaCklVWz8KtnlkXRtWc+sLkSH2IWqAMNSta5I5+PngY2PHy3mm+395nuM9IDSoXCVKfg1uelw2NA== ARC-Message-Signature: i=2; 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=GvY1Hq4hwLu2aLmi7v9CAxN3huVX6llKANSCVnMm0ZU=; b=u07qfmBacJbLkKBy3A1BRggUIRMjOHSV9+vnJA2xeyudxKwqMBniGRcIBWYq7li7yCZBzrGRY2EYOMrOmzjJQh0hd5PoKYub9Nm3/1JLIXVOIBZn0YWxGB4KUzIWZV8ImvPF+wBsKvF+l2woCsfltqNnb6mQnlM0GObb5L7RQAb91zt09MUc/Dj7YuK8LC0H+9SYPgsS+o+WaydaqsZdYHOgtjlDnDE3cPlUIOxsKjZyYLsH0DsZbVG5l4DHxpvnop/aM97xWj0w5di6rKGV/sbb41C0hE++DL7WbVZeBFlqkqX8zzhcjHksVvdl33EeyJTGJzleL3FwX7brwaJLrQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.13.54) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GvY1Hq4hwLu2aLmi7v9CAxN3huVX6llKANSCVnMm0ZU=; b=O8bReBvxkUhN+RPIvfp2ulfpPBJIAVULs9Nrcgiy9ft7P2vbloncct30YrOMyMgxpmg62Y3A89FtBfYbWxFsgSgfauL+zpC4LDjEiAXJ5ybpF7deSNzBHLtr132NI4rupnzAubPLCN0dyqwrIgwzHpKatBhqL+1fu+pVYUvlUNE= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.13.54) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.13.54 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.13.54; helo=DS2PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WPX4hfRbUXFrVZZLzAolr5brBPw6sAnL5xoyhMSaY2Cm9Stu9N4KgWn5R5Y3Gie2Oj/Sce0yp/wAZjuQMTIbKSwDRV/dGlhzvq2Ou3wcyUfeK+z0iRElCvX9Y//TJc51D8PwjrIk+LowVsy3pX5h9mKotXJcphnuhXhiIWpOfJjNNBjsPKvvIoR+ZGREMc4//w4Q6sTftI4Quh9zG3pWlU1zfFYHXemjITHNweMF+Oe3praYz+6SW3bDaR1Vlrz59AFOhHfTedZeHPGkhXAeSNsHy3VsmhoCW2A5pkVN4S3RZ4zrXeGB+90Rwlwj1HKr3OT+MvjYd/apoDX66kVcsw== 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=GvY1Hq4hwLu2aLmi7v9CAxN3huVX6llKANSCVnMm0ZU=; b=ZS8iA0+4kWo7vv4GzHg0ijpPnqdN0IHIQHtQOIMC+vyWiiMwZzINFSiiSYyDOG+KKH3/R2tAL2Y03padJSBtmMG9g43qzmeJQyufBJ9DcaCg+9ZUzUulQ/thtuJDHbK1NyeQvITZkLJC6CvR4u2U6QnBRemtSW7ZDNC1pRlu0vmw2jR3E1b/8OhZnBsh4iZ3835esgrDOzQoDstau4XRh808oApCSBbCEGHBEt2nl8CNV66BnouY6QVq/hIt7ooGyFRLHOvZ8uA/AA90lIS+CjJpdstPOLiOyCjz/Gdydjws6QuRCBH2Mh8yYIJwH4hAoMJ5uJguhqYuu35OGwQJRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GvY1Hq4hwLu2aLmi7v9CAxN3huVX6llKANSCVnMm0ZU=; b=O8bReBvxkUhN+RPIvfp2ulfpPBJIAVULs9Nrcgiy9ft7P2vbloncct30YrOMyMgxpmg62Y3A89FtBfYbWxFsgSgfauL+zpC4LDjEiAXJ5ybpF7deSNzBHLtr132NI4rupnzAubPLCN0dyqwrIgwzHpKatBhqL+1fu+pVYUvlUNE= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , "Julien Grall" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [RFC PATCH v6 29/43] arm/altp2m: Add support for altp2m_vcpu_{initialise,destroy} Date: Mon, 20 Apr 2026 17:31:52 -0400 Message-ID: <20260420213206.208750-30-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|LV3PR08MB10496:EE_|BN1PEPF00004689:EE_|CY3PR08MB10695:EE_ X-MS-Office365-Filtering-Correlation-Id: 441271fa-6c5d-4e9e-a055-08de9f247586 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704161411799003|36860700016|1800799024|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?7nlLgsG7Nue2zqKG4/Q3EpE7gUJPu/Naps/Au3ZJNXA10dSSreYpFP1sBu1B?= =?us-ascii?Q?DTs7saQ2aSlMjVPYfQPNXZoSMX1ep1VuLCRCXSlwXdmktQoGrv/iJFWXJhbb?= =?us-ascii?Q?4ulbKK2c6uRPM7kbsKEtcoV/UqJX3mY73Yz80dFDsCJVZaxkvMi0bZu29/Fc?= =?us-ascii?Q?EGwwquQgiZsswYOzbV7xnZqEutAM5mYFJ02uCrwmVvcMztL8a5CLL5OsKM2U?= =?us-ascii?Q?LURmPPzIcUJ2t536W6O8Vu+sDNvukDo317wu5n8IvNZw2XBZIjGqGAt0s33F?= =?us-ascii?Q?P9KmK1IViJdAn3qmylZsXYzRq5Jqc0Okk1yas0CIUPc2FRQHqSWrAUs/TirO?= =?us-ascii?Q?0atb8x920bZXWy0TEn4TpQJ3n7zyyapvLbiLWvUFXtjIbjBL8nwcMyWDrQ76?= =?us-ascii?Q?NCS+xsLM9de/cwux2uNXMFWfHqEH+W3sQ9C0lkKWGS761j3k6TCZZCr+Lq1z?= =?us-ascii?Q?Ah89wrnqrppLwFwmR+rN1ljWvn4fKDOniZrTYvgRC+/2ce4N/m3uWdQb5fp0?= =?us-ascii?Q?S3yNyMHk0gz6nrHy3FwXeIuTdgo5CSW+XjLrZX5D6TEg9tn7RfOGsSt+z5qt?= =?us-ascii?Q?hGQrpCJPHdV8VdpFtF8NS6zwd93cbLQ/T78lWKUd6a6Ud+jZP9jmJ3uD0Oz3?= =?us-ascii?Q?TljS4XFZxKcDWMgBlPTx0A30qtOpPkHgWpc9DJU0v/F1cWvC3j7BS5Y+GgPC?= =?us-ascii?Q?TCipcWgq9M2sbC2amjV92znFdwUz/s2jZ6ZvEK3MUZAtvuNOemD+1AbA4VEK?= =?us-ascii?Q?E9w7rZW/0qfkDA9uka57o/UkAYOoFDU9Sum6fCL3R57FV1U/AwEwASfNx2LQ?= =?us-ascii?Q?IXbPT3cK2SYjGf77EfBu0jRSFIIKPryqwiu2K6GhDLn9rsXkbNl/AXBSICy6?= =?us-ascii?Q?EA+N6NzN7uqNzrXkE5tN/iMBkkQiQjurq7TEVwjtalwGw5o4yd1I8abHGGep?= =?us-ascii?Q?SQNPzLcwyEtyrF5vzHfzSRUkYd19hISaw1ecEcsHY+MaxW949CQXYAcij7Nc?= =?us-ascii?Q?2EzWaDWkKkFmk/l1jNGWOvJuei9R+8cOLwMulX+NGoswUarb9lLiRd4vtMre?= =?us-ascii?Q?KkbVzE0DUeM1hnbX0XO3QBk2LL4ETzJFXVN4FglL9oA9knHKB5dHQecamSkZ?= =?us-ascii?Q?GLPL6WuSpAKS?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704161411799003)(36860700016)(1800799024)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: BpYVmuepbO3kGX2yPdaiVRVz2oh196cdc7m69nM90BaOmzy5W+R97z2q1Qx6W5Nu3t9n+SQb9AO2p1Ro4ZqQFkPSj5Dl0pdYm2Vn0DsZhKWq7ZUY2a9V24drimGxsw9iIhUY/xepkaQTyw0Cm38EMA4kOEYLtnxBf2tCldZvdZuBD7vHvpumTatNetB9l0skT4WOUhhVzHuXDLr+HJYssJcf+zNTdiTkFW/r3BE38SzeNXMVpUBNERa/k5JGZ86bR9KQ9Q2Gd2zKUp9zBKQPHhpbJKstUs62/4OEn47IpdlqVZTw0/AMjTQ9KNrZ/LCbnIaoaJGql/g2zzz895CRcw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR08MB10496 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.13.54];domain=DS2PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.13.54];domain=DS2PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1PEPF00004689.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2dd3d9a1-1442-49c1-0db8-08de9f246ed8 X-Microsoft-Antispam: BCL:0;ARA:13230040|704161411799003|376014|36860700016|1800799024|82310400026|14060799003|35042699022|156008|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?5vNSrxPwnMxJON5RQJyIA1GwRJFMYFVv+aBErSa9yRtHwCipbuxZsidyIrqe?= =?us-ascii?Q?+H9W08NaTnOxSjvwdBPBU1B3pokIPExy1f9432xNOGAOV0Afnr+e4gzBSTbL?= =?us-ascii?Q?NbeN4G4X0hPINgSc3ia4kc9pDpaaFEMblzzcemZXfoh7GAh1A+uDQ+PCnpwX?= =?us-ascii?Q?jEUeOBTcx2TgylLVuCDglpu2Gi3OTN7KxqbIWM8JcNKO4dqHTRj7jt1XJI1Y?= =?us-ascii?Q?ufiItyhSTGxm43sb7vSRQfb0BS7eQyq2jJVyR0W2glu+u39lbRy6euULFw0f?= =?us-ascii?Q?XhEhDihEEOkfuVV8rQapAe3t4HqKb/OrNQVY7o2CQ49yIwk3ukP3NFIytMKI?= =?us-ascii?Q?HfgKhmEl5r9RU0hqMEHp6LbtBvRz5qIJIy7lwwKtULpIB/XqqpKw2z3IX5qj?= =?us-ascii?Q?fNOO4DmHFVE7PhRmlkT1/rZpdwETiDTVbTQnffsRg34VwqV9tFXvUiS+dePB?= =?us-ascii?Q?bV+LeqcblKQ/rZ++U8e1PopfiND+h4UTFXtwkF2YYTXytgqEowr0t6EvJEJV?= =?us-ascii?Q?y5TEgytE7PpCA6KyohKPkCynFf/kDMVuv/pjIFhzobyVaaFvG1e2j12+K4/T?= =?us-ascii?Q?Cm4ikNSPY265ZhnHoq2qce8Nz+k1IUKBI717m7XENqJX4t7mSmZdOkChw0mb?= =?us-ascii?Q?Vb1IsikL3BeKGa32UwUCXVC+EQk2pgDJVxZwpVx7zENTknpai+ivIhyNCOua?= =?us-ascii?Q?Uf7zwoKnXDXGMpcB7n77ViJEJaWBglu+LQrSATWdFZIMmEcnvqvblRZ3VsnQ?= =?us-ascii?Q?UO7TtdgFVbrdt+3QtWHLO5zKhpeCDNLPDCMCCrv3Ev9WhDuPhhyDBioEAjLy?= =?us-ascii?Q?JIgw12WCPNJkT/Akv0D1nL7W+2x0lcs35bm/RQjIP/Xrw2W9rk4cAxw59z7J?= =?us-ascii?Q?6Vb7Q1rrKQUFlGv3pP5OakSTjjN6jgl++ZQaBbvajUK4rHbGNwhv0+efkJBO?= =?us-ascii?Q?urIgW1K+ONdVMo2UnX70ZxlVuNhEaROlSk29TSi9ZS2mKOW845R8jWlb0DKl?= =?us-ascii?Q?kNOeIMXibjdY7xOJyCzFBjvqMsnwcJM4V21HMoOtpmWmn+YUbedjM9K9tSi/?= =?us-ascii?Q?1MZkfbFpsemfs8UIsi2sosBxWj0PQvXmWrDfccyb63qeTprFPNOeXwfZQQTW?= =?us-ascii?Q?/K5OJZP94tXw?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS2PR08CU001.outbound.protection.outlook.com;PTR:mail-ds2pr08cu00106.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704161411799003)(376014)(36860700016)(1800799024)(82310400026)(14060799003)(35042699022)(156008)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dO2g5M6zhX8U6aCIPU2TKZdw3p3JLXYuNsZrN/I5FhBKMXMpl8Id3kHB0FGKbKf61cECLYBrKJRyxWLS8eEzCEWm3vb27uDl7Vn2xOVYYcFeFCDrBpMsmEGl+G5do/l3+bY8/pbr8dXbpxUdIDsyXlCjQawULtfI7Bd+7N4JAWyr7np9fZnUrJkNZC9VCPPx3U1PS578Awzn6sh4u311ImRSReiojktUCrxM70m8lgeja3dr3WOUeBKhG5bSYTKnlmXUSh277dm1LFziWxrVhhDIa/OnezjgVQdp7ZlCWq+hFkhU291sJ1gWnKblqb+YK4o1n2wR2Jt54ki7C6Gi+JnKz93wkGsDvdiD4Dm/j14hldCB1Cno5O5EIwPOYYhc6Vqgyq4JlJQF9wiOMnYeq3gvRfqwDl1HCaP0guNFJk0ZNni0O6IiBe7GTMyZ0HFq X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:26.8045 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 441271fa-6c5d-4e9e-a055-08de9f247586 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN1PEPF00004689.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY3PR08MB10695 X-purgate-ID: tlsNG-bad1c0/1776720812-91969A53-69D0BBE6/0/0 X-purgate-type: clean X-purgate-size: 3182 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720839363158500 Content-Type: text/plain; charset="utf-8" This commit adds support for the altp2m_vcpu_initialise and altp2m_vcpu_destroy functions on ARM. The x86-specific function calls, altp2m_vcpu_disable_ve and altp2m_vcpu_update_p2m, are gated with #ifdef CONFIG_X86. This is commit 2/2 of the altp2m_vcpu_{initialise,destroy} phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. The equivalent to this patch in the v4/v5 was originally part of the patch named "arm/altp2m: Add HVMOP_altp2m_set_domain_state". In that patch, the check that the VCPU passed to altp2m_vcpu_initialise isn't the current CPU was removed. This was because ARM only implements the external altp2m mode, meaning the current VCPU could never be a VCPU of the guest for which altp2m is being initialized for. Therefore, skipping this check was a slight optimization. I've removed that here because altp2m_vcpu_initialise is only called during an HVMOP, and skipping this check on ARM (especially when x86 also implements the external altp2m mode) causes more confusion than the slight optimization is worth in my view. --- xen/common/altp2m.c | 14 ++++++++++---- xen/include/xen/altp2m.h | 2 -- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index e699b64678d8..7b80426c7798 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -11,6 +11,7 @@ #include =20 #if defined(CONFIG_X86) && defined(CONFIG_HVM) +#include #include #endif =20 @@ -59,7 +60,6 @@ void altp2m_teardown(struct domain *d) XVFREE(d->altp2m_p2m); } =20 -#ifdef CONFIG_X86 void altp2m_vcpu_initialise(struct vcpu *v) { if ( !v->domain->nr_altp2m ) @@ -68,10 +68,12 @@ void altp2m_vcpu_initialise(struct vcpu *v) if ( v !=3D current ) vcpu_pause(v); =20 - vcpu_altp2m(v).p2midx =3D 0; + altp2m_set_vcpu_idx(v, 0); atomic_inc(&altp2m_get_altp2m(v)->active_vcpus); =20 +#ifdef CONFIG_X86 altp2m_vcpu_update_p2m(v); +#endif =20 if ( v !=3D current ) vcpu_unpause(v); @@ -90,15 +92,19 @@ void altp2m_vcpu_destroy(struct vcpu *v) if ( (p2m =3D altp2m_get_altp2m(v)) ) atomic_dec(&p2m->active_vcpus); =20 +#ifdef CONFIG_X86 altp2m_vcpu_disable_ve(v); +#endif =20 - vcpu_altp2m(v).p2midx =3D INVALID_ALTP2M; + altp2m_set_vcpu_idx(v, INVALID_ALTP2M); + +#ifdef CONFIG_X86 altp2m_vcpu_update_p2m(v); +#endif =20 if ( v !=3D current ) vcpu_unpause(v); } -#endif =20 /* * altp2m operations are envisioned as being used in several different diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index 7defe6126563..37c875a52327 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -24,11 +24,9 @@ int altp2m_init(struct domain *d); /* Free altp2m views */ void altp2m_teardown(struct domain *d); =20 -#ifdef CONFIG_X86 /* Alternate p2m VCPU */ void altp2m_vcpu_initialise(struct vcpu *v); void altp2m_vcpu_destroy(struct vcpu *v); -#endif =20 #ifdef CONFIG_ALTP2M =20 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720843; cv=pass; d=zohomail.com; s=zohoarc; b=cH2IyvM3SBreda5Tn1MlNocgfTCqcsiSrYLFAGmBgNO8nxQQC+Pd5CY/jIFW69cOdXpmxMjGw80ZZlDtlNHXi+/5hRCDe0eVB5iZcY5v7x8Jtgw4sUq9Ggm4TwRFnD/2IfBWw/QVStXrll/USqfcqsWTExCqnsucivRmq786lGU= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720843; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=s+lzv+re9KLW9t3mTXnO2Av9Vu/LGRGNe05U4kI1kS4=; b=FHKvCA0SWV954/CN9fzhEDdRw2FKrE8rtoVOLT8EMOcGCv3/L8IYYHKrteYJBzWOQe5lgHpES8hjh98DmPHZx5993jIFp0aKRhZH0Hl/AmCGxg2Y7uEPNQYFbnfhAG9jK8RwLN5lDRyApSeKQGfkSnrhnj7RZYGUy6B51lDRR7g= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720843355179.67478237285377; Mon, 20 Apr 2026 14:34:03 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287859.1568299 (Exim 4.92) (envelope-from ) id 1wEwFK-00064O-Fi; Mon, 20 Apr 2026 21:33:34 +0000 Received: by outflank-mailman (output) from mailman id 1287859.1568299; Mon, 20 Apr 2026 21:33:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFJ-00062Z-PD; Mon, 20 Apr 2026 21:33:33 +0000 Received: by outflank-mailman (input) for mailman id 1287859; Mon, 20 Apr 2026 21:33:30 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFF-0005AN-Ly for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:29 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFF-00EgCp-0y for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:29 +0200 Received: from [10.42.69.3] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b92-e002-0a2a0a5209dd-0a2a45038228-12 for ; Mon, 20 Apr 2026 23:33:29 +0200 Received: from [52.101.201.110] (helo=PH7PR06CU001.outbound.protection.outlook.com) by tlsNG-33051d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69ba7-672d-0a2a45030019-3465c96e606a-3 for ; Mon, 20 Apr 2026 23:33:28 +0200 Received: from BY3PR10CA0001.namprd10.prod.outlook.com (2603:10b6:a03:255::6) by LV2PR08MB10982.namprd08.prod.outlook.com (2603:10b6:408:34c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:22 +0000 Received: from SJ5PEPF000001CF.namprd05.prod.outlook.com (2603:10b6:a03:255:cafe::c7) by BY3PR10CA0001.outlook.office365.com (2603:10b6:a03:255::6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:22 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SJ5PEPF000001CF.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:22 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHj3j1Hz1wdS; Mon, 20 Apr 2026 14:33:21 -0700 (PDT) Received: from SN1PR07CU001.outbound.protection.outlook.com (mail-sn1pr07cu00107.outbound.protection.outlook.com [40.93.14.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:21 -0700 (PDT) Received: from BY1P220CA0026.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::17) by BN8PR08MB6290.namprd08.prod.outlook.com (2603:10b6:408:d6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.21; Mon, 20 Apr 2026 21:33:18 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::b0) by BY1P220CA0026.outlook.office365.com (2603:10b6:a03:5c3::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:18 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:17 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:13 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=fW5rgLRalDXniPNbEihUK4JOh5AWQthuEfqMxSR+HAp4ijP6sZyGW2OjWKIYMdVXIaZ590RxWflqyTQ8jaNKWopH/Lez1KDSk4QtLQhKVnZXx7ie9b6nyb1bIHm191H3v+dxK3GArjQRatsWpvZVI2sZHL44xWggd9F/2z/SlFDh6Fn0IUXvWqdeFfl7ZltKVRDb+9Wc0pfKGPbQ220oF1ZklSBNenb2uXrwI/Clhc0svLVuK00OBU4KdQFR3tR5L/8K1pYahwG8n3qz9Y6MeZsbPPgHkrV7sw67ayR1hMT7fD8JpdGaz2PzqICZulw0V8lnAimNhsiU0/25BYRVng== ARC-Message-Signature: i=2; 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=s+lzv+re9KLW9t3mTXnO2Av9Vu/LGRGNe05U4kI1kS4=; b=oX9XN1ezG9ZrmRxAEbp8Wv9sLawvJawHrUZhHeGy2b3UKh36mFIBbGVMd37fXtKre2B4JsIbhDXdFemDgMfAIeOdZk/6oQnhSVIzABylebNTg333gu+Z0qkolDAq9SqcXfDk0tTXNY6WjfGvxs5Jv7wKs5R7iTpf9hYqCS5x1GbZZ1gXeK513VXU6JK/vrqhNwpYdY/Z0GhqzYaxvhRWtvEIMeYm9Pz7JoPMV6QRH3IqjSiFgr94tsgJ1kl/j1GS6Xlqy62IrAbeCsNkQuB68bddkpYqWqP/ZeM5t5m2GzMDws0v1eGHREiBv7icEHVf4GUfH7vKW7zRfykiWbAVhw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.14.103) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s+lzv+re9KLW9t3mTXnO2Av9Vu/LGRGNe05U4kI1kS4=; b=i7wJwiTasTdQ3xK977NNQ1qNksIN540kd9nhBODppVL1Un/OsIuxorf0ZKOCtCuWFL+srud1v5LEs9KSVlW1Bzxv19tS9q3wcis59SqrtwDYzilgxNqNy+gmuU8PsNJPMGmeqTj4iBd+ZDsrvtTu3A/mWG1QEKZm6M/eK2UHomQ= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.14.103) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.14.103 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.14.103; helo=SN1PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oCWcyenad4h9ix7aAbJT5eBdWqviFeYRmMnsIKg0HuvGrAXdcdx330dNd5xRw6tZ7gnr4D73mYzdJIQFqpqHU0OjJ2nHBSJfUkDD9LdkKVomym2bBZaKkAAhZVKcLqofZKhzZ/8pHJ8W2c9YLTYiq34w25EvEEqolI2otuG8iKuI6U483r3BP9ViD2jIj7OPzf1LFBc8AHfcmZIr/7MuKqoUPUt81L72NX4Z2M7huTo3M9XsX4SmthCP2VBE5ThVfLqiKsRlRwnsQv+KYz9bqSlhrLGjaQ16wRX7xTfHD/5++baohYlo18/0ABfYY3akEcxTCF/ZFMTKL1XF0Y92Uw== 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=s+lzv+re9KLW9t3mTXnO2Av9Vu/LGRGNe05U4kI1kS4=; b=Gbd83PjGQD/z0PAcJ2qrO/+trBMhY5fgRcrqrOQfGY7iCAb+04mVEwgmiljbk2qsvRbktXzpwW4mi8n/OHi5W3v0mMPEQ/zGU2HFjJ55cP/b7hMlxZWI9qb6I6UfttE8322kaB3Oq8nL7uNIXVrkAB6Ba1TNGb05ZyfMytqBaVUgx6v2qzuj1cb0UHo3VhBkX56pSClxLJqi9zAoC3mUrFP4n/IB9CS9Lhw4rTHvD5Qgs1vmhLoUUx+9FXFZYTb/VqhnD6gQsK7ydj7y8H9vxYrDdHU6BJr7iR+V1S2jUuucR7Q+6Xx6DIn9i1EynXA1DDpCFVDiRkiI9O9OSspidg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s+lzv+re9KLW9t3mTXnO2Av9Vu/LGRGNe05U4kI1kS4=; b=i7wJwiTasTdQ3xK977NNQ1qNksIN540kd9nhBODppVL1Un/OsIuxorf0ZKOCtCuWFL+srud1v5LEs9KSVlW1Bzxv19tS9q3wcis59SqrtwDYzilgxNqNy+gmuU8PsNJPMGmeqTj4iBd+ZDsrvtTu3A/mWG1QEKZm6M/eK2UHomQ= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" Subject: [RFC PATCH v6 30/43] arm/altp2m: Add altp2m view validity/visibility indicator Date: Mon, 20 Apr 2026 17:31:53 -0400 Message-ID: <20260420213206.208750-31-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|BN8PR08MB6290:EE_|SJ5PEPF000001CF:EE_|LV2PR08MB10982:EE_ X-MS-Office365-Filtering-Correlation-Id: 36464852-9bae-492f-0b58-08de9f24728f X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|82310400026|36860700016|376014|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?qxYMTUrccBdq6ifl8vi8mmtK0pJNmJm/HpU72VeVl6zC6ypzMWpuOm3oFmRU?= =?us-ascii?Q?PT08KHlnZI3+YAzHyzlc/fD/pCTa/AIqynYb1oh12BS8bPS8g6NUe0QXwsG8?= =?us-ascii?Q?waDSH1apq2tp4FrgxXmtO1W90XUQmCwPFVUomqh1imoD3eIrq/NeL9KpsOs7?= =?us-ascii?Q?X1xJpcgiqBKa5+K7D1HvINs+2am1u1LhiuKFYjVdKytkoeR3zqqlJt8EV628?= =?us-ascii?Q?MxEwqL78gCQZwzqPHk2E0D+jSMWEAN19+zz/NT3TCAJfls1eO7HVfdZcGBXH?= =?us-ascii?Q?S4pqqX8P7WLadc2hi+TwEpTe2PLPeqjo1y6FlKKdb+/U+pzMf2PsaGDx07MA?= =?us-ascii?Q?hfI4AOcLH/7u8PMq6nTSlneCA0OYPQSUELvzxuRMqxvPJX6iK3DFeX5HX0fN?= =?us-ascii?Q?Qmy0+uX6oG5vtrF+iuindG+DCMiBSUnpINrxyevITFW4iksRnDn6KA/4RkU/?= =?us-ascii?Q?l4QZW8+T43mZRiI5nS+1a7WfbwhfrbXDVIWVRFSTZnjHXTDbWSy/7XFDt77R?= =?us-ascii?Q?+ccv5E5P85rSudkmkgULmEoHJfPbxgZi64IQxW9Y+SNSwpgrHkKLRafMM8n2?= =?us-ascii?Q?4I+j+jU+trBGntBWY9aq0axENDLUlWHStfoGfkF3QxOROXYaZGN+FihZ+jhP?= =?us-ascii?Q?4MIs56mPryo/U8fMExRBwKMJIfBi30TTjz4CwgTgykKqyZDNMvZqfISCjHTz?= =?us-ascii?Q?erbikyN74o7SPZNSV0A+xOty+heTcMtw57Rf6JAnRj8YK8A3Oax6z/B2kQvg?= =?us-ascii?Q?cVi+0IshTCmJKCeNUbU+wY/2G10fZhT4+QGhGpVrB4PYNeH1cQhQJidk3y1H?= =?us-ascii?Q?CR5ga6gzLXQN+h9vyEZjeuPJpNBj/MmvBZ0LYzf95mOveQYOjIArz0VXl8Qc?= =?us-ascii?Q?6aJOXpmXPtl1rQT+7te7gGWrgZip3s2pTLQprft9GfEK9smbdzfC/wiopB4m?= =?us-ascii?Q?a91rl45gABTV3nk8+NA7eFaNSDd2Cy/dI5ROPCeFxmqOxADR2Vr/ZASfXan2?= =?us-ascii?Q?5R/RfIzbcfL/LpZPRIWE3LoWBtah4NuxPg3K6bcyXTuY71tyKW0pJS54NZmq?= =?us-ascii?Q?7PrfYI5iBF3uMSuspPyyG8V6WfMzIgP6YWRcdEKoI5GOTTbwqNmca3RW/Lr6?= =?us-ascii?Q?fHu9ETurbYBjNknPvNTfXrl7etW2eHPE8h1CQY6LkhXEDqWOhsI4WxeO3kmu?= =?us-ascii?Q?AylfuWd44yljIOc5?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(36860700016)(376014)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: p3PiiLqLvpe/1tfa3szwMu4ZT9oKQwa5i6QYBhH0Np4lXDWhEreT/AY+Ich5CGWD6nfrW7+1V1yhe1JdTmnWQtHOnqbTXM9wvmcm9jceLumNYlxDRVvOM9yYRFMza4QqzhO4hhKw03DdH8b5FClEugmEyJv5U52ea0dOOAu9stgeg5mQybYxVUp/N65WQ9gVMOeg1mdbwnYCwm0mrV4arWemSRK8QxD0loT3+gae8UCLmL9AaZUNip24/32KADWFLrzMX1DUfuEQ5lZValPzD6xSBxIA7j1TeKdXMOWsc0ZmWgFlkaasO2sYwTJKpc6ydeddOTNLCrRpx8PCVj8T5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR08MB6290 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.14.103];domain=SN1PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.14.103];domain=SN1PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SJ5PEPF000001CF.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e02d9890-b95e-4369-3916-08de9f247021 X-Microsoft-Antispam: BCL:0;ARA:13230040|35042699022|156008|376014|82310400026|1800799024|14060799003|36860700016|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?C0R6pwBX45q/Z5yEPxINh7c60oxXXkfnheXMPywxBWNnesG8bSQxPA3hfcW0?= =?us-ascii?Q?N261xRMvx3sEajESONKDU1XaRPN71xw+/XcQ85lTgxNsqKLalm2cZS5Op+Gr?= =?us-ascii?Q?GSd7OsDeBeqXOJJz2PKeGFn8Q6yUCqust8F5Nl6QR7MuvWzyvLmybs/xSJxo?= =?us-ascii?Q?MaFh180Yyf0Yvo4CHupsILZshnRPjj8jXNEoWYE3d4pu+kLkyceJTI8+tlMl?= =?us-ascii?Q?9pKcBEXRwnmKvo0k3hA1URAJtTH6FB/JB85To9JqRDNz9xa9iXsbsjCVHLff?= =?us-ascii?Q?c8RfiKqe/OPB9G6cJ46MLoco3L8BHOHavQWqY8whHHoB6WAi7kOnQyAVPDg1?= =?us-ascii?Q?J4vXA3aP3oBkQ+ctMuyWtL456E5EhyIKhPqIHtEbEr/EPLMoOcAaoqiXJsbP?= =?us-ascii?Q?z9ELEd4z/40/7BXENacK6czUUrPsaj8mx5nA69Nd3hbZ4X6H3j86Hg2jyshf?= =?us-ascii?Q?7mUASE5KvIWAFy0KsYbKVVHqlLwALropWv21UJTYo0ArFEYF3EJgeqOBwwhK?= =?us-ascii?Q?wKxVzad1RZLV4NGQaUaVokuSOo8tC/seSGzKg9G4p+Hst7K1JLRc3L11998z?= =?us-ascii?Q?g/dSUYu1GSJLZ9jslALsML+WG+GkQCw4bcpG1NBzlAB1YVBMNS5cvt8dA5Oj?= =?us-ascii?Q?VCGJr5cb6SHB+cxa8dxFP2b++K3P9oUKjFbQIyZovliWBJGarIKjzOrYS8B5?= =?us-ascii?Q?yEngK1N8/EiR0Ya1zxleIfgotahjArcSKon5/FkO5TDDbvMLIBmsSVbL/Mp+?= =?us-ascii?Q?qk5JVDA29WE8FCSNffHQoQxnPVM/OFo/f8z76iTXmONhRNQVCKqi7CkKBd9K?= =?us-ascii?Q?lG50Zqu7sPXq1Ie+LFgSwzr0iY0L4sWsoYRoMkmCH7swX8SNcp2AIQAx0xE6?= =?us-ascii?Q?iTfQNT+hGJ/LIBBZgnQH3NsLExEF5/6kBkFjBvTTQwTE/3MhSZsMhp59XNNX?= =?us-ascii?Q?Dw4Nrrq16Nv/qNe8SMdkLoEmvkndMSfZiqLKiQEKP+fNEPNaGMil95Hlv0K9?= =?us-ascii?Q?jbMSRaSBP9Wz6wWTX6637eJBuZxchTpUADSq+sx9I3C6hH/f4kdy3s5Ld0cK?= =?us-ascii?Q?oH+dgwA3UQdmClrlT0Kn09rM1IKEkipppKRjD3OdzzsMOwXetMeU19ibKUKW?= =?us-ascii?Q?TI35vxrbzgVyL79PEqw3GorC0N9NnfFcSaVEiWoJoH6zuqRQ0QvvHov5kaSc?= =?us-ascii?Q?o0OKiN/WxhvLgm32?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN1PR07CU001.outbound.protection.outlook.com;PTR:mail-sn1pr07cu00107.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(35042699022)(156008)(376014)(82310400026)(1800799024)(14060799003)(36860700016)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 85Hp4dXszp5nQQK7ICLbcOKUzA6ZnOWHvI0AaqKQiukGoyt0M462px05vjr+frD69c7FsbHJ9NRN6Q/DNhkuFNdpJuQ7myu0anbMZjOQh4iPj8MpUbkbTwJsPxYdt/eJ9q6PzA77WG8sI1zWPwsk6CAJSjP5b59j5mPyS/T9z7IZ7p6RKa81sxlTR6kiVZ1BAAYarI029gnP+wHuzqPFlVSCP5Tq1o9WiW1YxhKIpkPVwmF3r+malwzDRPI1kl2n0rVj1V7VifU/WzmQM4I7zJngrt7gSXDCMKgDqPGZttF+FTraZTwG3UUHmJyz9rgcOlcf9fSDbdBIMAOTu6Aq9GrqZUL6F7U66FBfSsMLDXzxnZeCXllDX2s4qIFXT+BzUXH2Es1e/oEPJvXZYRRsxcixlGF+rxkCyPwQ5il2PukQiku6Igz88thk4kxygLVI X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:22.0113 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 36464852-9bae-492f-0b58-08de9f24728f X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SJ5PEPF000001CF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR08MB10982 X-purgate-ID: tlsNG-33051d/1776720808-A197D938-0C4ABDD8/0/0 X-purgate-type: clean X-purgate-size: 5462 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720845424158500 Content-Type: text/plain; charset="utf-8" This commit adds the altp2m_view_state enum, which indicates whether an altp2m view is invalid, visible, or invisible. The altp2m_state array is comprised of altp2m_view_state values, where each entry corresponds to the altp2m view with the same entry. This is analogous to the altp2m_eptp and altp2m_visible_eptp arrays on x86. This addition is necessary to tell whether an altp2m is valid, in addition to whether it is visible. Since all altp2m views are allocated up-front during p2m initialization, there must be an additional mechanism to determine whether an altp2m view is valid. Since the implementation of HVMOP_altp2m_set_visibility also needs an additional mechanism to determine whether a view is visible, it makes sense to combine altp2m view validity and visibility into a single mechanism. Therefore, the altp2m_state array is used to track both view validitity and visibility. This is commit 1/5 of the altp2m view validity/visibility phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. In the v4/v5 patch series, view validity was determined by simply checking if the altp2m p2m_domain pointer is NULL. This isn't possible in the v6 patch series, since altp2m views are allocated up-front during altp2m_init. Since the altp2m_view_state enum definition has to be available in asm/domain.h, this commit removes the sched.h dependency from altp2m.h. Unfortunately, this means that it's not possible to have static inline functions in altp2m.h which need a complete definition of arch_domain and arch_vcpu. If there would be a better place to put the altp2m_view_state definition, feedback would be appreciated. --- xen/arch/arm/altp2m.c | 13 +++++++++++++ xen/arch/arm/include/asm/altp2m.h | 23 +++++++++++++---------- xen/arch/arm/include/asm/domain.h | 4 ++++ xen/arch/arm/mmu/p2m.c | 14 +++++++++++++- 4 files changed, 43 insertions(+), 11 deletions(-) diff --git a/xen/arch/arm/altp2m.c b/xen/arch/arm/altp2m.c index 339f82835caf..e741648ff5a1 100644 --- a/xen/arch/arm/altp2m.c +++ b/xen/arch/arm/altp2m.c @@ -5,6 +5,8 @@ * Copyright (c) 2016 Sergej Proskurin */ =20 +#include + #include =20 /* Check to see if vcpu should be switched to a different p2m. */ @@ -14,6 +16,17 @@ void altp2m_check(struct vcpu *v, uint16_t idx) BUG(); } =20 +/* Alternate p2m VCPU */ +uint16_t altp2m_vcpu_idx(const struct vcpu *v) +{ + return v->arch.ap2m_idx; +} + +void altp2m_set_vcpu_idx(struct vcpu *v, unsigned int idx) +{ + v->arch.ap2m_idx =3D idx; +} + /* * Local variables: * mode: C diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h index f001e022a213..05beb7f698a7 100644 --- a/xen/arch/arm/include/asm/altp2m.h +++ b/xen/arch/arm/include/asm/altp2m.h @@ -9,7 +9,10 @@ #ifndef __ASM_ARM_ALTP2M_H #define __ASM_ARM_ALTP2M_H =20 -#include +#include + +struct domain; +struct vcpu; =20 #ifdef CONFIG_ALTP2M =20 @@ -24,15 +27,15 @@ static inline bool altp2m_supported(void) #define altp2m_unlock(d) spin_unlock(&(d)->arch.altp2m_lock) =20 /* Alternate p2m VCPU */ -static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v) -{ - return v->arch.ap2m_idx; -} - -static inline void altp2m_set_vcpu_idx(struct vcpu *v, unsigned int idx) -{ - v->arch.ap2m_idx =3D idx; -} +uint16_t altp2m_vcpu_idx(const struct vcpu *v); +void altp2m_set_vcpu_idx(struct vcpu *v, unsigned int idx); + +/* The current state of an altp2m view */ +enum altp2m_view_state { + ALTP2M_INVALID, + ALTP2M_VISIBLE, + ALTP2M_INVISIBLE, +}; =20 #else /* CONFIG_ALTP2M */ =20 diff --git a/xen/arch/arm/include/asm/domain.h b/xen/arch/arm/include/asm/d= omain.h index 4d497a21b648..28533b08db1f 100644 --- a/xen/arch/arm/include/asm/domain.h +++ b/xen/arch/arm/include/asm/domain.h @@ -3,6 +3,7 @@ =20 #include #include +#include #include #include #include @@ -135,6 +136,9 @@ struct arch_domain * concurrently. */ spinlock_t altp2m_lock; + + /* Validity/visibility of altp2m views */ + enum altp2m_view_state *altp2m_state; #endif } __cacheline_aligned; =20 diff --git a/xen/arch/arm/mmu/p2m.c b/xen/arch/arm/mmu/p2m.c index 04d17e787259..7c23995f8074 100644 --- a/xen/arch/arm/mmu/p2m.c +++ b/xen/arch/arm/mmu/p2m.c @@ -1494,6 +1494,8 @@ int p2m_teardown(struct domain *d) =20 d->altp2m_active =3D false; =20 + FREE_XENHEAP_PAGE(d->arch.altp2m_state); + for ( i =3D 0; i < d->nr_altp2m; i++ ) { rc =3D p2m_teardown_one(d->altp2m_p2m[i]); @@ -1617,7 +1619,7 @@ struct p2m_domain *p2m_init_one(struct domain *d) static int p2m_init_altp2m(struct domain *d) { #ifdef CONFIG_ALTP2M - int rc; + int rc, i; =20 rc =3D altp2m_init(d); if ( rc ) @@ -1626,6 +1628,16 @@ static int p2m_init_altp2m(struct domain *d) return rc; } =20 + if ( (d->arch.altp2m_state =3D alloc_xenheap_page()) =3D=3D NULL ) + { + return -ENOMEM; + } + + for ( i =3D 0; i < d->nr_altp2m; i++ ) + { + d->arch.altp2m_state[i] =3D ALTP2M_INVALID; + } + d->altp2m_active =3D false; #endif =20 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720850; cv=pass; d=zohomail.com; s=zohoarc; b=fxMqYDu5zXf6fg0F2IUEQEmsoeSng1zKGhLsBDpMDGiJyBtOj+jfC6cuXgYOHZZh74CoZA+8X7FGL4yVzTTLA6gM6Ye2zGuN9oTK7kiLqL8MRsSF7+UxxPveNdUi7bffUfOE30DnR2IHCippamFpRHgtN4sSoqRuYvHlCPpfLMM= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720850; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lWkI4CPcpixx7LyAi9ppzVzvWNQPx579rpoBHNN/nAY=; b=DkTFqZnL355evknMos4OeeEiAwVpsPXG8lirjf0VEHzPyFVZWunBb72maz5UhjUQLoWyvNM0KpX7HZ/IG7DSMfy3IQmMNBlVuOvGf4yGGldHxqAInDkHa8A8tgXvl05y85FfY7HRCfCZuN82brRlXzqXwdQl2feTrXU65oSyfCw= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720850656271.1125465477767; Mon, 20 Apr 2026 14:34:10 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287896.1568343 (Exim 4.92) (envelope-from ) id 1wEwFX-0008LY-HF; Mon, 20 Apr 2026 21:33:47 +0000 Received: by outflank-mailman (output) from mailman id 1287896.1568343; Mon, 20 Apr 2026 21:33:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFV-0008HT-Op; Mon, 20 Apr 2026 21:33:45 +0000 Received: by outflank-mailman (input) for mailman id 1287896; Mon, 20 Apr 2026 21:33:40 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFP-00078e-Lh for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:39 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFP-00CDCY-0z for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:39 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b8e-2eae-0a2a0a5409dd-0a2a45028f2e-38 for ; Mon, 20 Apr 2026 23:33:39 +0200 Received: from [52.101.56.122] (helo=BN1PR04CU002.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bb1-af86-0a2a45020019-3465387a7c3a-3 for ; Mon, 20 Apr 2026 23:33:38 +0200 Received: from CH2PR08CA0010.namprd08.prod.outlook.com (2603:10b6:610:5a::20) by SA6PR08MB10353.namprd08.prod.outlook.com (2603:10b6:806:43f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:24 +0000 Received: from CH2PEPF00000142.namprd02.prod.outlook.com (2603:10b6:610:5a:cafe::81) by CH2PR08CA0010.outlook.office365.com (2603:10b6:610:5a::20) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9723.25 via Frontend Transport; Mon, 20 Apr 2026 21:33:24 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CH2PEPF00000142.mail.protection.outlook.com (10.167.244.75) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:23 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHl1x9dz1wdY; Mon, 20 Apr 2026 14:33:23 -0700 (PDT) Received: from BYAPR08CU003.outbound.protection.outlook.com (mail-byapr08cu00307.outbound.protection.outlook.com [40.93.1.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:22 -0700 (PDT) Received: from BY1P220CA0022.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::14) by SA1PR08MB7598.namprd08.prod.outlook.com (2603:10b6:806:1f1::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:19 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::df) by BY1P220CA0022.outlook.office365.com (2603:10b6:a03:5c3::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:19 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:18 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:15 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=e5pl8CFxhyEnttaqqbdBaksO+59n84eXJFOcJ2K14XUKXQ80tZqbeD2/aNvIg9jUxYm0hFA6dzQyL8rZGBBCa5t3JM0AxIrJF8iZlHrJT/qFjGWz0Ka4J6iH8EgJO7Qb8Bj+9WSEkMWoOU62tcoELqklmSBvexuai+Ri8K1GpfCeFQFOeR/MwlNG+OHVyQYrD+vcYXof9oXeneEKmicF683HE+RKn6jnHJHPh2fPStpLKaw3ISESxk8NcuFfWbjm6T4rHAEtHhlXhSUwkBqizmasmiSp49+cuDClqF9PJGpkO/AiOEgitUxW+559qehYMWPlDYJllGGmTB8BQzMNvg== ARC-Message-Signature: i=2; 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=lWkI4CPcpixx7LyAi9ppzVzvWNQPx579rpoBHNN/nAY=; b=QyF4Il5xqfphJB2IvIjyB8VdlUmdVN0ATrKdVRWhqGOGUm7gnNxo6yqhjHa+5Bb4AauBHVRr7Xb6XP5sb18jMwlkpGfXGmhb5OsskU5xwC459q4H3egVVp6OF9+KtidPNSEUW2d0REmrvxD05wTow3I+pLWqIMFiSZxu5Lf9Ux0O0mQgmUrAeYAsE1gAvoffijqFh42+XcZ+ACnLBJvY3p0NPI47wZDj0ngrURT3I9v8YvKsIh7+cSIVEQC0GL/kV7HaB3UiLOWJOOa1f1Fy+sGUTVEI7OHCSIjcsE5Onr3gsFBxdaGhk0Hx20/w1HPzI05cna9FvE1nfbouI2sCmw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.111) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lWkI4CPcpixx7LyAi9ppzVzvWNQPx579rpoBHNN/nAY=; b=iOFFLmcN5ZETdLWHBYvcikPpE+vZegdOjSgCRBHrzKeP9Xo1rG/tHov8tKlk3t4a4goZdhGoCGIeTWQjOysQ3BTdUzympIbuHlEmcjtUX33DxLZnsboskUOwXHkepDKqQyO/ekNksYW65CNBhqCzPv0pD9LZW3+a8MgtRp930vc= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.111) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.111 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.111; helo=BYAPR08CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UFw9ApWJQVmmEn5nGlEwiWoapzkXpDukMqJIZG86B02c4p2NK4ofTdHr0fZl9vvYmBQDwq8klvzmfjhTOFvXAimld2zmFkgRPz7kt29VWCPonkNXXdqosBotzTpWJ7100wymB55c4zWK4TweUKakZkgbYu9DlW791WcH/qelbXxU7tgiB0Z/X2bSVoCLOw/uSY8maybw5KYBOLLAYUzdQRZofMZOO1E9UOtUppznW73BzaB7QrXTnVzGtseSbqSQsbrOt2Jiu/EHBV2q56BqY0D10HtY7M6TduxeTeUtmsKRNfM8wHjdX37NW4WalwNFCi/r0TiYCTe+SMjdj6YnVw== 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=lWkI4CPcpixx7LyAi9ppzVzvWNQPx579rpoBHNN/nAY=; b=qUmVN5yJQWYUjfW3CWRBqjYbAqaAvHtgzN/0blOpixZD76ttmNX0XvJLOZUJVz4J5oTZg4gXuH2bgm5Jz/3Yeu2WCPORekoni3KKsWlvvA4Yn3izK3zZ0RMMVjptS8kazale1Nz1cWh/PyS9vM7Zp7rTuBoQs+iVHNQo8S76nBZP61jxPzPE3+pMfbG7+fkWkcPAvFotaV71qKhk31yS68qosl8Xb1uEHMs/XkgKYGVASgebisyQxCX/SXyaAmFJEan1iDKHPAAE+iV8R2rrcEH6k7+CR/gSGLZfWoO+fqK6ohRQjWWAsWSt/WjbBoR6A/PAi4F+5h3OX77lZxd0Eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lWkI4CPcpixx7LyAi9ppzVzvWNQPx579rpoBHNN/nAY=; b=iOFFLmcN5ZETdLWHBYvcikPpE+vZegdOjSgCRBHrzKeP9Xo1rG/tHov8tKlk3t4a4goZdhGoCGIeTWQjOysQ3BTdUzympIbuHlEmcjtUX33DxLZnsboskUOwXHkepDKqQyO/ekNksYW65CNBhqCzPv0pD9LZW3+a8MgtRp930vc= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Jan Beulich , "Andrew Cooper" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Aqib Javaid Subject: [RFC PATCH v6 31/43] altp2m: Add altp2m_view_is_{valid,visible} Date: Mon, 20 Apr 2026 17:31:54 -0400 Message-ID: <20260420213206.208750-32-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|SA1PR08MB7598:EE_|CH2PEPF00000142:EE_|SA6PR08MB10353:EE_ X-MS-Office365-Filtering-Correlation-Id: d20c053e-eac1-4249-ad6b-08de9f2473bb X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|7416014|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?zaCyPvIEwdFBdQcTz98hcKaIT4COeiZIsW5zd15KaY/ZE/pNTq8WhfaTFmj+?= =?us-ascii?Q?QtQbRGIODVx25JMHiZX+jfGZv4g7OLNPoblnGRaX3WmVPRlcxSI+pTV7dda2?= =?us-ascii?Q?qfwyJHcz5mBoOyPnzJIcV0yrvYbNyhAS7Kc7yB78oRXhQJs4vx1nhATrDLpl?= =?us-ascii?Q?zdpI7Ic8yVMiVvFgm0wi9IpTLcSALibeVPsdHoPhjZ7aClYI1Vzp116EKMbG?= =?us-ascii?Q?IrtStWCy2FJNWYc1eolAQFHVCr5abGwaN/3/II7IwYNqw8mn/vQbsMpMlaVs?= =?us-ascii?Q?j4M4OqS7xr5i7AgA8GzWCPMIjTcvjnDJ9BCPoXrHP4i0f8WHykgCXci2USMY?= =?us-ascii?Q?DjB8SJ9ojr28Ld9GVeZjXEfxXmUcp1sPF9N5RxylrbP3y5TCX0mYkteYTgZe?= =?us-ascii?Q?115iuvRzmxLSySlRXaLDHzV2jrt0cRfxQjNxPKRJr5FM69Tv07dMuALZVrv5?= =?us-ascii?Q?xv4LtBGBOsz0Vu+ihDL9k6aDj6JTEwrmr5W92hXqqqB7Wu5aJbUEE69F/tkq?= =?us-ascii?Q?TEp6Oe6ZZ7cN3vqjy48mxQETPyoa1/A+Rijj2JQlML3hYMchbFcd8JiEL+ki?= =?us-ascii?Q?TKCHRhC3rp44XqRjuXGaERO9MxX7NwzgK0b886KOrotTlKMuqHRAtEYZCkhT?= =?us-ascii?Q?kXpsYYSBdU8K18B7JcyAJSRADQLDwV6meVwweaWdYOiMKz/qnRqd8SgsZfdf?= =?us-ascii?Q?UWPO1kcbgotTXAtGoM28iQFfeoHhDEYKKXyrJFN2FBoLg2ykMqESqLVlQPyu?= =?us-ascii?Q?SYpbkV/31UYUgQwBvcHqAXXypHJL3oMqQwdo7XSUjPd7yYHfWi8UCoRX2wtV?= =?us-ascii?Q?mhn1t97xGIjuQAKtQw+D8TsUoJN4kzW+JZ1OLcTP3lgwXi79haRV2AHD/20q?= =?us-ascii?Q?Q7YntSSzY6cQPDKzZj1H/eX9AhQ6rZsnUjIS4wHa+PB5Ch/f3qq1SQwk7w0N?= =?us-ascii?Q?qx7xOIeKRniFN6Fw4fymO0c6kv6zl+5bHe1IDh9Kb3KRoh1GWqurMY26uJ0l?= =?us-ascii?Q?ok7QGSQT64CcKz9BRVhzJX3QDUwQMdYgBLBVl8SJmYRbUrCrjHOsCW+FFQ75?= =?us-ascii?Q?YsbOmHLRct/8givPyFjsqSoBwV7RnilXjlozpa3jVlFo6dnI++nuYpjmK7VH?= =?us-ascii?Q?nCsxJj8tVpEXUJNs+HpYVyn2/cAJSkzF4G2MmXOYzMI3qHyJbVGTSPi3vpV5?= =?us-ascii?Q?/8VQA3v5sNHcFKsA3AZVVvZyrBEzPsIPgMTP72I1c2Gi0WRkeT5Lf9TIgDjT?= =?us-ascii?Q?3LivYm/uQfan6M3mSrIbh79Zgrj67aqKL7w6c9HLtw=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(7416014)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: bnwiBB+t/cwxNzPfHmjwZkARJP1jQRpbD69Ik4+flBM6hZCHYA3kDkyT6nchj72makfNVxHsZxRnRL/HOMgXT/EC2aaRDzRwX1eL2SpW3BdEdZXHqP74G9eeUZZ/FYhN1zjqzsgoFMpLm5y/JDmjSf5Rl1FN9U9FA8qXOt/SWslxrXk5OUTgztj2ZORXoYLurlkngxPsq2Y+drbqxVr5gnjkRXMICRWKV9hXIpkxSI1ZJ1U3ik7+SHrmHG7pu4qdzH0i5aSblpehj68bnfeVTKZ5UG4ok6IgAm+++LQ5LkESWV4IqJvJ91hR86osZvdjkGXN93PTl6pvoab1XLmPLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR08MB7598 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.111];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.111];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CH2PEPF00000142.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 88449686-68c7-4618-5e8a-08de9f2470c2 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|14060799003|35042699022|156008|36860700016|7416014|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?NgRjUcgojgo4WxXh9i3RXfz+AYTQbmhx6sfQoP4Vl29GiXM3/ffCqJAJyexj?= =?us-ascii?Q?4CowkPPEmbWAtQ8NU8hU4daO4xpoMrh16wBugM3LdGFF00t4LBGIwdLf/M6g?= =?us-ascii?Q?etF8llXhhkI5W/xJo2f0RrUB70SyCQMcra2OH2I0377NTnF3zc/srMF+50/h?= =?us-ascii?Q?cLbpy73VccP4wrLjTTTQCW17CAVSTPXhgmG8uZ61aYtEpTeCLHBv6gLn8o2B?= =?us-ascii?Q?97CxOv2mvrM9BV30F0C1/FsmRV+BmXpE6GBJcMtkt6gJd2DMYbQOFTQpXf1u?= =?us-ascii?Q?4TtWHPfCqOvNz1/fLFjEd1axuYmjUEdOjvYfvN+7a2Koi2iZS8+d3RNOnfxe?= =?us-ascii?Q?55ADW5HsWKQK1y9lVcA26sskeYL1ANDT9vSNtSW4g466JTEOuhDLLtLeSzG9?= =?us-ascii?Q?ceURlCKhcEs5h1okSHVQTDsr1rKuS9DyOjH714u3fHoYJaNIyZU+LtoHXF5I?= =?us-ascii?Q?QAwisKyKSHlHnuBSskbpymfrFxyldP0MtW0Oe0J7sezX15j1+1+hSSJss4FK?= =?us-ascii?Q?BTkpocDCO6avJILQF6ZceWFZHGgIxEchbJa9YCAMqtQtjBSq6Lpo/nBz6FEC?= =?us-ascii?Q?3Krqg9uSZ5eOoZWl6DFj5m8I2CApS66E/Q4YEvl5nL+7eH6ofpXm5h4sb0W2?= =?us-ascii?Q?HHjFTQdHSlqankbmy+AG4yS7Dqm06+McZpuqOGr3hGtMan7kPzxQZV5eUYYK?= =?us-ascii?Q?ZqFdP1bROzcuOmbxySdEhZDkatiBOl+NwGuv5BPH+L7U61UOVYWAf6nMbKtT?= =?us-ascii?Q?xiwBvNYkaNDKtx+GQAE6thDKE5AwgAFOrvphAvLu/S5oJdiiCsXODU8VA6pa?= =?us-ascii?Q?xXlihTPNID66knPbOazKzl9FqYzohTNAmZDejEBj1tZhf7rgK9gpHvcRG3og?= =?us-ascii?Q?UbJJHf18tdXgCYEaYVrExEm/vmi3VvRmJ53GaRfoq9hMMjA+M95uHCpnvEYv?= =?us-ascii?Q?NK1fBzOtBL31NjUz+GXWo3VsZW6fBNu1viyQ+kkLAFOj+VO3QeIsPaG5ss23?= =?us-ascii?Q?KvAGsHSR0GDRmYG2X3i6cBO/yeHSYkuD1gXD+oX1+hzgM2vhInyxNIVTJZul?= =?us-ascii?Q?HJyfIGF7upxrUiMh5EnyZ5/2adCVh7e60D8DjpMpa4REsOrJ5dTHGpasjGGR?= =?us-ascii?Q?ICT/9GYu5YlLMdgbdpKhl8BvyBi63R6GhoxqakNQqfirKRMPZyqAAZHLcl8J?= =?us-ascii?Q?xhV2NwEQUkr4ny0+NE01FLDiW+bnDiz1yY+15xB66LruG3wO5bwRL05/GSup?= =?us-ascii?Q?WZTm7z+ImTMl2mI3OBKCh9JHUQsReBVIZWQqLI0kkA=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR08CU003.outbound.protection.outlook.com;PTR:mail-byapr08cu00307.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(7416014)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OvvuozzQHNqqjIJeWcdp0QnIe9/kqM1WJCwMRXQseyFUahlOGYV7uyTrRpDuoPb8pxUU8vDniAi6wJtA2rqY0qYuM9cKMwZHBT7y83PShyxYc/QylGSn7coOaKzzLAKU5IpkaOqvrPaLNXX48GB8DP+WXFN8Uq9arrLAnVN8BwelimuTD3rkQozv2Y/MhYdpbrHDRV3w7zcIklYC+EnMC9KNHRteIk0y4U/vgu98LBMQ7OmSQrWnOW7JWju1VdMWVbfJESZbOiVyWx2/puuv9dJXO6/qzE03OhQsH+IV+c8tAi4r0x/JBkD8VGlvkTBax53FrKj7CyFqv5HCuLu2insFkOjnZz0Bknx/hf0+YH1aPX2gJbSw14Oir1InySugR25NANwTn4Dm2CaIsL8RqahSZJuwN3f0EtTF3j8iVivtkzraD4wHQ3DZyr3mBUJm X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:23.9523 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d20c053e-eac1-4249-ad6b-08de9f2473bb X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CH2PEPF00000142.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA6PR08MB10353 X-purgate-ID: tlsNG-720697/1776720818-8057B161-3C65FB2F/0/0 X-purgate-type: clean X-purgate-size: 3486 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720851437154100 Content-Type: text/plain; charset="utf-8" This commit adds arch independent helper functions to determine whether a view is valid or visible. This makes it possible to determine whether a view is valid and/or visible in common altp2m routines (namely, altp2m_init_by_id). This is commit 2/5 of the altp2m view validity/visibility phase. Signed-off-by: Rose Spangler Signed-off-by: Aqib Javaid --- v6: Introduced this patch. These functions could be used to replace the equivalent calls in x86 code if that would be preferred. For now, they are only used in common code. The altp2m_view_is_valid function also has overlap with the altp2m_is_ept_valid function, but that function has an additional ASSERT and check that idx < d->nr_altp2m, so I wasn't sure if that function should be repurposed for this. If renaming that function instead of introducing a new function on x86 would be preferred, then I can do that. Additionally, these functions don't have bounds checks since the functions are intended to replace code which don't have bounds checks currently. Bounds checks could be added here if that would be preferred. --- xen/arch/arm/altp2m.c | 10 ++++++++++ xen/arch/arm/include/asm/altp2m.h | 3 +++ xen/arch/x86/include/asm/altp2m.h | 10 ++++++++++ 3 files changed, 23 insertions(+) diff --git a/xen/arch/arm/altp2m.c b/xen/arch/arm/altp2m.c index e741648ff5a1..0e19e197e826 100644 --- a/xen/arch/arm/altp2m.c +++ b/xen/arch/arm/altp2m.c @@ -27,6 +27,16 @@ void altp2m_set_vcpu_idx(struct vcpu *v, unsigned int id= x) v->arch.ap2m_idx =3D idx; } =20 +bool altp2m_view_is_valid(struct domain *d, unsigned int idx) +{ + return d->arch.altp2m_state[array_index_nospec(idx, d->nr_altp2m)] != =3D ALTP2M_INVALID; +} + +bool altp2m_view_is_visible(struct domain *d, unsigned int idx) +{ + return d->arch.altp2m_state[array_index_nospec(idx, d->nr_altp2m)] =3D= =3D ALTP2M_VISIBLE; +} + /* * Local variables: * mode: C diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h index 05beb7f698a7..fbe66ad5536d 100644 --- a/xen/arch/arm/include/asm/altp2m.h +++ b/xen/arch/arm/include/asm/altp2m.h @@ -30,6 +30,9 @@ static inline bool altp2m_supported(void) uint16_t altp2m_vcpu_idx(const struct vcpu *v); void altp2m_set_vcpu_idx(struct vcpu *v, unsigned int idx); =20 +bool altp2m_view_is_valid(struct domain *d, unsigned int idx); +bool altp2m_view_is_visible(struct domain *d, unsigned int idx); + /* The current state of an altp2m view */ enum altp2m_view_state { ALTP2M_INVALID, diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index 43dd5d2acd9c..56ae19b24b42 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -65,6 +65,16 @@ static inline void altp2m_set_vcpu_idx(struct vcpu *v, u= nsigned int idx) vcpu_altp2m(v).p2midx =3D idx; } =20 +static inline bool altp2m_view_is_valid(struct domain *d, unsigned int idx) +{ + return d->arch.altp2m_eptp[array_index_nospec(idx, MAX_EPTP)] !=3D mfn= _x(INVALID_MFN); +} + +static inline bool altp2m_view_is_visible(struct domain *d, unsigned int i= dx) +{ + return d->arch.altp2m_visible_eptp[array_index_nospec(idx, MAX_EPTP)] = !=3D mfn_x(INVALID_MFN); +} + /* * Alternate p2m: shadow p2m tables used for alternate memory views */ --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720847; cv=pass; d=zohomail.com; s=zohoarc; b=i3iqLW+XANCBBoZvhpfA0ym4k4E9NpkMQNQsOTv46fe3pcqXI4YBGXXPVHFyyzOtjCIDtF/IcGOLzV3bYJnT6egn5RfYN5bx7z91031GFY6RQJg4x/2GRMu1/nq8sQNVktDTrZyaEEzNOr1+EYEmZnfTIdTmHyb/Cv4kNpfSy78= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720847; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=GH0LWVdYxmiLC0JmFSzNr/w/rCUpu/RM3KGvWGbPMkA=; b=bDjXRRadQSRq2+gLSwvLSIkckFOODHWsgWnXt0dm7MfXdk+goyNDFSyRuChxQ32r8W5us8O0E8q7JAR2MZMsX3A24/fBbpC+lkcp4g9X4b7zK5/u4AQbM8ynLzT6vwxpSjWRi2tMvMlsfI8jxbrc5tdp3WOzJNObJjFUMBc4ICE= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 177672084775292.41851028749898; Mon, 20 Apr 2026 14:34:07 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287876.1568320 (Exim 4.92) (envelope-from ) id 1wEwFQ-00073y-5s; Mon, 20 Apr 2026 21:33:40 +0000 Received: by outflank-mailman (output) from mailman id 1287876.1568320; Mon, 20 Apr 2026 21:33:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFO-00070H-TT; Mon, 20 Apr 2026 21:33:38 +0000 Received: by outflank-mailman (input) for mailman id 1287876; Mon, 20 Apr 2026 21:33:34 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFJ-000603-P5 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:33 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFJ-00CD6F-3z for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:33 +0200 Received: from [10.42.69.7] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69ba5-2eae-0a2a0a5409dd-0a2a4507a6d6-16 for ; Mon, 20 Apr 2026 23:33:33 +0200 Received: from [52.101.46.141] (helo=CO1PR03CU002.outbound.protection.outlook.com) by tlsNG-ef75cf.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bab-229c-0a2a45070019-34652e8d5ae9-3 for ; Mon, 20 Apr 2026 23:33:32 +0200 Received: from BN9PR03CA0874.namprd03.prod.outlook.com (2603:10b6:408:13c::9) by DS0PR08MB9617.namprd08.prod.outlook.com (2603:10b6:8:1bc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:27 +0000 Received: from BN1PEPF00004687.namprd05.prod.outlook.com (2603:10b6:408:13c:cafe::15) by BN9PR03CA0874.outlook.office365.com (2603:10b6:408:13c::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:27 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BN1PEPF00004687.mail.protection.outlook.com (10.167.243.132) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:27 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHp2JRQz1wdW; Mon, 20 Apr 2026 14:33:26 -0700 (PDT) Received: from DM2PR04CU003.outbound.protection.outlook.com (mail-dm2pr04cu00303.outbound.protection.outlook.com [40.93.13.59]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:26 -0700 (PDT) Received: from BY1P220CA0017.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::6) by SA2PR08MB6683.namprd08.prod.outlook.com (2603:10b6:806:111::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:20 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::89) by BY1P220CA0017.outlook.office365.com (2603:10b6:a03:5c3::6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:20 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:19 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:17 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Jx3zq7ojskYhgTb5A00IkEvLoHnrzmF90+52nEYKiqw9H05ZSWfxnDfB8bcjFFgZAzqAbo7fquz8P0nPcMiQdMczIWt/eRFkSxUT9BsZ00e4JM1DSBFW0Um9MHZl9yGPJ8L4NFfi/DvG1eysz25b/JaobT2bRwMf4ZDd5WJpWLX4n9E1O+hXir2rvkj9Skkp5f8bNv0z7kIbZbAVBgeD+tS8fl7P2PefdaAcvz6ZaWAAMmOfbgd8VeB15mm8D5cDBP8a2R15yBjfkApN5SzOTPJoKWmOCAKISBSbrWvuLjd+fPNm/psW+tpRL3OhYbj/YVOJAJBwn2tb+3TkcPhrRg== ARC-Message-Signature: i=2; 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=GH0LWVdYxmiLC0JmFSzNr/w/rCUpu/RM3KGvWGbPMkA=; b=LXqs5u1o6ixgRbILiSEPSX+evGnriQoe10H7gHcqSxzkUlcEcHsPNhR4YOaUK3rgjJaskFDhPEIXI1C4+dVt4u5Wtp+YynAMc4dB4ac6iaF9FCACIKERjzIifqp+at0yUJLoaq0tWSni3xIN/p4a5m1gR1aInaR9+eu+eBoB3J7uVFDOODONHpGXpUjLtfT+XMOSdf/CazWp3+clJzxGQu6bzP7RFRFN46EJjH4z3CSXGAKgBdy5hfoukra2KQ1PpBvkKRjN6lssISuwohPHRVadHxn6foYI7TsGH6JqGJialXfvBuoRDPk84JHrxDLc3f2GBKKxIRB+RZuJWKHHMg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.13.59) smtp.rcpttodomain=citrix.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GH0LWVdYxmiLC0JmFSzNr/w/rCUpu/RM3KGvWGbPMkA=; b=SYPJDxN8cYcUoWs+g9talSj3U2eG9F7YWhjZ5ZD9T62mENLXp9VzEP7Ttgrv7nbYJvEanrH5e5V5iasJEO7XtovwIQNaPYCuH773BbAR4SK2QngS0P7q/mDngr1twsQzxr7RwADHgeszupBQuR39JEtZjLjb4LZhW4lrohQnX4U= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.13.59) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.13.59 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.13.59; helo=DM2PR04CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EytrO6GapLKFFO+LCZ3jyrZryPT0zvyBtpOypW5isZlRpnAT5qUJujBWjblIko7LvW8vuNQ7HEnTAPCYEE2CAJAUHfcm7iXgtae2oQMACi634Kh/X+xOGWR4BrCjdYM9QcjFggVdnvdgeMS/shv45OysVfw0NpzdXO+2hTmVsIXqClDuyCFZ5Pga4NfWmYeioX1cq8OJcMYDeRzgK+0udzy+x/uf4FwA5NtYaCCtrzQ6tKlyYXGU7BCdugdOpYw68jtaNtwRLfa3vi/KISx9Aeb9dSRIDfO5vWjRBZt9h2MGTfgyP6wSRUB14oFLfzyCxDBBfly9nXzsS9lXsonN0w== 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=GH0LWVdYxmiLC0JmFSzNr/w/rCUpu/RM3KGvWGbPMkA=; b=n+8+9He+uRsj/WpP/h0qTxLVFvCuvdPw++g5qRPbgoG4BEW8OH+Qo+U2m78Dbgh7giqtJx+29/Rtv5mRQgu20cY0mtpU3Pw7kj1MT5LI0PxCLQhGsvMfQEPk0sE+cW6LjmP/zGggyxMZ0Do8hH8eFh3juzmT2pFDrUGxcWUTqWq2vX6JvkwQkiEriNA8yFMr/jiiRuISm9391GqeSCsrpMZAsMiYbg25j8rGtQN2Qpvfq0lXdm04po2EBd4X/t2jywJbUa3oeMhi5/xuQrA2EKDpXhLigwoVR2SJWce4SCekv8uBqYTaJuxumourqVss1lRaUIvbGUTloLElDNjXZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GH0LWVdYxmiLC0JmFSzNr/w/rCUpu/RM3KGvWGbPMkA=; b=SYPJDxN8cYcUoWs+g9talSj3U2eG9F7YWhjZ5ZD9T62mENLXp9VzEP7Ttgrv7nbYJvEanrH5e5V5iasJEO7XtovwIQNaPYCuH773BbAR4SK2QngS0P7q/mDngr1twsQzxr7RwADHgeszupBQuR39JEtZjLjb4LZhW4lrohQnX4U= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie Subject: [RFC PATCH v6 32/43] x86/altp2m: Add altp2m_set_view_visibility_locked Date: Mon, 20 Apr 2026 17:31:55 -0400 Message-ID: <20260420213206.208750-33-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|SA2PR08MB6683:EE_|BN1PEPF00004687:EE_|DS0PR08MB9617:EE_ X-MS-Office365-Filtering-Correlation-Id: cc4cf3b0-e184-4da0-e70b-08de9f2475b9 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|36860700016|82310400026|1800799024|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?EUtwp3fOnlDOIYQV16wpw+4v4tTwwMvsYg9tViMLK5Ju8v82lXlIwASZbAX3?= =?us-ascii?Q?lg9zNCPN2JV3ZhLs42Ol9ei4y2uKWXiDoU+9fz+OaL2WttdTXsNkjb6gCZqo?= =?us-ascii?Q?bL+ZYq4PLpGUqfDU3NF/jzUcSlQ15gzDK15jhBNAkYmhHQXmF1IDJCWYzEGo?= =?us-ascii?Q?c3NE9vaWc1GfzExxGOugJdsH+zZs1PqfF6olStr/6u/QkdtRTtYHI3Voj3sY?= =?us-ascii?Q?SNjwDdkhDl9tdz6LuFvb7tPzEy6UsHvpU6Vt+g2XuJxQOemORnf49YgOzQPB?= =?us-ascii?Q?+33ZlcqJHDOQ+ow7khx3QsIYZ2qoQrFz/lJ0Nnqo7USIZaG/uedgCaENLwP3?= =?us-ascii?Q?gh3HafaPtvr0oHAO4HEhKKV3kFy1iPgydc6wj1cgKpO34jFE4NnOps5lKkfc?= =?us-ascii?Q?rrvyuGkSmOo/kc6Tfv45RXjogUkYBDMpnvZPGSf7QwlX6LxdV4cOEuQB1WAi?= =?us-ascii?Q?5XfDqrXCqBVuNUQ0Yscl7g/wf7s9K0D8BRyCsHBYzPLMDnbacWT0nF/bxJQ1?= =?us-ascii?Q?e2yxbyFvzl1Ssos7sOGPyMp2SAL2fIUpUorAUUBemAjEwoJ0JEtLbgoB4c32?= =?us-ascii?Q?9U6lQ0uacg+L/sXWa2xIqtExqIyVXGnaKt8Zu7v4oXDcQ3tQTNT4cVonPcr0?= =?us-ascii?Q?IV2s6h2em3S+DEmR8YZyHtLsHh7gQ1Vb7Gt0DBYFu8+3BDV8jx5vmgs+ZXkt?= =?us-ascii?Q?DFKRizy24LbShdlBzdOKQjmTe4ibk1uTbapsL23z89JVHxxEicZ4+o28Sc8n?= =?us-ascii?Q?VMYHmG6s8Dsh2Cq2A1RSXbbqOxI4LDjfHRPxXMrcYaIf8CBYCCbOgEp/DUNX?= =?us-ascii?Q?V9USt5v07DqpmxDwcnLQH+RQqOWskbfOHJ8IVfJ1OkoYkotdO/HBfV8Z870P?= =?us-ascii?Q?4tD6CjDbjviXnwjsIyCuRc6DTxBAMT/IiXMlBY7xppWrgVp+t/40j2+TE7s6?= =?us-ascii?Q?oiQ58QVfCsJKHJs0gJMkm1p9Gon0va2sBnGq5sJOKUA2C8VNShejVk2oyY0n?= =?us-ascii?Q?i93vwkUyDiSVnk5KYMM23HsKIE1uDeZDMj2zuk3n/Ef6YpTAPAokfbULsmh/?= =?us-ascii?Q?Wp2+hs9i38Aibsqc1N+M8abXgE1Zcwb8m8ztd6/dmBkgQYYUN4GdE20FjlPd?= =?us-ascii?Q?LUCWFJdPaxX1s0+zrcm6iRH7NDGyTNDMPw=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(376014)(36860700016)(82310400026)(1800799024)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: irB/aZemqRxvuDaAyO8jlv5sj/HFejFhPTeXG53XxXz/bnr258pnlxZTo7RcfWKRW0tJV571jUGWTUs5aBhAU8fTQVI+smeCMIEZ0F3VSXPKTHsazoTw+RjjFK5gHosNl52kjtrPeon1KTal2AS2orhz0WKIK8xigAqpTgOGq3SUGUzxCxP8ApNIBCA/AG3cVwvC9aXllY1iMaYsIWTez8caWFSThMFEusJTbwYCgTk02EnHPKBiqmeokvKbmej+FWezS5GCSeFDvEjAqUYZK4KVd5Sc3ksFURqSPvh16WZwKoAfcS6x+s3AbfYgB8eja6HqmzCKXBR7j1Q0sUEJ8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR08MB6683 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.13.59];domain=DM2PR04CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.13.59];domain=DM2PR04CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1PEPF00004687.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6d674445-3c29-44ec-3925-08de9f247151 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|376014|14060799003|35042699022|82310400026|156008|22082099003|18002099003|56012099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?1hUhlK069mri6VGhl5V42W7Wgx6CGK+4IuHBN3H4y5pgqbfsN8+CKQY+5soP?= =?us-ascii?Q?BzJLjRbG3xTQ1BCghSiBAm0Oy/VpyMcZ+MvU1WIf4zUKMdKBFHdTQf7paJpL?= =?us-ascii?Q?xcof6FJy1Xry3sAOHXnRXsYjz/rOz3kuCCD5Q3o0staVFWyCbqrPMepf7RmH?= =?us-ascii?Q?wKDriiNT3l0fioWaDsJVXXui4/7Yi5R+zOszldjYGkans0LjI8LgEgjH70RO?= =?us-ascii?Q?pFP1oOBe6LqYHI/Ct5+io5H30kkEDY8BChtHPc6Mn6zPDj2FL5vJ0OIKpWh+?= =?us-ascii?Q?J/3tlmE/p95XMwurIEBKWkaZWDhV1VJH9lxzjUu3bDTZZqjY6pqeO5B658h/?= =?us-ascii?Q?/0TB4eKW3lb+YSQ6RdzSMyDdaCy/WUwU5ZCmUniZgGh9WZLcHrIzeBfxbZgD?= =?us-ascii?Q?AfRkbMjm94IsLwkg2AYQ3crd9grsW/yZLLcouPAPXEnoZxgsHsSMIJ3pO+7u?= =?us-ascii?Q?ZSrt47JX+DiMR3zTeJV6Jl7tNZI0uk2UcPcug24isadV1b3gW97qd936BvcR?= =?us-ascii?Q?ETOc/4P1H33me1x+b0Bqtd2qpF1cDDB83wo553BpG1pG2qxBbfpmMVSGdv44?= =?us-ascii?Q?tHZYlTLqh8kEipC+kBZjHzEHmWihi0K2LX913+A1kTn+F7rtbli8D8/iAyLr?= =?us-ascii?Q?ZGDV/+UTi0vhS4sro5WZaC+c4FefvuC/oluE2Ij7xXD8u0ZpfNtItWl4rAQg?= =?us-ascii?Q?g8fg0PdbBq5q+bssoervtA1r9T+QVqA04+WmbrENq0HP46KBSc6ATM2FYPvU?= =?us-ascii?Q?DFUXVySe6Jpaa5RMiv+83bXEwBzUhUgOE9KjWuhkFHFISQqM52o5RbuJHepA?= =?us-ascii?Q?KVkeYHhCvw2W1GCDy9qjv4fUKxfK7WRJSJ8DGeM+2QYkfbDQjUCULlC7RnBZ?= =?us-ascii?Q?YrorBMHGZuU9iK4is3QdoN5ob0UXIUK8zWsPI9/Qz4nUjFug97k66o+gjA4M?= =?us-ascii?Q?/bdk5tKkZ2UNvsyKRf0oOMW+6UQRUuoqG+dNGcR/0HXcOjE7vimqbG4WtQR2?= =?us-ascii?Q?W11X7eLGaZzpaCd18VGNXbhY0itzDOxidjpqhlOmtsGV2SmJgw3vx2qPdP4s?= =?us-ascii?Q?MHx9nf8YHkjMlJKEl28BcG4w3cVvBGXWObhJ+Gp3Z5gTQnLezZIrED9lmFsz?= =?us-ascii?Q?X0A7wjoDomRL0VCVVhIbc4C3Z7EwbCcupg=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM2PR04CU003.outbound.protection.outlook.com;PTR:mail-dm2pr04cu00303.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(376014)(14060799003)(35042699022)(82310400026)(156008)(22082099003)(18002099003)(56012099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Nhp6YUWy2TKi+AEGF4P4Ifj6TEP8P7UBokm6jK6L/9bSEdkYBHICgJnINSVcJnEf8macmbjVPsv8vY4wC5vDcSA0IDYFhNDSBlvuJQXSnT/hCr4Dj16qy3XS9Qfib8k7HLXM+Utb7eirT5VbYbodyDyogWAA7F83ob7FCEBReLqNIF1nRVbV0cARDSBK3yZbYO1pvfRkxVjX5N6MOmtVO7wn+diLI173+INgMI1ltB7NMq7OGAtK+Vvt9+RAMzNiScgK+IN8ui8LUWQOWVZCUMurVjUF5bYoh0pYTB66zrEo1+GHd7uJ+884qAMdm6VB9OaiqDplcgbsjWCXjpY9Wmg0Tdt7tY3AFqbZpkC4H1IxelKBTL7Rb8zmSbQSRHxVgN4c7N+UpbqcPei4t1oV9G6d8V+sbqH3C6ZMNpjjgMZ20JM1IcTGCWKSCXonY2/L X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:27.1875 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc4cf3b0-e184-4da0-e70b-08de9f2475b9 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN1PEPF00004687.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR08MB9617 X-purgate-ID: tlsNG-ef75cf/1776720813-16A61C48-57281748/0/0 X-purgate-type: clean X-purgate-size: 2493 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720849266154100 Content-Type: text/plain; charset="utf-8" This commit splits the altp2m_set_view_visibility into two functions, where the altp2m_set_view_visibility_locked variant has the preconditions that the altp2m lock is held. This makes it possible to change a view's visibility in an architecture independent way in code that already holds the altp2m lock (namely, altp2m_flush). This is commit 3/5 of the altp2m view validity/visibility phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/include/asm/altp2m.h | 4 ++++ xen/arch/x86/mm/altp2m.c | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index 56ae19b24b42..99c4cfa5a68b 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -106,6 +106,10 @@ int altp2m_change_gfn(struct domain *d, unsigned int i= dx, gfn_t old_gfn, int altp2m_set_view_visibility(struct domain *d, unsigned int altp2m_idx, uint8_t visible); =20 +/* Set a specific p2m view visibility (with lock already held) */ +int altp2m_set_view_visibility_locked(struct domain *d, unsigned int altp2= m_idx, + uint8_t visible); + /* * Looks up altp2m entry. If the entry is not found it looks up the entry = in * hostp2m. diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index 0542e3ef9196..8672b8c061d3 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -685,9 +685,19 @@ int p2m_get_suppress_ve(struct domain *d, gfn_t gfn, b= ool *suppress_ve, int altp2m_set_view_visibility(struct domain *d, unsigned int altp2m_idx, uint8_t visible) { - int rc =3D 0; + int rc; =20 altp2m_lock(d); + rc =3D altp2m_set_view_visibility_locked(d, altp2m_idx, visible); + altp2m_unlock(d); + + return rc; +} + +int altp2m_set_view_visibility_locked(struct domain *d, unsigned int altp2= m_idx, + uint8_t visible) +{ + int rc =3D 0; =20 if ( !altp2m_is_eptp_valid(d, altp2m_idx) ) rc =3D -EINVAL; @@ -698,8 +708,6 @@ int altp2m_set_view_visibility(struct domain *d, unsign= ed int altp2m_idx, d->arch.altp2m_visible_eptp[array_index_nospec(altp2m_idx, MAX_EPT= P)] =3D mfn_x(INVALID_MFN); =20 - altp2m_unlock(d); - return rc; } =20 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720839; cv=pass; d=zohomail.com; s=zohoarc; b=Y3mLf3qLfMmY8R+IuiWuoFxsDk4OhZ/Wz8753qaZE2L6BQxEK91qunUnh+qsBfu1c/IUgmgNugNYVYOna+60Bc+sIXZl/XUAd3V1PAl3KJxJert6dT55aUfaRxZA74tigbIlRAbx1wG6Sy74/pJoB4Ic+JSMEJejA246b9popL0= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720839; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=u057BdoXIkdDPBzf9f3VOEcMsy8wtSGiXp7V2fStTSo=; b=WMnRShjnpHUwxaEWkpn1gfaynsKM0ui+svr0mAxQEqDESDkid0zekSM6ghFW9P50bwFesKnxlz0XeL0E8NSoY8ZiN2/FzElph6GI8kN9Zp0FSJ00gqtbmFxvRp58fN2S8TIIsZdGzPeoh+/x9dv/jriovpnro5XXdMuZeM52vew= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720839352594.7060157880192; Mon, 20 Apr 2026 14:33:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287892.1568326 (Exim 4.92) (envelope-from ) id 1wEwFR-0007TJ-Uq; Mon, 20 Apr 2026 21:33:41 +0000 Received: by outflank-mailman (output) from mailman id 1287892.1568326; Mon, 20 Apr 2026 21:33:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFQ-0007NN-PB; Mon, 20 Apr 2026 21:33:40 +0000 Received: by outflank-mailman (input) for mailman id 1287892; Mon, 20 Apr 2026 21:33:38 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFN-0006jh-8m for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:37 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFM-0054Hn-LV for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:36 +0200 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b93-5cb7-0a2a0a5109dd-0a2a4504dc78-34 for ; Mon, 20 Apr 2026 23:33:36 +0200 Received: from [52.101.62.80] (helo=DM5PR21CU001.outbound.protection.outlook.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69baf-1dec-0a2a45040019-34653e5036d1-3 for ; Mon, 20 Apr 2026 23:33:36 +0200 Received: from CH2PR16CA0011.namprd16.prod.outlook.com (2603:10b6:610:50::21) by BY3PR08MB7169.namprd08.prod.outlook.com (2603:10b6:a03:36a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:31 +0000 Received: from CH2PEPF00000141.namprd02.prod.outlook.com (2603:10b6:610:50:cafe::9e) by CH2PR16CA0011.outlook.office365.com (2603:10b6:610:50::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:30 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by CH2PEPF00000141.mail.protection.outlook.com (10.167.244.74) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:30 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHs4LnLz1wdN; Mon, 20 Apr 2026 14:33:29 -0700 (PDT) Received: from DM5PR08CU004.outbound.protection.outlook.com (mail-dm5pr08cu00405.outbound.protection.outlook.com [40.93.13.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:29 -0700 (PDT) Received: from BY1P220CA0022.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::14) by CYXPR08MB9478.namprd08.prod.outlook.com (2603:10b6:930:e0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:21 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::f1) by BY1P220CA0022.outlook.office365.com (2603:10b6:a03:5c3::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:21 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:20 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:18 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=VZ/IFfy3AVMQT5J69G8IdO3rqcWYtkW5osvNRNE9n6nSSeDsJ3uXiZ6cm6YQ6uxERBxYYKUNNdVHRq21sU7e5ziVxTvGtDkCQLQ5yopliRYtw0v1U/t1bUGUFFxXS6gkETvGbYEY2+bGpSwzbF415dvHzAfwaJR5ivyTThs+1rgcqcDW1BHTE9/FnB9OVoeP699yG6gocUb9KecOlQBVDUndYN2o9Rk/ip+W04+hdfMWRnXBgo6W7Cbwma+X4i1BOW6SxmnTe1CSTLlZRqYphgF/+wwIzVCvJXN2WcYLyekON3zBQvXKWxrg+0+AESaq4rjn0Lw11sJEYWoV3mylRw== ARC-Message-Signature: i=2; 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=u057BdoXIkdDPBzf9f3VOEcMsy8wtSGiXp7V2fStTSo=; b=kn4B0U8snqaHA+dlRIERnHp2Rn4mvgd20XFU9Ge6MbtQmJueqU5wEJHYRjXSUAuMbsUWelpdepjSlMaqKSMUcvviePzDGkJW3a4V7ckCeThCm+nPYHK508kg8Bz3zNi0rscSbzRmI8key4qCCVTHKgS7TsqGCtvCL8LSPVeA+zqNhxkJo2f7zNsBZNT84L09TY6VEAB2YLAcFXtXVJcv9lzuFkVnWQG8X8fFwIZvLR1/OtWz8mdq3cqOxEe/mPsQE8PjHs0gdbB+JRnVJdgMEACB51O6Y3OYuWcLCJk08R1OVjZux3v+L5EiK3cy4yhOoARlczlb6EhISFvPht9Pwg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.13.101) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u057BdoXIkdDPBzf9f3VOEcMsy8wtSGiXp7V2fStTSo=; b=RdVdzd9ONJCqBkuM6lbUiy8AF3RSe7p5Pld2nmwqJKxT12uEf/xI5/YHZTelOTa93htIpRXRJAzts6MlpuI58T8Dth2WZR/X7KQIlBsbWOfffZOtYNa8bXuNniyBvz/Kx8On3ziOiUgb77yY9tPnAjD0yVD7NpwHutCWgeRJhSk= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.13.101) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.13.101 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.13.101; helo=DM5PR08CU004.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZdL0n1c4jXKWI/a1Li9ufiu4B+MKjzXoO2rHUbuR0itwPIN19N6wwK9CMEUnK2sff8KnEIs7FncRZnpOnJ1hKt7LtkwWnkAKR5eYvkwnFBmcvOdgtXikEFmnMWXqgsU4KDSDciM4EYS3EQzqimAVOgQSgy808z8ghcJ9p9TCicLqQatEleEch5bKULaZdfLBZKIgX7vyNhgr3L36wXJCUD99Dt+kwOYnJr9p9WbOpLLKlXXA24gSyZRMNyBxNCQ56k94R1FGNU+F/i/qAXVat26DTyrP1WTcGF/jV1ykmVm9ItT9tzlnI3oRz0LtRzGfrwBKQEL1t3FfUpfThR9LNg== 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=u057BdoXIkdDPBzf9f3VOEcMsy8wtSGiXp7V2fStTSo=; b=cewLUSbQqc232dKEHvYMmbwSSacMDEeCCSjMo7ulCkRPs828RWJg+PdhjFZpZ/KiKSDDR+bGjXPH1d2xpgllTODsVT9IHmybldPfTvgX/SQg+EYux7Z5fRgIX+2pv7f/jubXpr/Hq8sV5chS6H2eIG+ej5K+SVV2SHDMnn9Nj/FFlTw+WIy7S0yYUO1pDIcztOTvE3oECt6O4BsagTqrRF8YO6g4VBpr7ov4BAwPbH88JI0Iw/0lBUsR64rBnL84No57SLtKS15C40elmcpL3HJnLQUsSz3StVKZLMwQjVahmqJgi0lMK12w+vaNUj8/oXZO6KqRqQVqfEKy0tB6ew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u057BdoXIkdDPBzf9f3VOEcMsy8wtSGiXp7V2fStTSo=; b=RdVdzd9ONJCqBkuM6lbUiy8AF3RSe7p5Pld2nmwqJKxT12uEf/xI5/YHZTelOTa93htIpRXRJAzts6MlpuI58T8Dth2WZR/X7KQIlBsbWOfffZOtYNa8bXuNniyBvz/Kx8On3ziOiUgb77yY9tPnAjD0yVD7NpwHutCWgeRJhSk= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" Subject: [RFC PATCH v6 33/43] arm/altp2m: Add altp2m_set_view_visibility{,_locked} support Date: Mon, 20 Apr 2026 17:31:56 -0400 Message-ID: <20260420213206.208750-34-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|CYXPR08MB9478:EE_|CH2PEPF00000141:EE_|BY3PR08MB7169:EE_ X-MS-Office365-Filtering-Correlation-Id: 15c18219-52ba-4382-286c-08de9f24778d X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?uO31j7QrqPDesW1KwpMvauoMy2lKh1DCAR+b3l490bJvyWZ0Kyw99OeZL4Ao?= =?us-ascii?Q?vAHAbpSsk0rLfH74xQG4RyEHyxpbKcjdZWQ0SZ7S3yl/ao5gajeJ0XZ/cTew?= =?us-ascii?Q?vxY+dpcDKjf6WURN/nrhJZHojQdBE9Bxzs88lwWRn2ghlTDRC0ESyqCmC5sq?= =?us-ascii?Q?dCzaADUw7/8j5NnDW3rstPQ+/9zpe//w/S4cMG8ew//b0wO3x0vjCCz4uSQT?= =?us-ascii?Q?As2V2nfyG59j6OWXGji8dQR27U736oN8J5TO77JMECiEBjkEFc4/qLJP+Ke7?= =?us-ascii?Q?ADCslzgsJhn8rxwfum/Rkw4m+az6Xz30srdJqWQnKhN5aKN7hzeC1y5kBkVL?= =?us-ascii?Q?rwHoR9G3pRhJiH+6iqLwWBPmLCFvZ334I6y9hvn5WaXBcWvchlUQws8/zs+c?= =?us-ascii?Q?f7FqjPSbB3UOr8JHSUB1NXFs9+XQeioGn5Q3vHgOncxA1cbM3nl1NVd38XBH?= =?us-ascii?Q?cHArM9a5Ftp9Lok4AU/92y2BCWglgaILLfvZn3Z6oBLAIa5X5ubvm2IAnzk1?= =?us-ascii?Q?W7GC+BacdtFJ6RqGG4+JccmY9IKOZ9K20i8ykgOEjHIOFoXfzElXwlHYlhJG?= =?us-ascii?Q?/Qve0/yP1yMQgtoQ4qVV6fYtk2fOctbZDs1emtqzYUjNNiZz8+uC1ZdDAexj?= =?us-ascii?Q?oWU9HjxoPKb+4ueNiZxuOV1rzcoiSkPZyOeD9I1FMPwCcM8CkUIbQLpcDTmI?= =?us-ascii?Q?t5CN2I7GZwpmBqUCnMHSJXykRv545xHPg+VWQHKWEnlA/B9csR0JV3yN8kqn?= =?us-ascii?Q?FtvFgGcoXGJyvmLIoaFVsVYaYn41NCmiPCSV1Go2UO3VZMDdQAf9za1UEXVa?= =?us-ascii?Q?z9E+arHi7MaYhIBwClKGtoLGSDUZPrjr+FuTwxgvVfm6jrQAJny3FXoqUiGT?= =?us-ascii?Q?vsmEgzoBd3wG9HCZuszfgUHUm6YXtmGzY8cnqmTqyr1zt46JtlJUjPa1TZMI?= =?us-ascii?Q?PwQbItzsDMbmgnQxyLPnVS45V2VtA5nskwgLJCbvnIK3PRFw+a6/4uQVAWzR?= =?us-ascii?Q?GPz9xBdTnXLeq+8Y6PP8cqr3yoxfvuiVkYYt6cIRbn31JjE9XVkL7pWwrGJ+?= =?us-ascii?Q?ZkNEaMUW1Gkk2HujqAMfL4UgbRaR6xbBWh2iFKxPUt5B0DncmV7AT2uLRJwY?= =?us-ascii?Q?ZDxmTSLwqGACzpZBkMsqxLRuxrRaMvCpGQ=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: FgoRnI25d4tgbef+TNYe9HLYFfswcY9aPshaLMb9lUfpeEo9CTWfKLicA6B7kxLRivBIftyHuGzSeyyjVmf4Qun9ETzcLtHVi681KbeD4Uu1AWC+/ou7IcpRQF1iN78wyIKGMEOlkS4kLsuFy3tZ0q/1Yz3qy4jSCrtigIkbJgbollRKzKLev8Yk5UmYE3EMwAAkL9pjF9n4In9OIC4u8cxYH1fiaZejv/e9Z0YXoVehGEArC4kcAC/1DCjHVq5JRdBN4liUuys4Q84LaoolcVkV8//SUDHwibjIH17aQSzi5zp0ZMiFaVJ3ovT+SbqD2thC/Z8K0W50gmCZ8pdbAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR08MB9478 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.13.101];domain=DM5PR08CU004.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.13.101];domain=DM5PR08CU004.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: CH2PEPF00000141.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 66a0528d-976b-449b-f959-08de9f2471df X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|14060799003|35042699022|156008|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?/T2NNud2DddsKUK+Wua63UEEP0ZC3PUmWnq+3tHK7t7l38SnctApjJklqndH?= =?us-ascii?Q?S8f8TEdrJQ1dlftBeIWkRolStgGgqHyqHF62TSt3g0b2KAgNZ7e0Du/cJ0nl?= =?us-ascii?Q?0bI4C/tUMhdN1S9092Gwue3UvQ1pboFUpfycOJTk313yuMAZF1uKqzWow7cc?= =?us-ascii?Q?VPF2s5UNywEfdVX7XOf/L9TXJooNB8iLG7pcRSDsscha8IRuTbMkRKW0XHMZ?= =?us-ascii?Q?oJFEx9sRr+L6efhV/TJzYPKUPtDCh4c1tVZ+3zd9DKwkULp4JGSKrxRhlKKC?= =?us-ascii?Q?xf3lQRO0zGkBs6B6GpEVIgsLayT5I4ZSZbiMgdJOhWBpbm/8XbaQrGL3WYkg?= =?us-ascii?Q?PajtcNlJdXj6WWcxffQirFyaIcsHQ0mg8VeZJfpoXgiiRaSpOmk2Hq0Ny/ap?= =?us-ascii?Q?KCrbO2B0jQnnumA1c2SouWMMp8WLcoMDyFBUeh4hzzORUwX1OYshamfPqA84?= =?us-ascii?Q?dXJnGiM0AosOd2C5v5fzT2txbxlfykISVcYM2S6XB2sZdvadFZ9FA0Aj7F90?= =?us-ascii?Q?hV4+QcEDAL2zm68eLknyOHJGQYy0hcSvMHvlDKdwq2IvZlRWWxXzeqPpqyCy?= =?us-ascii?Q?MVkALxOOhV2gTZqHfjscgxVtwPJvFJFvbwAfArvrGZVIyZngKBOUpQY0IGZx?= =?us-ascii?Q?HJCVqV5ReTkSGPBR5w69ga0UD2oQzaFvvQUCsD0N7Zj7ZtMWBjvhStdqAQdJ?= =?us-ascii?Q?+pdESLEC0YBzp8C5h7oYPycdLI8gMZBaypkD7e0eOLX+bB6bD5HvASTGJRT+?= =?us-ascii?Q?A/eZxos/JYeXaUYWCS/xEMNYAPICzzH84PloEbfpQlU2j6ShkNOa24v9OBUM?= =?us-ascii?Q?C/OCc16zqyY3KaPBSNd1Fp/BW+zpDtrN/kfuSSK29rsa61OCx9rP9xE/UGvD?= =?us-ascii?Q?YbhtjkZjsH65augK/oTi+pGpreryDyk4B6+zegpryCDtlpZxEXj0t9MycWiP?= =?us-ascii?Q?sCQ+2se7HB9TdUbSAsZae7sfLujzu63PDxC9GcragK8JyZrnd+JoU0d7wNYK?= =?us-ascii?Q?pU5LLoPJP7vfGrlJSEG8LRC0wOtP9HScjz1KDvBlZfq8mJ125V2EUmQFgG68?= =?us-ascii?Q?Ju+qA4uzJVASk7o7XXcohLOYjPPFBE1blIz3pXQEk5V3rXtarxcIIv0sbpJi?= =?us-ascii?Q?8jlcXNAGuDh2LQjbjIDfyHsBY0NiLS29Jw=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR08CU004.outbound.protection.outlook.com;PTR:mail-dm5pr08cu00405.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /jAHSWtmgzWwbxa79b/cFx4AN141F195DYsXHOt5Jx71bEA2LSytGJes56RkjaqVe7Pko6Y1uJk6pYZDlmbxtpprU8vufGk8/tDsee7m+ItX6k9NuE3O5d/HAPb2yGBtaikWaiGjRDFyKeWoLsSYHadkmSTs3tNo5lRsXH9qJt8jySwWk7w4MEb513yaOT2Of1SntUETimsWjJvbpWc3amuhVCmSNjFcVWvLkG5OZPlFiyhwdkI+FSMeWYhlujyxiz44snv9MdOq9mHTQWsvisTDzlrm3YKmBhmjuBUwBgQzeliWhw14q3w4qgoIcimoqIf2X0aDYjyR5zHXsYZKGq0UZqENZjRUv5QvUrXfMr4l7PKTC3BAB7KKjBz+PhhHE0VsMk2Q9cT8p7kISz9jkrbFzIDRu2gvcXRGeKwGYCroRSRedkgdsTREgLJBEkse X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:30.3131 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 15c18219-52ba-4382-286c-08de9f24778d X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CH2PEPF00000141.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR08MB7169 X-purgate-ID: tlsNG-ebf023/1776720816-31C4F3FF-D5594AB2/0/0 X-purgate-type: clean X-purgate-size: 2531 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720841380158500 Content-Type: text/plain; charset="utf-8" This commit adds the altp2m_set_view_visibility and altp2m_set_view_visibility_locked functions on ARM. This makes it possible to set the altp2m view visibility in common altp2m routines (namely, altp2m_flush). This is commit 4/5 of the altp2m view validity/visibility phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/arm/altp2m.c | 30 ++++++++++++++++++++++++++++++ xen/arch/arm/include/asm/altp2m.h | 8 ++++++++ 2 files changed, 38 insertions(+) diff --git a/xen/arch/arm/altp2m.c b/xen/arch/arm/altp2m.c index 0e19e197e826..aa48c17e11a3 100644 --- a/xen/arch/arm/altp2m.c +++ b/xen/arch/arm/altp2m.c @@ -37,6 +37,36 @@ bool altp2m_view_is_visible(struct domain *d, unsigned i= nt idx) return d->arch.altp2m_state[array_index_nospec(idx, d->nr_altp2m)] =3D= =3D ALTP2M_VISIBLE; } =20 +int altp2m_set_view_visibility(struct domain *d, unsigned int altp2m_idx, + uint8_t visible) +{ + int rc; + + altp2m_lock(d); + rc =3D altp2m_set_view_visibility_locked(d, altp2m_idx, visible); + altp2m_unlock(d); + + return rc; +} + +int altp2m_set_view_visibility_locked(struct domain *d, unsigned int altp2= m_idx, + uint8_t visible) +{ + int rc =3D 0; + + if ( altp2m_idx >=3D d->nr_altp2m || !altp2m_view_is_valid(d, altp2m_i= dx) ) + rc =3D -EINVAL; + else if ( visible ) + d->arch.altp2m_state[array_index_nospec(altp2m_idx, d->nr_altp2m)]= =3D + ALTP2M_VISIBLE; + else + d->arch.altp2m_state[array_index_nospec(altp2m_idx, d->nr_altp2m)]= =3D + ALTP2M_INVISIBLE; + + return rc; +} + + /* * Local variables: * mode: C diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h index fbe66ad5536d..f8d0dd799a4a 100644 --- a/xen/arch/arm/include/asm/altp2m.h +++ b/xen/arch/arm/include/asm/altp2m.h @@ -40,6 +40,14 @@ enum altp2m_view_state { ALTP2M_INVISIBLE, }; =20 +/* Set a specific p2m view visibility */ +int altp2m_set_view_visibility(struct domain *d, unsigned int altp2m_idx, + uint8_t visible); + +/* Set a specific p2m view visibility (with lock already held) */ +int altp2m_set_view_visibility_locked(struct domain *d, unsigned int altp2= m_idx, + uint8_t visible); + #else /* CONFIG_ALTP2M */ =20 static inline bool altp2m_supported(void) --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720855; cv=pass; d=zohomail.com; s=zohoarc; b=gMhIiMUSG7fRme/+ED3ozzmgHGAT9XJaSUuy8Zn4cWyxFljJ8xM0JH0f6QDfxrFkub7dBTKJcBA8gsSsxl99u6gLW5mn/OrE286k1gxhOEs4r6prqwReDQHnpzBX96crX8Y0bogSX1wfol/g2TDFAxvXcHv/1YhvYSaKBLLEWV0= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720855; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wWUPA2R1jGeMCWnRBq/OLMBccKwi+cy0SSVh5xBuans=; b=KoVwE0jsv/o3URuxHxwDzPisS3EEkCi9EXrmzQ4POJr4KgCeq7H8vyHw65Bo85HNyYGNIqMtF2SBCvkztTOYDIaxuLnga/Ay2eZ3rRqyans49gITQ7A36XctH7U/x15NqULgle4blqulQzKkztySki6yEmwOBnBpFBgI2YMfJsw= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720855884604.1259747372494; Mon, 20 Apr 2026 14:34:15 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287894.1568334 (Exim 4.92) (envelope-from ) id 1wEwFT-0007kz-Rp; Mon, 20 Apr 2026 21:33:43 +0000 Received: by outflank-mailman (output) from mailman id 1287894.1568334; Mon, 20 Apr 2026 21:33:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFS-0007g5-E8; Mon, 20 Apr 2026 21:33:42 +0000 Received: by outflank-mailman (input) for mailman id 1287894; Mon, 20 Apr 2026 21:33:38 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFN-0006on-PO for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:38 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFN-00EgCp-2O for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:37 +0200 Received: from [10.42.69.11] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b9e-e002-0a2a0a5209dd-0a2a450be734-28 for ; Mon, 20 Apr 2026 23:33:37 +0200 Received: from [52.101.61.73] (helo=DM1PR04CU001.outbound.protection.outlook.com) by tlsNG-42698a.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69baf-212f-0a2a450b0019-34653d4947b9-3 for ; Mon, 20 Apr 2026 23:33:36 +0200 Received: from BN9P222CA0007.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::12) by LV3PR08MB9147.namprd08.prod.outlook.com (2603:10b6:408:21f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:31 +0000 Received: from BN1PEPF00004682.namprd03.prod.outlook.com (2603:10b6:408:10c:cafe::6c) by BN9P222CA0007.outlook.office365.com (2603:10b6:408:10c::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:31 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BN1PEPF00004682.mail.protection.outlook.com (10.167.243.88) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:30 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHs3pNgz1wdM; Mon, 20 Apr 2026 14:33:29 -0700 (PDT) Received: from CY3PR08CU001.outbound.protection.outlook.com (mail-cy3pr08cu00105.outbound.protection.outlook.com [40.93.6.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:29 -0700 (PDT) Received: from BY1P220CA0019.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::15) by BN5PR08MB10625.namprd08.prod.outlook.com (2603:10b6:408:2a8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.30; Mon, 20 Apr 2026 21:33:24 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::b6) by BY1P220CA0019.outlook.office365.com (2603:10b6:a03:5c3::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:23 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:23 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:20 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=TQqwYXlEbHAL0dz2XIjdzYLFWfQIRhYUiLvJo04JdtHe+SW066+Kqc6c/EMx3jNfu9OVIQeg+NTZrYNoVpi9L8+9s3yu5b8fzuQKO50kH9DNy315h2c4fOL88eimgcfzcnjExaknzZ/YbdiJYIReCp6G65sTYEdHmKfXY+jASVIdSQSFCZe8fsZC+ka0u8TnyBTfS09r+TJzeRSKEqfWqzk/iKWP0OSCe3eCqM6ZCO6ch96FXNAo04FbEU2EGVorMF60uoE0jwbxu+nYMwA6PgOJKoALvJiDyB7toDklLdZj+SYVeynyN/CS0CQcVLYnBMAyIFgt+dpKidjbSkTnKw== ARC-Message-Signature: i=2; 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=wWUPA2R1jGeMCWnRBq/OLMBccKwi+cy0SSVh5xBuans=; b=s9aaD+MnQ2bu7In5QxmdUi7y3Dsky/01+MLTFd2ImfuBPK8qKq+myQPeCL+ZkjuhddIMT07D/L8NY0ECl92NvJn6/3YELiu4ZmMpUpjTAlZij/SNTqI9fdZDcqG/r4itB0VGbZu/fVkiFUu2L1e4bi+vsr0lTo34NeWW0cxmg7QhjNwEDYKQ4iCQ9HgIOObitTgPIU8eSoIfCk+irdIXetjzdr4aCV8wMqg3CDoYz18nd3UA0wI2Rroe0t6T71+e7EJTQGXd9SRFyhQyx8rqCqei/AN2E6bhCRItrNTNphpQQ1eOzAle3NDXMBsiX2qjbaBB0D3Kd9Mm7NCC+/8U7Q== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.6.109) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wWUPA2R1jGeMCWnRBq/OLMBccKwi+cy0SSVh5xBuans=; b=q3x8PNeLNDARM3qMpo6CSOXswkLcq4lQAsq7LNtlaqPX4LsJP1pEKjHJow0mGBxgdzn5xo6E3Sjh3OvexUGpCxpXD6sSKEMoH79Qw0EVpujG4+7qOBsJHZlxEz5NW8rDPP5uFbp/tHP6A2VHU6fR0pio7EIeqmxwGfg4hVO5G3Q= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.6.109) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.6.109 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.6.109; helo=CY3PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FfCBfjHVWms+EcYedWfEJRGQjJpZt4gvVA+KIXIpHzIHixCZpxFc/mNRPOu3gNjJ2neRU+ngHu9MbrXR4oCebGLeTE88RcjqH0yPg6zQXZ8P1eO62z9R2JHazPt9PaB+JSl9LL94Dc3K1RS2aVqylKxqrl4Zu+UdqV27igpu5OeW2Kwsab5xKH54kRuQDoLEBIU+eXA5VXoOUyZdB/vaWAuaeQcPS+zz/Jo8brgFLDcz4wefL3LsX25TU6QKAwbhNFFDc+v8QqlkIx1zJhzPDm670UxdUvR7eRktK2sVex4QLaDszNqA4StpCSvTNpDMJwMrI5yBYKEZXjQJqBmW7g== 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=wWUPA2R1jGeMCWnRBq/OLMBccKwi+cy0SSVh5xBuans=; b=WYsQVJWzXRIJUyNWLh8BsWjHcLOUAy+bBCaYC9u6/AOKTi0/aGzYahjwj0Y/bew8zLZNR/SUh/fg7d0H2pM/e408/of9HpKfFLS3fbmvIXLkmGsMJb7+8fzUmWJbcwRI/Yo7/6AMnitVSNyiyelLkNWk5G21wwPa3CcV6/y9Z9/gob0pAg394Qk1I2X9k0gz42NexdAvdKkioNx1nILgQYfpgED2RDjg73bHotJx58l+IBCKKeIEOg7qmCzcmjUn2gPFTtxH25iCHFvhyxqbYuGD9RxOTKdkeP/t9LT+O7mLq9kbcsMKVWUiWIPojuwVHXVbcNVlDmm5H4iKXiB1NQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wWUPA2R1jGeMCWnRBq/OLMBccKwi+cy0SSVh5xBuans=; b=q3x8PNeLNDARM3qMpo6CSOXswkLcq4lQAsq7LNtlaqPX4LsJP1pEKjHJow0mGBxgdzn5xo6E3Sjh3OvexUGpCxpXD6sSKEMoH79Qw0EVpujG4+7qOBsJHZlxEz5NW8rDPP5uFbp/tHP6A2VHU6fR0pio7EIeqmxwGfg4hVO5G3Q= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , "Julien Grall" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [RFC PATCH v6 34/43] arm/altp2m: Add support for HVMOP_altp2m_set_visibility Date: Mon, 20 Apr 2026 17:31:57 -0400 Message-ID: <20260420213206.208750-35-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|BN5PR08MB10625:EE_|BN1PEPF00004682:EE_|LV3PR08MB9147:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d25fae6-395c-49bc-99bb-08de9f2477a1 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|36860700016|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?/eY1PV0XBQIWvxzYfcUFwrRlS52N7t3q9QERsXtzmYPNPqw0bssmg2WW+be8?= =?us-ascii?Q?sZ0k+IuYxih/Z3YwB8UVknFwgbQK3ImJBlfIuzK00gcSQQltNcGU2bm2kGVi?= =?us-ascii?Q?gaE6pJQ/R8uzOSebuU+rmj4oC3c2hsDVtxyak0zNWTKtSdkn/uUKUQIG4fRw?= =?us-ascii?Q?9hlRYSwXV4KZHAkCqCqNfY95GUFdZGndIqz9MzIbRNJtdPeht1PYnCD39llH?= =?us-ascii?Q?sw6cWHyTDUo+1ut9u+sp+E1aJWh2P/khlRNucAPDzQjiY803AAUG8x0rCN8w?= =?us-ascii?Q?E1fGF427oUwlD9/FWGe3wP6ezSVx5XSZrfXaImBqnDIrXKRa43rkSuZPzQeV?= =?us-ascii?Q?qgU5s1nvKtkpBG6Vzftyto7HXm6AlUIVLIzg1IXhooufYeHNSszDnxOx22MH?= =?us-ascii?Q?A712HfkGOY4w+w+QsoC1g+RDb+7Ucp3x/Z9/wQLl9ItfVtjzjRk//NAcUJCl?= =?us-ascii?Q?plmXAMj8+z2h3V3yRntzU1qRuYRHCnqu09cW/JhZJXaobiJ5Lhz8O3pQJGt7?= =?us-ascii?Q?0ufEE2XHIcjcoZnrMYNLmoWvx+fex2NC+XhPybvgH9w7BvqhtUb/Q4F5X1It?= =?us-ascii?Q?nae8kiH52wIUOQ8i6qwqRgif0YqQ5JR5ouq0K5209lOnMiNOYsnHtbZAasWu?= =?us-ascii?Q?x+Scvh59Ne11Z480BEgx6zGNSr8JbHDaio0s95larj6IJsUb0HeoB2s9cNcs?= =?us-ascii?Q?R1aXvDMNijQ4xfJ0NwNcLy+z1mK2KgtQg2YBF3ehtD7JxNPihOmlv0X4m3n5?= =?us-ascii?Q?QW1gUNCiNdSlDftw7rG327XuB0rFWsvJswI+D6i2MxJI1agZUkfGhMyH3ICw?= =?us-ascii?Q?RebJCDRZpV3HxBbvuIOept3rJhXJsadSS6sPfGDN51shhsdS5tYvnlMdVbQB?= =?us-ascii?Q?aICKOVFDmSI9QwvWg5DDSxC/diS9KW8p3NVJSlqAIoHSu9dDc2/3v0uDhA1G?= =?us-ascii?Q?4f3I6aFbGvhghVaESlO+PbbabEVmqCing+XveZeojw3ih/gFF6OY0lp9E62T?= =?us-ascii?Q?oM9DLNTtNIy2F2AwsXaHXxnK+z3mhoSo96G8AJOt66+igHCuGZ5PjBU9B6nR?= =?us-ascii?Q?kJ33CkkqEt9G9yWbMmmvJNEoixWl7oQ2LHgyb+01Yj1NlNKSvRDOEVKcZAOH?= =?us-ascii?Q?aqxtSRCswGZ8XcHs5IcKgFw6/u+3ub/yC4uGPmjfxJyXYwRnWSokW80MAxGB?= =?us-ascii?Q?qPCmhSt/HqtlXbKln/N0Y0xnJwnUkeQMkJyBvYlyoIRAfn01BTcuLMMQVl9u?= =?us-ascii?Q?iHOGI7VXmeOVSK1I+KeC?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(1800799024)(36860700016)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: eSPaC0+VnXixVmlBHYMCKYuKQfLtav0AF3tH29iGS+6bIf3H2b6c+lrqv1fOEUOohHhBAQz9/8tGXzvFKdk38zAsqgnSsKL3kO1Jlf1FgnobGp1xQUy0pBUxRyDt4pEvoIY9PN74rEzM+BRRmQW9WNfUHBo4MtuH6p3/f8stTWDPnS8YVCISn5T2zY+GgJ05PGMhFUY5x7+bxx6xSyGM0mcO4zX5ZtAjWOCP3Hlj52aAaMR4+KXndg8DCkHz+2+OJUY0O1fr+Ek4FnQDElJ1wfLKP4zHR/9sriX8NSVAtAURaWuQDCPA2XoHooQ4aIT5PDnFm8o44lmebkL2k4Ui6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN5PR08MB10625 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.6.109];domain=CY3PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.6.109];domain=CY3PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1PEPF00004682.namprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e01c8739-929f-4b3c-ad7e-08de9f247380 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|14060799003|35042699022|156008|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8Ai4WwFQH6lPYcUg4zVGHO3S1+IF+/iKvCQ6Q+djCJcVpdLhg919AOssXKP0?= =?us-ascii?Q?ZJ07UT9hJyFB76erxXpRoSb4yQWv5rklLbIb7TdDhbfZ0yXA2dQjqch5md43?= =?us-ascii?Q?F3ZNXNBHx0gH9c9WKfLSBqINOmjqWzgOwb+kn5XKOpNVuHexHyxchqwcX2WS?= =?us-ascii?Q?9DZ5aYT+EB/9kFaJwYW6D5ueer/4IXQcBOEopYEr3dHWdPUZUzFQAdBVr8YW?= =?us-ascii?Q?3b7EctOBSbFTJ0EgoPN2rQ5XYhOPZ80ugKWp2RmG1dz3KgEPbVedeWGYVlTp?= =?us-ascii?Q?6Rw60NkooktAi2hrHWdxEQV/vFsIWvpogcnhL5q2lfzZ8at5HzSonSfNf2WK?= =?us-ascii?Q?G39GOQKkoxAPtWGpYySHQIYpjLfWdjNZPsr6jS3J/wJ9+GvWGrELcgmHES3O?= =?us-ascii?Q?VZei3pW4g736tgAJkqOyYZovayaKMtYDbcSSiYIWsXDW58UkrZMPl5YZ65KX?= =?us-ascii?Q?SorMNzAPB5tNBGoke2As9ayBKU8ZHDMLiurNI6eAx8pSlz+B8nZ2QuPyQjRA?= =?us-ascii?Q?HxETbmSGXFqy7fWuIEGKUWaRRvZPltF1x8DK5uAO18KMm7/2bEZHCwLWwvj0?= =?us-ascii?Q?qAMbc02oPUU4j5jhlQxKg32D0UtjlQ3saos3YoA5p2gKaU5fkP3lQ7wzPepb?= =?us-ascii?Q?yTWqKO6imQw//WO16DBLfzg9IIWWbwPxUosPYUUma+GwEhBiqyPSBHkXErTH?= =?us-ascii?Q?uYl4PBXt907yPmZpPTiLlqY63LSH6BqDk0HQWDKoyDbLpGyzykBibSNpe1HE?= =?us-ascii?Q?/W45D2NSgy2wXUL/Z+uZPc+NtJnVD627t1Zx9g/AJncf+fg/jHrKHFf9rf/P?= =?us-ascii?Q?xSCEWHMNexIS79Pv0s5e+Et2nKb9CjOkm5+8no19yMxb1lv2VkFOBgr9s1V6?= =?us-ascii?Q?yPcUnksw/f5bR9CkXIPJ2wxtU6uiqAVJjvBmSkAKNoNi2dGLFpuh20z5sOdk?= =?us-ascii?Q?B9t73Op0v68snEjF/nFTcl5BbBSESYl6o3xOllTrJNS9GonJ1gD1ghrq8ADp?= =?us-ascii?Q?H7sz5srlsAyXcsz5raGu1a1LeT/KEy+HtO22zLKRR7Wyzv1dr9t8c916rGtu?= =?us-ascii?Q?PqaQNaQ8LtgkdOi2RI055UjkCyope9z2sHe4OIOgWZXCi7RSP2xA6Q3UC4JD?= =?us-ascii?Q?2Fat0eHsNs4zP4IHCmxoOYIQUiCmIrYmiGQtwcnsS9YOdek4i3Qji9jtufjd?= =?us-ascii?Q?hsnhOuwSKW85/xPLCo17Y5/YCPoOvukuP/uTc1b16j+lvvsx1ILKBoQDcEPp?= =?us-ascii?Q?R+19JVISg8a6TQ8Q5NfN?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY3PR08CU001.outbound.protection.outlook.com;PTR:mail-cy3pr08cu00105.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IdYZ0TmxX4za9sM8oTfgqRjbVNBkIxSRvsp3gZgi7eF0OsZeC8ypinhgx0YvXfrOVXRWyADYhC49uCUcoPtT8CDnPD5pMwxObyrA+jOOg7+REVubAMFfrwBRTb6gIm2yEQAB4WQxZV8NafPGsFZrxziCZtfp63YhFATeljJOj2/aBl/qbEiiuOr7DPDGBjRnrPonbNuwz7zhhSt3uieLEudvMrdOoeUG7yQ748fKHWSSLRdClFtEUFJjUb/A99xxh1/xmpOwNsGWgJgdORJTD9xSqYUGSyzGzPLw1x4X5jMKLhG/8ydRJbi88VyyLchaWXH5HYWBS8UoQxwvL9U9HnxAEhbC1Cr6D8UF1KmvxS15tYo1H/nudX/H7DvlnhvyiFp0VSKanNvvn5lDA+wMIBpAvlhk9L3vIn8bOZvPOOReOqSCi7Ou7eFKRvIMKF6X X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:30.3868 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9d25fae6-395c-49bc-99bb-08de9f2477a1 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN1PEPF00004682.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR08MB9147 X-purgate-ID: tlsNG-42698a/1776720816-05D6FF3B-8824C7D3/0/0 X-purgate-type: clean X-purgate-size: 1033 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720857417158500 Content-Type: text/plain; charset="utf-8" This commit adds support for the HVMOP_altp2m_set_visibility command on ARM. With altp2m_set_view_visibility being implemented, no further changes beyond updating the #ifdef CONFIG_X86 gates are necessary. This is commit 5/5 of the altp2m view validity/visibility phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/common/altp2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index 7b80426c7798..c234bb3774f4 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -477,6 +477,7 @@ int do_altp2m_op( rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; break; } +#endif /* CONFIG_X86 */ =20 case HVMOP_altp2m_set_visibility: { @@ -490,7 +491,6 @@ int do_altp2m_op( rc =3D altp2m_set_view_visibility(d, idx, a.u.set_visibility.v= isible); break; } -#endif /* CONFIG_X86 */ =20 default: #ifdef CONFIG_X86 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720871; cv=pass; d=zohomail.com; s=zohoarc; b=cPwk2TbrVACZhHAg5X91ZIfR8XDkpXq/j6J4FGVK8btYaCTenzdkQ4OqklXeSNMBqFCdfSa6neXKhiQIenC/AD/qXZCQl9h35HOgDfXKO3WQ/yLR1DqBvtCSx4Kz0raJ9cpLWBnPTdP9VY9O4wd9Z1cFB4YxTs7hhNSmP0GRkH4= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720871; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QEvCOJ/znG1Y9sl6sTHGiqT4+0IS7dn5KAJvNg29AXA=; b=WT2s9NbxiF29UdWqWpxTtqSWkc1I8YECTRuRuSqAipfXM1HU5FbqsnMJO8OUtRPvifTXRMwJHEDA0UEztp9A6faXYtwESObht2OSz8Vx/Aip4soZCQyiTyw+wb9gUNtMeMf87e0Lb+g4vQb8/RvO2Or2Lskw8Je1zNXhTHxhsQc= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720871619212.89238142061083; Mon, 20 Apr 2026 14:34:31 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287936.1568401 (Exim 4.92) (envelope-from ) id 1wEwFp-0003Jp-0B; Mon, 20 Apr 2026 21:34:05 +0000 Received: by outflank-mailman (output) from mailman id 1287936.1568401; Mon, 20 Apr 2026 21:34:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFn-0003Ds-EK; Mon, 20 Apr 2026 21:34:03 +0000 Received: by outflank-mailman (input) for mailman id 1287936; Mon, 20 Apr 2026 21:33:50 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFZ-0000TK-5r for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:49 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFY-00EgH4-I0 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:48 +0200 Received: from [10.42.69.5] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69bbc-e002-0a2a0a5209dd-0a2a4505d328-0 for ; Mon, 20 Apr 2026 23:33:48 +0200 Received: from [52.101.57.124] (helo=BN8PR05CU002.outbound.protection.outlook.com) by tlsNG-c201ff.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bbb-aaa8-0a2a45050019-3465397ccbbb-3 for ; Mon, 20 Apr 2026 23:33:48 +0200 Received: from SN1PR12CA0063.namprd12.prod.outlook.com (2603:10b6:802:20::34) by DM3PR08MB9165.namprd08.prod.outlook.com (2603:10b6:0:41::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:34 +0000 Received: from SN1PEPF00036F3F.namprd05.prod.outlook.com (2603:10b6:802:20:cafe::a1) by SN1PR12CA0063.outlook.office365.com (2603:10b6:802:20::34) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:34 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SN1PEPF00036F3F.mail.protection.outlook.com (10.167.248.23) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:33 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHx0YxHz1wdS; Mon, 20 Apr 2026 14:33:33 -0700 (PDT) Received: from BL2PR08CU001.outbound.protection.outlook.com (mail-bl2pr08cu00106.outbound.protection.outlook.com [40.93.4.14]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:32 -0700 (PDT) Received: from BY1P220CA0024.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::9) by PH0PR08MB9934.namprd08.prod.outlook.com (2603:10b6:510:332::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:27 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::db) by BY1P220CA0024.outlook.office365.com (2603:10b6:a03:5c3::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:25 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:24 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:21 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=lLcQhj/cooPYNVDOhU8AHbM2Jk2L6WGxDQ0qBn1NSyJQsabo4Eg4BdAIvhpneo6lLVYEGYjOlstvewbv+lsAgxsn9pVI9FHkJMKuZXN6Yz6eQpeBMsONKZxSklcmpBqo8WKlKX5/78LUKJHDUquXGHkHJfVRmU6gwlPIVSBmbvCyJQ/lcV6l2HQPqcZrbr36c8KW4nbQxlyiRcGqIm4G1jHDVWbYla99Az3XHSKkh1BUoru2aElskEBTDHCP6eKr5+bfpL60ByWJe5dwBdOPSEllf1ohXsxDZpX8SwZAttVABcyOoc2oW4qWTuTgU9WTZYbSZQE1aMeE4ogHrcL8MA== ARC-Message-Signature: i=2; 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=QEvCOJ/znG1Y9sl6sTHGiqT4+0IS7dn5KAJvNg29AXA=; b=MxWUlEfcrpVoYzqNVVPHCZzZO75ITKUQlao7Ek6Uacs0FKGk4GfBqcBRCmXVkbW0Hp5pCbCkswRj9m4V1eLfglg0bGoetCCm3+MVHTYI0AwWkps5nNijowwL+uL9Z0hln1ip1SAQu+cfbKoABKLShY8eUKZSwGRQ9av7kwkOXGr9ELeulGUVW85N0H1WOUJzNDULENoTcWuO+mnX4ToTHMZsF4u6Kpqv3cuWEJi5U//ET/HUrNNtCqMx/EB3ESzLLeigXvNGgCTBjDCyt3LJZBF5iAmu3gLH1l3FBRpX9YEwqCf72VQG0WU9Of1Mvfyn1DMaO3B4XDgeMIWsMNcsMA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.4.14) smtp.rcpttodomain=citrix.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QEvCOJ/znG1Y9sl6sTHGiqT4+0IS7dn5KAJvNg29AXA=; b=1pDXNGpv/cLnvLpEprLKBTUImwPkTecH6SIBAjXNbohm+qvYeOvPGI9jkDhgqJBPD76vt8rLvdW45C4hc16JbTc93jrn44VmTF2M/XUmYeQZcSALUChFcrQ4vneGwVQ/t9CzVGHsVo1fKUoyntwtETHdWDQc/GyJvF60wuLvnqw= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.4.14) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.4.14 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.4.14; helo=BL2PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v2mqqgVdbMoQfn8/kR8qFsSIBGW5aXDzoO2yWM5hVgDzKRp8/EIqZydLsnV4bFxWQK/iomL7tFtLUwzm50/0H3RM3y82kLKr3egpoRr/s4B1nsJXoR1DVyoldJDlMqJ19jYYLxIAkIjY2nalZXl/Y4+BloqaS639T4wwyL/XltCLQwHL1eOAWFQ9MQISN9Js8ONKy2NB5JEH/zf2mgNixtoSQPs0VvX9QfIGhoOhsdi2V+/Ufz5nlU3mLObcqo7M6wjNo0Ba3Wz7pTyBd+FYMKqwChtNjljgbNJHPEduoO6HDjsRCBDl9rq6jx8WvPfVXngdMfwYVCjVeC/Q1GgMNw== 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=QEvCOJ/znG1Y9sl6sTHGiqT4+0IS7dn5KAJvNg29AXA=; b=W2chBkhQGzqDK7ZOi5GANLLfXMFIge4Xcd8GjcRSjlx0KCsxbTCSqezt7Ek/2+sUFMQDGkpTqWQkx+J066tiOwwv5xI9ajHwl9RbrvYh35q6rEglq3RyPst59Ky20hI9kWzsOxqwHB0BOXQlrNiyeMKRnB8cusMFRYFlreGk3J3hb2KRpToLgLanjGtRfgQF64SO4FrTomqfVHxwFikj/F6XtznF38b6JUk+Oe8ckYc74FBkOv4SU+7elGI0A2DI+w/tQ6gfz5Oh8sFCsWCQnc0eJgUjO/0ZqU21kc5ZUml+Y9dUh0BRM8JgljF+K+Xz6RyAwxDvM4itTSUPEqTiPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QEvCOJ/znG1Y9sl6sTHGiqT4+0IS7dn5KAJvNg29AXA=; b=1pDXNGpv/cLnvLpEprLKBTUImwPkTecH6SIBAjXNbohm+qvYeOvPGI9jkDhgqJBPD76vt8rLvdW45C4hc16JbTc93jrn44VmTF2M/XUmYeQZcSALUChFcrQ4vneGwVQ/t9CzVGHsVo1fKUoyntwtETHdWDQc/GyJvF60wuLvnqw= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie Subject: [RFC PATCH v6 35/43] x86/altp2m: Add altp2m_activate_altp2m declaration to arch header Date: Mon, 20 Apr 2026 17:31:58 -0400 Message-ID: <20260420213206.208750-36-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|PH0PR08MB9934:EE_|SN1PEPF00036F3F:EE_|DM3PR08MB9165:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b1455e2-4cab-46e0-c048-08de9f2479a7 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|36860700016|1800799024|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?ixywoTqmF2w1GpfdIf6Pke67X1MHmtUXUqtymdOZe/tK419s8vOFVfV/WkSs?= =?us-ascii?Q?Ar2nMZuGKm4Wd0nf+KCPxrdRj0UCHWuoYUQptbFfGcpmWyTOy9gUpv3p6cYg?= =?us-ascii?Q?VH4yE5mC29L1omvG7+2pUM7xi5X9g8WRm4bMqUkSXUfKQZR4ne3kvvk80Htn?= =?us-ascii?Q?eedt5JTzYY9B1eIFiSy2rKQxpOOwK/4gFnBM6CGp/Q+yOfrPkxyeaY9xHlD6?= =?us-ascii?Q?/6bFw7u2fN1Y6flQI3Z+Owj/3sjZ36GtrmWWBqEH7St6sSqjV8ktwx1z8iQR?= =?us-ascii?Q?iJuStEipNOTB3C9i2EDrzgLvYXg9umaly8kAuXfINa9pik7lpG6uHf+85wgl?= =?us-ascii?Q?RESvIT+ovzU6x7EXovwOz+FVS3AAhK/XXCeKBD+o5xmdNScvtmaZ75r6JD3q?= =?us-ascii?Q?kXBVBZVNeJtMdCyWIEpB7+jQXnSE5+E36/wFQhnUBS/VSp38tUnMRoh3LjMI?= =?us-ascii?Q?Js37rAxeHioV1YQIjaJkfqYVkDdQTp2QGc9LPgAhTcn2CRERKNKgS2QKGPIZ?= =?us-ascii?Q?jxHrOBMB4cabcpzRtGgJaVQbVrPWJGpx2+Psp0sf/fa1u8aJWh2tY65VvPCt?= =?us-ascii?Q?mZTPVp5q75UDC4REo1tCbGbSqsasDA0R9r2NZLK2T61/eNfrgCYRWSRNKlKL?= =?us-ascii?Q?bDSL9cWNuw/xeGlQaoHXwv1DZRvnkOyD03+AiX+ObrxXAFpAstXyswNFSdTC?= =?us-ascii?Q?p7goDCmbjG8JmWNr5MRWj7xAw5Evst7F+mTnu3UKyIV4JaGiR0BwRD7YS/V0?= =?us-ascii?Q?+R/eJbMrCCbSTKbolXJAq2O3vSvk4FQN8TUqBNsE6VUL6fSxzpAzHZf4Q2/t?= =?us-ascii?Q?/U2ZroJyQbvUBZPLKLi11S9YN3Rjk3UI1T3xR7Hej0ww/prte2TYHs7sdpno?= =?us-ascii?Q?xr11/elvDCci2qDxIhLv71w6qV+MxcGf7ZqICZH67G22tOp3rhD1m+Rwle80?= =?us-ascii?Q?agwUcV8nYHF+s7azRFgaLpPYLJdYOLxvXIUKT47VXKtMUIQXoc1XGRvUXE4M?= =?us-ascii?Q?WiU1Ivnb+sq4fBcSPGqwaR+uI04EMfQA/ibrLAb78Ixva/sglCo04x+/xRr5?= =?us-ascii?Q?YDiXbQFF17lt7Q3Ea6n2kGstoexgpO9/ho4RA2QYsi7/ZqVhgbMmPb4EcqzP?= =?us-ascii?Q?z0cT56zE5wTcY95LdQBsbo1nMCEzRStESoQMD0Vjx9+0rIro767pDO4te432?= =?us-ascii?Q?qdD/HqfUOfUvSNb1?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: erop+8h4Mj2dJ86U8tcxPi2xXRBQ73x6LGDVUjCQ+/0eogPuHai7yIPl5ZU+4WXCbou/Uh5XDWKJbFFlLm7Y8LnrmKFVRDL+zpPa1YITBXB9QmioU6iCTSS0TNr1Wx/TYpmVRZU2NsakiVAaLuLpAxH0hVeVJkN+ZIYNs+lL8Puv3u9REVc8+d4dhAIjxL2wpOs089bSNtd8K+vKnDunhrVldLWJeAYNXlbJ03m8jct0R7GlYjc1JhjcF+BT+DnE+payvqpVQ9zJZfBOL/jzPWCeKwZ0ZemaaMRDL3aySl8D1Cf++9ZLPtoaWdaUI2xdhcndUVUimbnH/cWWvnZ3QA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR08MB9934 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.4.14];domain=BL2PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.4.14];domain=BL2PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SN1PEPF00036F3F.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 53552d84-0380-4fdd-dd9d-08de9f247438 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|14060799003|35042699022|156008|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?1qjuzLqXqW3+SIOAKJTUV8LXM24ULx8z/aEqWvFlGm6gDl/lm3cK95ANwYy7?= =?us-ascii?Q?gLB/LcXHrJ0abc7YjoBxRLOF60QwhaxnDBm9Sbyt2whWZC0/6zMraJZYZD6D?= =?us-ascii?Q?qvSGxX6G7XfaAyel64RZPw9QOkMyrIwr4P1o9GlnwXPPFZZGAbtM3kGUyIZu?= =?us-ascii?Q?m64IoI/il2vBZtlFjTQH57Ge9o+zaoL8O70bNwSFfnPIXG9SIttPTKRI7RhK?= =?us-ascii?Q?F5nX8gjQXQyhwlifKcHOLwgiM5whcOkKdH2pu/KuE0lg860G03PxEOxhc+4g?= =?us-ascii?Q?Uo+eiWu/Udxfel3RCnd830Jmx2EUgV0Op5ybkWe/Db29MB1WspcERdXk8f1L?= =?us-ascii?Q?iwJhRTxsbvtZQ+FxahBgXzccHS37I3KkfF0UJVpU3GZuxHxy6OkbYt1qpgMQ?= =?us-ascii?Q?5k3+8OCn16deY1hUTFX5yssuw3n7DuULhSluya6mEjdxZoIupRvFWGOr79qz?= =?us-ascii?Q?Zmbat2RRnynXb4TrRyLSHY36WIeVWF3QXXNKU5SDEDyo/z4t82Q9gF0BYQXS?= =?us-ascii?Q?vWj4tqi9xN5vFqE6cpKcUiSOP+YhfBoSFR12YifQWqyd1Q1mLL93/xGCzJKy?= =?us-ascii?Q?CcTyYLsFddWOQU72y1t4lTgzamWStiURdaWjJjzXEEN9ceALcmDp4OPd2ngN?= =?us-ascii?Q?NVD37qCnj/j0Dlhpb3p6CS7yiBuXDAKPCRFPla6udO9MeH1UP5f8YFpsbmex?= =?us-ascii?Q?ntIpDdRj80hMRBAaTuEHtSoFfMWbjiC6/iyWZVK6CA0wff9DXWDmhqUJCS/u?= =?us-ascii?Q?gytjSwiJ8ePPTkB+8L6hILj9/euStag6+vA0tudVDqJ9wrXTkFbkV4z2XmmQ?= =?us-ascii?Q?+Z/5p5HC5y+2SsLB2/lJVshHUokn2+Vvjka08tfGAvXgVgAXsRZkrDFCFbcN?= =?us-ascii?Q?lxkTztsNuEghewqP9/DafqLMFA/d/fGON7XuNB39XMeuZcTCOOPogq8j0O5J?= =?us-ascii?Q?GKoUz5rcQY/NCgguBn/U+tcfYjG6+mRNXau1/bH0wfEmhaKVHJ7AsmNMYzLL?= =?us-ascii?Q?snPWY8I0L/Z4XHeuhiYjO0xb8zwQ4eFv9XdFK87dSvNbLQ6DWNqbjQbkcGBq?= =?us-ascii?Q?u/FgMSRPJ1tB5BrdpgXXWGQEZ2390YFRepxyAiWMfuOA1fzq21whZa1zo3L1?= =?us-ascii?Q?LAo1kDmIcIMAwFdWqoZIAsTtVpR6ebFrk/x3LkzA2CHcUM3jRuFVnp/W/SHF?= =?us-ascii?Q?cfvQfM0PEvDSNoRG?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL2PR08CU001.outbound.protection.outlook.com;PTR:mail-bl2pr08cu00106.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cUHXrfb6FJbdtPo6vV2U709O36d4sO0Nb8rilLZPPISwhjgHhVvtCA1DHBa8UoiHF+wugP/a8kSwLD7n4pkCrkVrE40m2sq0KzpIfp/WQsXaoIVfPIt0G7iK6E04z1xZL1c5zPPSq8HvomPCM+DvZ2p3hRqodAulItRm65FfML6gEPZDE/7JP5zt8LjA2yswXtW7MFvyoZfWL2kB503tSQ8/AH465QaLf8cfcWeNSL/2d9xY+u2k/80V9sEpY0KNYp6QTCHebaBdwTCCCr67GHdK13N3e0Bj1o9A4ypWibSkY1uawcxgdKIQiiOEQ8qSrzyXat9GpT0qEtyl3aCtXJt8eSinYaxJmN4VKUd29MhYIbkCUP+vEPaTNHbsqwBqNQKoIEbJa0LFfTUckq35V33DOxcDcEESN5s812mn3lLA00L/9uJbb4Yuwl5pd45D X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:33.8382 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b1455e2-4cab-46e0-c048-08de9f2479a7 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SN1PEPF00036F3F.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR08MB9165 X-purgate-ID: tlsNG-c201ff/1776720828-2A969443-796E502A/0/0 X-purgate-type: clean X-purgate-size: 1798 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720873484158500 Content-Type: text/plain; charset="utf-8" This commit adds a declaration for altp2m_activate_altp2m to the x86 asm/altp2m.h header. This makes it possible to call the function in common altp2m routines (namely, altp2m_init_by_id). This is commit 1/2 of the altp2m_activate_altp2m phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/include/asm/altp2m.h | 4 ++++ xen/arch/x86/mm/altp2m.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index 99c4cfa5a68b..203dba44e2bf 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -95,6 +95,10 @@ int altp2m_init_next_available(struct domain *d, uint16_= t *idx, /* Make a specific alternate p2m invalid */ int altp2m_destroy_by_id(struct domain *d, unsigned int idx); =20 +/* Activate an altp2m view */ +int altp2m_activate_altp2m(struct domain *d, unsigned int idx, + p2m_access_t hvmmem_default_access); + /* Switch alternate p2m for entire domain */ int altp2m_switch_domain_altp2m_by_id(struct domain *d, unsigned int idx); =20 diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index 8672b8c061d3..40c6ea72a621 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -274,8 +274,8 @@ void altp2m_flush(struct domain *d) altp2m_unlock(d); } =20 -static int altp2m_activate_altp2m(struct domain *d, unsigned int idx, - p2m_access_t hvmmem_default_access) +int altp2m_activate_altp2m(struct domain *d, unsigned int idx, + p2m_access_t hvmmem_default_access) { struct p2m_domain *hostp2m, *p2m; int rc; --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720855; cv=pass; d=zohomail.com; s=zohoarc; b=CRsPWSppxPs1ub3RbAABzk40WiF0b48KQf6gErq4ZS3WWRsDXfHSLB8U4+Qh7M5nZvxBppgCHm8eP5uXFKmMeTryKnlxiZTr/cr+woVuWDdDlaH88IdegcGsnvqsSfWMJfeY278nfmsFkvDu+RlpxwpTSfzBYdS/UyKTxDyxa1g= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720855; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cnj600JVTUzVmDZRZYm/XxhEOfEfbLwT6rVorqjJHgk=; b=myKiSlv/8Tu1t2IymZenyQ/WYF66S5aLfY2zofQN/7AA0A97CbhfgnJsuZUbVPOYG7PqanEtzkSrwcO75z18mkOREmYhS9bEP9VArYgp5Bq491IDP0iEN71xNpQ8LDpHVq+ApqarQicxn7DdfaRAX2UIrfQ1Eur9payGefL3E2g= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720855334943.6500650757827; Mon, 20 Apr 2026 14:34:15 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287901.1568348 (Exim 4.92) (envelope-from ) id 1wEwFZ-0000Kk-8N; Mon, 20 Apr 2026 21:33:49 +0000 Received: by outflank-mailman (output) from mailman id 1287901.1568348; Mon, 20 Apr 2026 21:33:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFX-0000Ep-TK; Mon, 20 Apr 2026 21:33:47 +0000 Received: by outflank-mailman (input) for mailman id 1287901; Mon, 20 Apr 2026 21:33:40 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFP-00077I-Ib for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:39 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFO-00CDCY-Ua for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:38 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b8e-2eae-0a2a0a5409dd-0a2a45028f2e-36 for ; Mon, 20 Apr 2026 23:33:38 +0200 Received: from [52.101.85.111] (helo=BYAPR05CU005.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bb1-af86-0a2a45020019-3465556f403e-3 for ; Mon, 20 Apr 2026 23:33:38 +0200 Received: from BN9PR03CA0384.namprd03.prod.outlook.com (2603:10b6:408:f7::29) by LV2PR08MB10983.namprd08.prod.outlook.com (2603:10b6:408:34f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.31; Mon, 20 Apr 2026 21:33:33 +0000 Received: from BN1PEPF0000468C.namprd05.prod.outlook.com (2603:10b6:408:f7:cafe::53) by BN9PR03CA0384.outlook.office365.com (2603:10b6:408:f7::29) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:33 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by BN1PEPF0000468C.mail.protection.outlook.com (10.167.243.137) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:33 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHw3S7bz1wdM; Mon, 20 Apr 2026 14:33:32 -0700 (PDT) Received: from BYAPR08CU003.outbound.protection.outlook.com (mail-byapr08cu00306.outbound.protection.outlook.com [40.93.1.110]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:32 -0700 (PDT) Received: from BY1P220CA0026.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::17) by LV3PR08MB9194.namprd08.prod.outlook.com (2603:10b6:408:21f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:28 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::89) by BY1P220CA0026.outlook.office365.com (2603:10b6:a03:5c3::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:28 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:28 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:23 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=JJB+zpvg33Is5t+iVLLZsvNHr1WK4sNhpdBNE8wTZLFMJpy2M6wrtruiw9/c1Zrk8U4lw+WQixui3SzSk2ABMPolKsU3hFDyVG7bsztwtU99J086emY7/U6Qde6oihBwzbF1tyO7RchDdh6mRj1YMTrGwGRhoJDSdstC8vuLK7TL1ECOfi67X4NKWkhqM1BB1tANE1AW/xQwPuLdN/fAOg6xQQ8j5Ucx2rJWt3JmnNp9lyZZcZqGBLUNQcaSgW7ywB62FYGWWyIqJmG0r17ZULppdXvq+Zb6lZQhzPe30mQoFcJeZufVgiKg5aOkVgyDGcSq6e5Jk36noWj63hipUw== ARC-Message-Signature: i=2; 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=cnj600JVTUzVmDZRZYm/XxhEOfEfbLwT6rVorqjJHgk=; b=j5QLLsH29Ygz9Ofz+5c3Q8Ndx3wJRU6nNcx/HUG9Ll9YgNHPCHtQNMgal3aRogjfr6RXm4hjSPbulE0LD7MSwFm2lF6mCLwyTNvh846+YK/Nb6Irq/2+pEo2ws0vFP1JdeG2VWPMSJJw2V9CuGbP6XlvqCIov5zwYDPF7n/AWJJDisN+aoV2N5rpblcHZ68q1XMSGtNe9hiwpIcldCqNKNJfHa4G3bVDW8Yb+89jFjNOlAX5NN89+9IvbeFbI1/IDo6qRsMozR0RiqC5vSZxrySslTi+Svxh4vZFMkPyN2OQQSXUT8L2VfCiFBYhfzZ1bq2rxMfqTq8+ra2zU7S4nA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.110) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cnj600JVTUzVmDZRZYm/XxhEOfEfbLwT6rVorqjJHgk=; b=p4NOPhWWsiNKaIDAn+U2JJsdEM8tOV/+vQN9rNudlMNjagrc5l2qXS5bo+65WGaZQiNNzWuevsrjaOuSFJl/TQotXkc9GHCi385oU5btAaSdMFlqJ5I8gQd6Chmxm0ykMFvazuA56K+1pVp4HMIdUgW90ZpRDjlJqcsdCv2iRiM= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.110) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.110 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.110; helo=BYAPR08CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gAoq5k4IBmF04J6fsmGSwpLrXgn0LUf2YbnY121YLg5KhpemshZUgB4DhNBtNHP/ZZUpirVAf8dXsQFBDxm+irIfKMsjLDXwt94CBtG/mlxOj5zzt9Qg8Nh5TONBpU4T99s98IU1Iy5C6wOMVvYGs/+lNNhbUMYaQGHCWFgIcveLh8Xs2U+k9+D6/Uk1et7dzLyQKV6RrzfvcEYj6fVUnat2rVUxrylnpqBrrst5pB7IjEIE0mbD1yQe3iJd12ZVoEzxYeoMDQQ1j1XXvJWjZDfKm5ntz9Fj/GtO8zKlcz121O9GtmtZ6k4ynYP6CY0EB0s6Oxywv9oLI5n8a3vP5g== 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=cnj600JVTUzVmDZRZYm/XxhEOfEfbLwT6rVorqjJHgk=; b=Hltv94F6HbC+oIj8bafCHTNeznL0zCEyugnz2jb5rhOi+2iqqhzCUCS9ENt6XiIjgzohpWAXEMj/tJIHyjvl9cUgJA4XHSHlEkzo+Rl05Nh4tc3lr/zJ89pBGoG0+2Z4gvqRQNH70KwCmEPnAdKwam5YYtVaPM8sf/3u2ic3WpWkwHopiCaCdKepw5FTXSqyFBOv5Bp+yv1VoxtR1dpTIzR2mOQHu6AGc8N4itl6icXoCqehD+gwkr2Wf6FdGWtc+geJdX8g0y32wS3gb5r/0WlW7E8g77ExnSsbIurYFhu4RHQ7bCycTwQGmkFCUJ+f57Ky9xV4OA7BqxJZ7s+Ilw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cnj600JVTUzVmDZRZYm/XxhEOfEfbLwT6rVorqjJHgk=; b=p4NOPhWWsiNKaIDAn+U2JJsdEM8tOV/+vQN9rNudlMNjagrc5l2qXS5bo+65WGaZQiNNzWuevsrjaOuSFJl/TQotXkc9GHCi385oU5btAaSdMFlqJ5I8gQd6Chmxm0ykMFvazuA56K+1pVp4HMIdUgW90ZpRDjlJqcsdCv2iRiM= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" Subject: [RFC PATCH v6 36/43] arm/altp2m: Add support for altp2m_activate_altp2m Date: Mon, 20 Apr 2026 17:31:59 -0400 Message-ID: <20260420213206.208750-37-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|LV3PR08MB9194:EE_|BN1PEPF0000468C:EE_|LV2PR08MB10983:EE_ X-MS-Office365-Filtering-Correlation-Id: af66887a-2855-4782-e58f-08de9f247970 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704162011799003|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?Uh2alZfI8cvY69ZRMp1rHjI9gRX1WaTVRGxZeB7MfyVGUqhQawb1mQMLW/dB?= =?us-ascii?Q?+WeqCV1FQsBBb+UAAeAi5ct3Icll+0OTgFq/7r+/aZspRrAxmPRIweHhWymg?= =?us-ascii?Q?/euLExSWYpxBsKti40DOoySJSkXT4Ytu6TqwOuze4P/leGWYWwYJm9INygrb?= =?us-ascii?Q?AGvZJtcYXSNy9n0SCEyHMfxmbMQALJuCRaIYRGTTIA80UrS29uCNf3DIilFP?= =?us-ascii?Q?CX+hb+KCHi75gklep7lz3UHYNOoaqc3TqETmUNe1wZLF+vYP2anDj8c89lLd?= =?us-ascii?Q?/4qB1w8vFn72IBHRJr17AV6mWyTeibz7azfv20egypcUV0o96zN5GcTyVUfh?= =?us-ascii?Q?dvajhWTlxXDVqNWl1ybwslBygBHXfNIVEPAc3c4YusM1BC/QBjfRafMZcyDP?= =?us-ascii?Q?9pNbS4PbI69LQ+qE9Ki9BwUgdgTe9T4NVnAP13sxaGitt1H6bdz6wyZu5rfP?= =?us-ascii?Q?zVFd0rQLjNqofWC/nLDIXNHc6+5PsTXT85ci7Sf5kEBSOP2Fj+nPgN4O3uUx?= =?us-ascii?Q?4VQheZ1xQu2i7x27kr32Ee6bdDD5Hae3Y4SQFSjn0FLtIPSQOQvBPqVf9A7I?= =?us-ascii?Q?hSZebGKaRgBeEYbDqkTLli5s6SZtD0ucp8jK5cPxtY00a/LKPlcUBRuFIBN7?= =?us-ascii?Q?Ct5FPIbHtdxVMzviwbNRY+y1BkzoUnAA8UPXd4PyAX/mQidJQMeFyHd3fr+B?= =?us-ascii?Q?56omWv7MFhJ/Q0LGzHnlUwbwrryfF0//U6feIH863nIJYqrIJ9ejEIDR8YP7?= =?us-ascii?Q?7GRfRdhoO4gfZGU7bUYbSi5k8q7vnmagVXHKdINCWd5J47UNdVS0k3qc2Vdp?= =?us-ascii?Q?44yembUdUsi56iivuYjLASMUcgwVSiAwF3ZD4x5V4IF44PsGp3dNop9pKq1G?= =?us-ascii?Q?/ypI9Zge5gi+Q1Ak6+TxDULMZeOG1UXpN2PdKWkutzgfk3DgmrQFBVfUdZEJ?= =?us-ascii?Q?HFigu/LYhzisNkoRyIqcaoByO2QioSokfU95USGxFvHxncYX8tbx4jInFrws?= =?us-ascii?Q?YG//SlKlQnU9OXJQWcamnPVNhTZ6Orx71e7OV2YaMYdMHymSr9YOaP+Fa2Sb?= =?us-ascii?Q?Q51bheCl31Fxb7cNlMxWwDbcfbR4FuuX3etzl/q3UfAd2dD0RwSld6eJ4g86?= =?us-ascii?Q?R0B/Dia8N7sjQFflJe8Q4FTacR6fsnN89g=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704162011799003)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: oM0N2lnKFcIFmgc6J4Uw3Cpnbg/mLsvjjUGL15U7MwGZYGzDY6JN8QXyuGfSYjDHIj31paAyq7/tyov4naj90+z85U/nIT16OWjFLu/AJ8Th7N0NCbcX2Mijs5138+MPhRXFq4QAmZ4Kamne2y7fl85tgIu1CmWK19kaEuIvxm7qh8nDfHuh+T1F68kxoMbk2NXHl/NzYwZpxcFjmRRG3h1kQAiJtpRl0rSw8lyF7c+e7s1/QG5NQFPgs2o9Z9Afi7XSL6Aem/onp1JWX7Vt4IKoN/ERPIRM/mKQzZds0l4cikYBJVrYaxV36VkQKnmDlmbYiiT05GTainCw+zG1yw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR08MB9194 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.110];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.110];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1PEPF0000468C.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a30719ed-e8e8-437e-8cd8-08de9f247630 X-Microsoft-Antispam: BCL:0;ARA:13230040|704162011799003|82310400026|14060799003|156008|35042699022|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?UaOWSU4C7gtwiy6SYLuHejsLGVBMfrgtLOgRL1QL3plnvxesoD1dVxrIC2ow?= =?us-ascii?Q?uPQDgq89tvFFIHbPVVkGV6JK1JsmEJ33OYGhBGQ1+3SLF9VlADZA0VaVOS1q?= =?us-ascii?Q?gbL3YgMC+z6/izaP0588i/k/vgoY+8kv2FOq5FvxS8H5XispyB+v3NcbBY3H?= =?us-ascii?Q?6SFuL1WUXvMvUwPyR3mJgR1e9cWj0yMh7auAb4mGBxZ9u47B16dkv3oTAOGV?= =?us-ascii?Q?EjZGcqpPUdOGgKueNsj6ggCR6cr3d7OKZoKxrN6sV4u/sMSSdFxgwkvfyx0b?= =?us-ascii?Q?X0Bny37KB+NDS7o8XXuuiXP9l7KuSl2eNpOA5yQmJd9Qa97crZbw0BHEHW0b?= =?us-ascii?Q?XkK+n8uLMx9qiQelsLBuGoFyXYYKP8irTNF+WR7S1N+BjV+/PzVnNvMFNEXO?= =?us-ascii?Q?HoRkHQ7Hvk76dR7+uYupBoBh/4FUPS/O8QiTM9FBTMnSDbdPH0sdtptflI20?= =?us-ascii?Q?xxFTYXiOHHlluXr2oxps/e/4r+uCLsZLrCu7cTMN/z+c0AVkg/QE5UpAAMw3?= =?us-ascii?Q?mmmW+rXa0nx3pTrpQURRsbPjtaXMPSlYiP+jL/js6lCQrZTibJXF6T+hE2Z6?= =?us-ascii?Q?rNM6UW3ZirJFRkesCyXwPqd510UFKiLY2XHz+C8Nzc6HyzriYqnuqKOhM1H4?= =?us-ascii?Q?fXkbTbWsQls8zTwfArJ4t2swVAVOZ0m1u3c4QHop4tIvqdr6oBzn+IzskLYj?= =?us-ascii?Q?s5Aaex7oTZ4zMh45MU1CobyQsjg1ZFedhNPyUyAJNjNCvQYTF585jSCV0NRt?= =?us-ascii?Q?XxcG6uapy0tLLoH79t2ZtEXV8ntBlQVME1vxAqxzXf422mb6vficfR0BRzqm?= =?us-ascii?Q?F6BcrQmx9bz+CfWMf9ys2u7Qg9SM9JrOQjO0z0gJiju09fq511CRLA5U8iu+?= =?us-ascii?Q?heTVv9keNbjHHadPy3usBrHmk2H4qxDJ1WHNPbd1t8CeHPn69Vrgol2Gn0G+?= =?us-ascii?Q?PBOX/d1gJUg9gXfZJZDDtabDodUZaks4CpBB54QPbcRYxIG4U6EryoiQzJTD?= =?us-ascii?Q?vUTASNXg2kZfSLijDyxoISn5M4chpH7ICy5X0IxjNjgv8aghXDBa/iuSLq7A?= =?us-ascii?Q?qytC9c72F4TDytF6XI1M8StJhUTI20cAk30CwfsGhGEVROclpQr8S0KyEqBK?= =?us-ascii?Q?fJjk3cerEJiyEaSCFufTLAVxpHI7kYWd0A=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR08CU003.outbound.protection.outlook.com;PTR:mail-byapr08cu00306.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704162011799003)(82310400026)(14060799003)(156008)(35042699022)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bf0ohAt3Rm0RoME2wmygY4/sAg1U4b/ak/eQexf2qA7bw5oP0Gj2MMpTYguV7xOIFY2TqYJjuqkjQovz61i0akbe9SRv+C2SPuxR8wOxL2djbIV1ZhwCYoeSW+Rh/4srsT0AImwiDfaYe8ci2JtmgB4HTaMdn0k06RiL6Kgrnwf7ql8d3EDMz5YypAi7t6ODG/1dUcCzbiFrLaRdVaSR140SbwUPLb3nSsSgIaHxnqChP7HY38ShUfMDrJog5WfksgCF2L13KTwd6CCP/2WoZ6dDtL0oDUjFOAyskzqlCE2vbH+wwyPO2latl2A6GdnSrw7ZVbkEFokPsnR3uLDfD/lmqGhX8EnReEMzt+EmZOWGZX2J/J6i2+4YFiiQ7HEMVxbHUn0MLS0uS4EvdO2lSBzsbhRUyssQ9KaE1k8ynjB6b+lVEsBy/tj7hYkWVukO X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:33.3646 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af66887a-2855-4782-e58f-08de9f247970 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN1PEPF0000468C.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR08MB10983 X-purgate-ID: tlsNG-720697/1776720818-884D5161-1D4C7D6B/0/0 X-purgate-type: clean X-purgate-size: 3042 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720857442158500 Content-Type: text/plain; charset="utf-8" This commit adds the altp2m_activate_altp2m function on ARM. This makes it possible to activate altp2m views in common altp2m routines (namely, altp2m_init_by_id). This is commit 2/2 of the altp2m_activate_altp2m phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. While the ARM version of this function is very similar to the x86 version of this function, I still think it makes sense to have this implemented on both architectures instead of using a common implementation. A significant portion of the function would need to be #ifdef CONFIG_X86/#else CONFIG_ARM gated (like p2m->min_mapped_gfn vs. p2m->lowest_mapped_gfn on ARM, for example). This would become even more of an issue if other architectures implement altp2m in the future, so I think it's best to keep these architecture specific. --- xen/arch/arm/altp2m.c | 26 +++++++++++++++++++++++++- xen/arch/arm/include/asm/altp2m.h | 4 ++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/altp2m.c b/xen/arch/arm/altp2m.c index aa48c17e11a3..aa56b3ca79b5 100644 --- a/xen/arch/arm/altp2m.c +++ b/xen/arch/arm/altp2m.c @@ -37,6 +37,31 @@ bool altp2m_view_is_visible(struct domain *d, unsigned i= nt idx) return d->arch.altp2m_state[array_index_nospec(idx, d->nr_altp2m)] =3D= =3D ALTP2M_VISIBLE; } =20 +int altp2m_activate_altp2m(struct domain *d, unsigned int idx, + p2m_access_t hvmmem_default_access) +{ + struct p2m_domain *hostp2m, *p2m; + + ASSERT(idx < d->nr_altp2m); + + p2m =3D d->altp2m_p2m[array_index_nospec(idx, d->nr_altp2m)]; + hostp2m =3D p2m_get_hostp2m(d); + + p2m_write_lock(p2m); + + p2m->default_access =3D hvmmem_default_access; + p2m->domain =3D hostp2m->domain; + + p2m->lowest_mapped_gfn =3D INVALID_GFN; + p2m->max_mapped_gfn =3D _gfn(0); + + d->arch.altp2m_state[idx] =3D ALTP2M_VISIBLE; + + p2m_write_unlock(p2m); + + return 0; +} + int altp2m_set_view_visibility(struct domain *d, unsigned int altp2m_idx, uint8_t visible) { @@ -66,7 +91,6 @@ int altp2m_set_view_visibility_locked(struct domain *d, u= nsigned int altp2m_idx, return rc; } =20 - /* * Local variables: * mode: C diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h index f8d0dd799a4a..192240f48c33 100644 --- a/xen/arch/arm/include/asm/altp2m.h +++ b/xen/arch/arm/include/asm/altp2m.h @@ -48,6 +48,10 @@ int altp2m_set_view_visibility(struct domain *d, unsigne= d int altp2m_idx, int altp2m_set_view_visibility_locked(struct domain *d, unsigned int altp2= m_idx, uint8_t visible); =20 +/* Activate an altp2m view */ +int altp2m_activate_altp2m(struct domain *d, unsigned int idx, + p2m_access_t hvmmem_default_access); + #else /* CONFIG_ALTP2M */ =20 static inline bool altp2m_supported(void) --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720863; cv=pass; d=zohomail.com; s=zohoarc; b=Di8c+11IgSwQRD62w9ClAqFWIC41z5IzTDlE2J4wQaqWoyZdvEClI3z2uadNHFwZP0cSyKYxxfQIHxVMX28w5/OkRM3UlNGNxTtAnaGlTHDiBSuWPjlyhe1xe5+vDPEIECju/xsePBEtSDrZUJRQHDqcM7ZcwaR7UdAMvpszLYQ= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720863; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DZVQd2YS2Dc072OkbjYDsSwvSmp2EL0f2N2Sbux/YCg=; b=Qra9eMY5yI6xoMIc95dTR4vhk6NEvUNnsI8678Hj3orL/gE0X3aHAd6BjfFi/t/IhyiOKmp05hdkKP6VIRpZtYnDHwUwgiDYw/j/LYAp2u8cXhh9hjSXpL/mC5bDpA5ggsOlEV62j77sFO1H6nhV+k6XFyzj4saUM2BCp7Al40I= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720863452308.4135730475226; Mon, 20 Apr 2026 14:34:23 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287912.1568366 (Exim 4.92) (envelope-from ) id 1wEwFf-0001M0-A3; Mon, 20 Apr 2026 21:33:55 +0000 Received: by outflank-mailman (output) from mailman id 1287912.1568366; Mon, 20 Apr 2026 21:33:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFd-0001Es-NZ; Mon, 20 Apr 2026 21:33:53 +0000 Received: by outflank-mailman (input) for mailman id 1287912; Mon, 20 Apr 2026 21:33:44 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFS-0007ki-Uv for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:43 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFS-00EgCp-A0 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:42 +0200 Received: from [10.42.69.5] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b1f-e002-0a2a0a5209dd-0a2a45058304-48 for ; Mon, 20 Apr 2026 23:33:42 +0200 Received: from [40.93.201.107] (helo=CY3PR05CU001.outbound.protection.outlook.com) by tlsNG-c201ff.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bb4-aaa8-0a2a45050019-285dc96b9428-3 for ; Mon, 20 Apr 2026 23:33:42 +0200 Received: from SA9PR13CA0177.namprd13.prod.outlook.com (2603:10b6:806:28::32) by PH0PR08MB10977.namprd08.prod.outlook.com (2603:10b6:510:386::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.30; Mon, 20 Apr 2026 21:33:36 +0000 Received: from SN1PEPF00036F43.namprd05.prod.outlook.com (2603:10b6:806:28:cafe::d6) by SA9PR13CA0177.outlook.office365.com (2603:10b6:806:28::32) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:35 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SN1PEPF00036F43.mail.protection.outlook.com (10.167.248.27) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:35 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHy6KrSz1wdS; Mon, 20 Apr 2026 14:33:34 -0700 (PDT) Received: from CH4PR07CU001.outbound.protection.outlook.com (mail-ch4pr07cu00106.outbound.protection.outlook.com [40.93.20.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:34 -0700 (PDT) Received: from BY1P220CA0022.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::14) by SN7PR08MB8567.namprd08.prod.outlook.com (2603:10b6:806:2df::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:29 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::5c) by BY1P220CA0022.outlook.office365.com (2603:10b6:a03:5c3::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:29 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:29 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:24 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Ljlm4EOKSp3cm5SZ/LDxSZnszcH6gQ0HmAyddQCrs9gAom86BBAeFpWO0zfDExQxQy4loLUWDMi7e9PcdMCOgO1a+pifhvT9EUYPcA08W2davzoYxxxZqU8AyUBM7vFhE7TdArd+BxC47suLrH+pv76oeTqrfj5J3Eyox4k87SBkbVjzcy0sKbD8sQulkjNfwf+gmAilex3Ud9Hlyexafo8VRjPfOh5Ho0QFnxz+/VlyQoX9klRAvm1RZ6V6vru5bYmkblEbFRpClUEUyh9y6EjfElnxDbiO371zCgzs12pkpZfhJLVwA5i4XX5mxQwH7Vs4zE+zeDlNfPgQ7CJmXw== ARC-Message-Signature: i=2; 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=DZVQd2YS2Dc072OkbjYDsSwvSmp2EL0f2N2Sbux/YCg=; b=i4L21idI0hr2NGqfQmDBrWdKBFLvn1Dh2iTGl6X2ilN/TAsmBZhXTPLXaI6HNsy0n/xA7qjQ+5PTO7gl07TX46px8tL4Sn+MrxpEyQ51gUyNSjILkIJYiXCe7/Q9IGyRLqTsNWa7E0PNPtoCl6SWUTgHaOQkWn8evImfI2/TIPNAelGOklVf1FQwNJwv1DOt5Y3o9TR3aVKmEjh3oaEQEckSYjA1nf+XeizGQk+7i58bIoUU4H5puAOJbVflamb4bGryaoJrjaEb8IB7kMV8frlY0E9igtMc4wgdsN3kXE7YDQF3a06fI47ZwrU/29tTeWj5nKm7aNx8YBICGtPxcQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.20.102) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DZVQd2YS2Dc072OkbjYDsSwvSmp2EL0f2N2Sbux/YCg=; b=Iu88YjuAAjpjYXAf3GQqXUfa8Res77rgz/hiFPROKkZwWyXrP4TuHzVefAoNipDLXd61lVKirsdi8A814BHkfFLHfONXREG3oH9nQ9furbPEQGaPzQAW0t5Nj0zWHi4yUZhlhZ7xEPdSf7QnuO7lE+EN6FFeh1SN8eh5zBI3fjU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.20.102) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.20.102 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.20.102; helo=CH4PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=G3kS4OWo3p8fTIR0139thXroFifVHuZqb36sJyOhMyfW8dlsdKhtU6XiM/potRkwd9fkUv9N0nSmVVh7jNiAXnJqOabvF4lkKpo8JP93uQijwtaAfkTkAP320c4nP3PAqgFs++/gPMrcurb8J3yrih8okouTYe8z+9XtxVaOhQQGGW4n5VXjCSOTlSOg3A3vJU2ubs5gEhKKzfWZRXCSYCTizI+CY7Yq0/u9YfnBaO7gH9+uWTiLqkczMjmhT/lAhnq+2z0YU4EI71Id3Gp/QrYvLejeHOpu9zf9hBjqYDpOATRQWF0pBg3RXfhHFQ34G7v3AkG/C4r2YKfHwjtDPg== 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=DZVQd2YS2Dc072OkbjYDsSwvSmp2EL0f2N2Sbux/YCg=; b=vqDebuhy54vfnb3FugiQZiBdkLg5jIs3OaZaF3Yjj5ACnQhpdV43wqvFRHxCEU1F/pFBuzQAFgHKw2IyoLH/JdoCl3ugDTPZQ1MOpbqlf4XAEZmLp7U5gxasU/pcKiu2nUDzyhVaI/331xTt4jmed0Q+hLY0S3Eet13UgRxIJpOtXtqHPxlvLG4fXSeJlPL5XjrZQuohJyqSvZEZRUs07ISICTr/nPl5cNAftCyTVyNZ/lc14pQ6CWXI50IP1g74NaEU0bxh4xeBwKakx9OuT+N8GoxywwAfilEfoUlaLRfryGJt3FlfRUl7v5D5WbIczyyw3c+rHLQI2KYfNyS2LQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DZVQd2YS2Dc072OkbjYDsSwvSmp2EL0f2N2Sbux/YCg=; b=Iu88YjuAAjpjYXAf3GQqXUfa8Res77rgz/hiFPROKkZwWyXrP4TuHzVefAoNipDLXd61lVKirsdi8A814BHkfFLHfONXREG3oH9nQ9furbPEQGaPzQAW0t5Nj0zWHi4yUZhlhZ7xEPdSf7QnuO7lE+EN6FFeh1SN8eh5zBI3fjU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Anthony PERARD , "Michal Orzel" , Julien Grall , "Stefano Stabellini" Subject: [RFC PATCH v6 37/43] altp2m: Move altp2m_init_by_id to common code Date: Mon, 20 Apr 2026 17:32:00 -0400 Message-ID: <20260420213206.208750-38-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|SN7PR08MB8567:EE_|SN1PEPF00036F43:EE_|PH0PR08MB10977:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a37290f-1653-4e7c-8514-08de9f247ab5 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|36860700016|1800799024|376014|82310400026|22082099003|18002099003|56012099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?hP7URVA0guEQCAc7FnuLxFh9+3PBy7k7ZVfc2rX9DEyDmvKGDAJt3ZyrvaZp?= =?us-ascii?Q?V4woWnp6R+ErPEbPhQ+JuQfMEX17Wayx5svwXkIY3SdOnCgla2z4oK7wVD1I?= =?us-ascii?Q?03CMblZnhJwvi32e6Nj4y/yOQ14JZ1YfAHUfAIt6/Cs9excU0nkwhJarkC1C?= =?us-ascii?Q?rO2H4tRrveS2dF/Sf1lGc+V9ajAxy8y+tDS3ChmyDL/dAxPdr2g1UJ4Y4DGv?= =?us-ascii?Q?sPSwU39yH/ke1y9qgXge5Gb5m/t0C4ubPK/JKe0F4/44AjD2h7x/sxa466VV?= =?us-ascii?Q?7B28uKgFFa1RvvW7cvc8TfbrflYpG0WizGG87XNcKT7bC1bd8W8N32TElZpz?= =?us-ascii?Q?ZJQcmugpDxM2jX64PscuvQCTYExw8UtQFth7r/JnYEat6UplMOtEFOC4BRnz?= =?us-ascii?Q?svQXrF8O0yAEFuIQY6RNE1zL+jix+d0X70p+U0oW908VgiZm36YK+aclzKuP?= =?us-ascii?Q?ZAPrvEkzWWAA8qRe4d1g2wfFNBXAh9txEf4kOx2L8bRGHvzWWl45pZLAa9HK?= =?us-ascii?Q?cg1Iyf0BvhoOeenzVBL9wN9013IntVJg2asyeehsbageO58vfARU6bjnq4G+?= =?us-ascii?Q?RrYlR+Bgwq+PQry+j2dLfWoKMIt4/m+v4FBBifRmbywtLqn3HvnqxUJZNexG?= =?us-ascii?Q?VeXPccrR1Gn95OQsTB2y4nDngbomTti7f3YcmgLTvu3B7HoX+7A5qQbwgL61?= =?us-ascii?Q?+OELo+nSEGiZ+cTKxe8nq/y4EzfhCMaexpfg0gPGW2C/xf4yJXaM5Mz2U0ax?= =?us-ascii?Q?wj4isO58/laLLD/gI5DY1R8FWFOvXliaX/UUQvnlnOLxUdlP2waF8S64U51C?= =?us-ascii?Q?c/PP+PN6xQLYZjydq6WeZ4JWHsIzGSeDIOBBKNDMAxnJAqQALGgsRRYHI920?= =?us-ascii?Q?ImToeuVNqZA2vEQtfuuowXy8UxEqx5nkLuQdwZlTKvkuGTLOTsID5Whm2bVK?= =?us-ascii?Q?8VxnGfQOJANAHG4YDVS6TPc6IZqpz1UiGRBel2janAy2ur7dTGSN/FzLFaq5?= =?us-ascii?Q?qoiExsTmd1jIR9sBS5aGJr2QcOyfkM4UCV9LwtN27DAhhNn+nL3OG0/c1trO?= =?us-ascii?Q?gdjvzY63qSSZdSeUmb5ArVzCvwnqboOyeUeKKbV+ld1R13Qw4QPKG2vq9GCA?= =?us-ascii?Q?dEcsKRs+YtIc71QrUF2glASHlLU3An6sn+dHoEs/g6jwOXFZLk9w5FcT44Tp?= =?us-ascii?Q?znF3tb+hnGdjRAyq?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(376014)(82310400026)(22082099003)(18002099003)(56012099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: tD9/qEw+JhmieIDN2pfGL+ETUqDTWh1ZtrjOOEqUNpAIrWyYftOPdJ/IhtcarlggVw1gz495dfo/MBN1y5ZEQb2WAQRqwikBzhiX/ypEZfZ+XfRKYAP+YB163Cq2xtwTNTFLjzPn4euMLrt5/1rifxepU06wqwEaiFaZO2KkLF8QAei+uAb+qD2vaJ5Snpn6QXwlEkPZ6C68loek5Jinn7zq3Q/Uuxfki7RLBdr6S8CJZehX3VzIjbxr4o9VN5Vjl7h0KaZ4vJksRQ74Re5ym+CokhdU+v6HKecmIVAMG94F5NeHujpE+2Mj/4Ke8z959zkfb2kq37YeibShRytH/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR08MB8567 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.20.102];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.20.102];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SN1PEPF00036F43.namprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ee3fa23c-ccd7-4b65-565d-08de9f2476d5 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|14060799003|35042699022|156008|36860700016|376014|1800799024|22082099003|56012099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ObGamVGL998btlbAg7JkzVlvVRx2cq25P7AwURJSPtNx+SWeoAjeUWQbFBf1?= =?us-ascii?Q?SbEi90wwVHuwQlaWvQ22o4yWD2o/DAtLQbbFrmP/OxUAJ6etfpYj4qkyBy8Z?= =?us-ascii?Q?KOjPVFz3COpaNxl6MsnUh2JSG7Pr0l/5jMPb/lJwDqK6jIJQB8nspVcEerDh?= =?us-ascii?Q?g2JP5dS6tqmYOpJyRv/+fKk0zINWFnp2eIUQah9kjotJcaHh0ntHWaweikA6?= =?us-ascii?Q?FJ5jQ2yThD5Om8Ias77ci4Pec8FmMCpf0YDGzWhvvEUqBmP+136kjJZ7Jxli?= =?us-ascii?Q?nur9eESvKYN4wdRZVxfId3yNTzHJs5kdvB3GeMWNW0ZcYfRHKauZV3zNeMG1?= =?us-ascii?Q?dRJEmGk2sgbeCcrZM2PRAqpIL9NmpU3rDedzPNacccp953SrVyOWy4sxHs8p?= =?us-ascii?Q?R0mzrWWR7LNW1OQWEg0M57mJatlRdMh3io8g8mfzajRcM4hBWTAS7s4UzbEc?= =?us-ascii?Q?QYQjS0I6wPxvXdJV0bX1Vo3xD9iOOjWLfrFdVAnKf81DFNEWQiVgj+REnjJM?= =?us-ascii?Q?PH1VLuzFXNzfR9O6do9uajCH+LvfDgs/vkgsEV32ntR7kb/5NoOyI+nKgts2?= =?us-ascii?Q?JFGt3dRkc6UtI1DwZ+Q4wyfSdTE1o+pJlBXzynaJ/BysVFa+j50lNc4bkdrY?= =?us-ascii?Q?+HqQtF1cHXJgTXmuWTbayYUe9qY/B33PeSSQDUhZfq4jH8I7nRQD6jxnRdia?= =?us-ascii?Q?J7dF1rAPDiBjpM4LTMOt3xqw+OO21v7Tlx3o6pXO2JyHfynlTGbwHp71ydl0?= =?us-ascii?Q?Tm9/Mnv9fnWSbpGSSk+O4tyMnDJSw5JHQlwqtCmtRdVC06630uSmekMjbh5X?= =?us-ascii?Q?wKi/ng/5e3g1u5kQ8SyM5qx7mvu96bhwXlltT6gHHQAswxjPdVGGs1CinKOl?= =?us-ascii?Q?ShgVHrP4AnHtpuHbTmBnhLP6/ObPXnXpu+BjtBHp/8QoM1YiPlRFSdzZ2N1c?= =?us-ascii?Q?4P//jbcdr0orC6x31Aev31zgIiMThrngyeUcJwVZu5bPyUOrIUTC2Q+Mf3H8?= =?us-ascii?Q?db+80hsb+b/JfMDcBLwJ6NiRTkjhcYwCo0MPxYTiD6TtrYupWbUSr1wfV3dG?= =?us-ascii?Q?oka+2jmveDdwd8WigZhJAc5HnBXxW2A67vM4qlwvvuc2MHYDARmBSAETQuPR?= =?us-ascii?Q?aPnvRSTuQu4vEVjbLjifxW/v7QzyqvGoiQvX933s/bQebpf9RaDMZzH+AFcv?= =?us-ascii?Q?tNVVFwnJA+/uNv4R?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH4PR07CU001.outbound.protection.outlook.com;PTR:mail-ch4pr07cu00106.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(1800799024)(22082099003)(56012099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: js2rb0kEPM0sJ8xRqcFhO9iAKNOeOwUSTFrnPrRurizc/Zah1m5+7uuwqYyKdv5T8pE2VK2b2TpGnnfMcJWa/EoaUCpe4J0MZLCxApY1Y8ENFsgp6yYFqzXNP2I6h6+gCl43D7/1nn+wfmzKDgYhFQGWFVcxJlRIzzHzaelFkuXEq0fMiytne6O/SSR2Dd0ZRGDSJzi3NkSsNfHYQiMIrAMYHQUP9LWip2JI+qqfMdwGzCp/5ETuaVALU3Zy7v0ESdxH4Hk3iMwOIOstWEZB4SWRuI/rv4h685uib+VqC7B7g5DxSt8CcftOmoD48aawmjz0NJZjJDLiCLLxliDVSboLh6zLuVFVqrK3L1mx/dyCoWA5E8fjeqTndY+zfrVMkSf74RZWaWEC0nV/L10OKSO5mH+dmBAsfx0PXXS1+fIDyT33K6SvEVAvFAHaHelg X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:35.6551 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a37290f-1653-4e7c-8514-08de9f247ab5 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SN1PEPF00036F43.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR08MB10977 X-purgate-ID: tlsNG-c201ff/1776720822-2AD6F443-89CA8B8F/0/0 X-purgate-type: clean X-purgate-size: 3657 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720865526154100 Content-Type: text/plain; charset="utf-8" This commit moves the altp2m_init_by_id function to common code, gated to only compile on x86. This makes it possible to call in the common HVMOP_altp2m_set_domain_state command implementation. This commit contains only code movement, and no change in functionality is intended. This is commit 1/2 of the altp2m_init_by_id phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/include/asm/altp2m.h | 3 --- xen/arch/x86/mm/altp2m.c | 18 ------------------ xen/common/altp2m.c | 20 ++++++++++++++++++++ xen/include/xen/altp2m.h | 5 +++++ 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index 203dba44e2bf..e7239326c71d 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -85,9 +85,6 @@ bool altp2m_switch_vcpu_by_id(struct vcpu *v, unsigned in= t idx); /* Flush all the alternate p2m's for a domain */ void altp2m_flush(struct domain *d); =20 -/* Make a specific alternate p2m valid */ -int altp2m_init_by_id(struct domain *d, unsigned int idx); - /* Find an available alternate p2m and make it valid */ int altp2m_init_next_available(struct domain *d, uint16_t *idx, xenmem_access_t hvmmem_default_access); diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index 40c6ea72a621..edbaf54c3761 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -315,24 +315,6 @@ int altp2m_activate_altp2m(struct domain *d, unsigned = int idx, return rc; } =20 -int altp2m_init_by_id(struct domain *d, unsigned int idx) -{ - int rc =3D -EINVAL; - struct p2m_domain *hostp2m =3D p2m_get_hostp2m(d); - - if ( idx >=3D d->nr_altp2m ) - return rc; - - altp2m_lock(d); - - if ( d->arch.altp2m_eptp[array_index_nospec(idx, MAX_EPTP)] =3D=3D - mfn_x(INVALID_MFN) ) - rc =3D altp2m_activate_altp2m(d, idx, hostp2m->default_access); - - altp2m_unlock(d); - return rc; -} - int altp2m_init_next_available(struct domain *d, uint16_t *idx, xenmem_access_t hvmmem_default_access) { diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index c234bb3774f4..9f5f98e1e8a5 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -106,6 +106,26 @@ void altp2m_vcpu_destroy(struct vcpu *v) vcpu_unpause(v); } =20 +#ifdef CONFIG_X86 +int altp2m_init_by_id(struct domain *d, unsigned int idx) +{ + int rc =3D -EINVAL; + struct p2m_domain *hostp2m =3D p2m_get_hostp2m(d); + + if ( idx >=3D d->nr_altp2m ) + return rc; + + altp2m_lock(d); + + if ( d->arch.altp2m_eptp[array_index_nospec(idx, MAX_EPTP)] =3D=3D + mfn_x(INVALID_MFN) ) + rc =3D altp2m_activate_altp2m(d, idx, hostp2m->default_access); + + altp2m_unlock(d); + return rc; +} +#endif + /* * altp2m operations are envisioned as being used in several different * modes: diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index 37c875a52327..cd96c3b4792a 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -71,6 +71,11 @@ static inline bool altp2m_set_altp2m(struct vcpu *v, uns= igned int idx) =20 int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(void) arg); =20 +#ifdef CONFIG_X86 +/* Make a specific alternate p2m valid */ +int altp2m_init_by_id(struct domain *d, unsigned int idx); +#endif + #else /* CONFIG_ALTP2M */ =20 static inline bool altp2m_active(const struct domain *d) --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720850; cv=pass; d=zohomail.com; s=zohoarc; b=IaTTF0c7x88T/SBypWmvIOJGaOpyDTQE0afSZ4d4inJzPKTL7cI4ADpCd2fj/E9+ZX6h3biKTSrPW25/PETjMhIucn9CImH89NPtTb0Krm4OrYar36n95UzCGWhjwcvoimD9VrMp1Z/CmurdFdYPDJqGNlst8KZMLzoLqXEThUE= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720850; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+mqQCFvGSShVoc1hxR4OmlozNt7Xc1M2crX/MK/P+3E=; b=JXmw9Q8UzfMm8Tro8vKVKKB8Kv2QG0e/PSKKJ0hPQjYwihOBuUNdTUPaRLPhRPI+FYpc+qXMFCVjhqTj9oVD5F7MDcbSkU6gS11GfF2dgU2q/z6btytSVMQiEInh0YObMgYzSp5Qr4o4Ovo2fEYnMBYq/syhnTME12OfNISg/fc= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720850128803.1344752983149; Mon, 20 Apr 2026 14:34:10 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287906.1568359 (Exim 4.92) (envelope-from ) id 1wEwFd-0000uc-Ea; Mon, 20 Apr 2026 21:33:53 +0000 Received: by outflank-mailman (output) from mailman id 1287906.1568359; Mon, 20 Apr 2026 21:33:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFb-0000oR-DP; Mon, 20 Apr 2026 21:33:51 +0000 Received: by outflank-mailman (input) for mailman id 1287906; Mon, 20 Apr 2026 21:33:42 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFR-0007Sr-6k for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:41 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFQ-00EgCp-HK for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:40 +0200 Received: from [10.42.69.11] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b9e-e002-0a2a0a5209dd-0a2a450be734-32 for ; Mon, 20 Apr 2026 23:33:40 +0200 Received: from [52.101.52.87] (helo=BL2PR02CU003.outbound.protection.outlook.com) by tlsNG-42698a.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bb3-212f-0a2a450b0019-34653457c753-3 for ; Mon, 20 Apr 2026 23:33:40 +0200 Received: from SJ0PR03CA0097.namprd03.prod.outlook.com (2603:10b6:a03:333::12) by BN0PR08MB6920.namprd08.prod.outlook.com (2603:10b6:408:12c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.31; Mon, 20 Apr 2026 21:33:36 +0000 Received: from MWH0EPF000C6185.namprd02.prod.outlook.com (2603:10b6:a03:333:cafe::af) by SJ0PR03CA0097.outlook.office365.com (2603:10b6:a03:333::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:35 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by MWH0EPF000C6185.mail.protection.outlook.com (10.167.249.117) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:35 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzHz0WFnz1wdW; Mon, 20 Apr 2026 14:33:35 -0700 (PDT) Received: from BN1PR07CU003.outbound.protection.outlook.com (mail-bn1pr07cu00307.outbound.protection.outlook.com [40.93.12.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:34 -0700 (PDT) Received: from BY1P220CA0019.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::15) by DS1PR08MB10099.namprd08.prod.outlook.com (2603:10b6:8:215::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.30; Mon, 20 Apr 2026 21:33:30 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::6c) by BY1P220CA0019.outlook.office365.com (2603:10b6:a03:5c3::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:30 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:30 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:26 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=q5eh3nY18OETb0x5CzmhK2gh3rJ5UHCk7B3NbxzsIlfpG/12JqVNyJkyMhEq9qAKUN02uS7iL4txF0F5ta1U0povTkfjpL8/UcK8tM50NBDDZjHnoibF8zxa78GpvKA3vDedZAAaPlE3WaDLiQMXcghQEJuLFTVaPkXKniRHCUvMupHKuGPkrzeUeicaawEE29G0OPwt7ne5aGByTMigQ5MX/2lLwCRS0qRaoaMS0D3xG/n2B29hMVzCTunkDFIA80DTzWkHKZa9ZOF4pvDcRzsN4NMPiwzxoBWcp6ShbDtCE/9euYzBfmQ0S2e4iNAzetM1jlAFc2QQemt9vQKqMA== ARC-Message-Signature: i=2; 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=+mqQCFvGSShVoc1hxR4OmlozNt7Xc1M2crX/MK/P+3E=; b=xvaf4xOdNdbwG1AWjZkpkO7qrbMOd3QI8Hb4NIThX4LoNZ/emn6o44hWZklf9bTpoLhETwvf8455hW4+gbPquPv6WJBSCxMAJHDMiLPsqvTawiQ+w15xf60pDgvm4SAOpYDzdYUkkS339gPR9oPBD/jl8C/TRiVffOXBLrfTxQcFH/H7NVfRtISopWVkfTt2vAYu8e9vr6B7j8OzdHyOoxj4pBHB26E0jpUakcoHeIle4a1dOTKVehvKtSXdqjdkdQ1YgStdl32saG3ld6VPLImqm0pHlvHVfFoN9LFnult/XfJ45DdcTWuxS/0Ex9z3ZX90BZRBygVMW+GMdJ/bbg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.12.7) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+mqQCFvGSShVoc1hxR4OmlozNt7Xc1M2crX/MK/P+3E=; b=iKhXIE8gnOu6bVbwCbc2pQ9szkdZudhqt3XNLdIH2zsp3YL2pb4ffNL31xtwO4DzXYC/zA81yCpgjmwPpcfKVodqMC3TdTlDv9DMW87M6bCNVCYO4Ldh5zYQ5+sTD3FvA0gBS+M1hHaKNqHSJW60iKJ0b4I6XgyGCFCEJQMSK0k= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.12.7) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.12.7 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.12.7; helo=BN1PR07CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vmXL+0Iw+nFTKu+TK/l3A8H8Md5QaUu8NOXhUPBn0W53/phPeGkD06YQ/KfnV4TxVWUtLVpFmwaEkMSnMVC4nM3lrhU8wOU/hvsIvAbCZu1MiNE7DMb4Q9HFNDOJcsXlgU/uXRslJhvJ1wBlMoYm08Hgkik4bPNDVVZEd34de9x0mvAQcrBpRzzNTBmv7U6JxWg5JxsIU7pwGTbfl5kt7l8sIvnrixuo7TZLpM3tbb97YfL/9JhWGJnUhW2lGEm1hWKxlMh7xP4/ISnlvd2/T5WsgWMiPgoekIsW1hDvuIp03nllINotcFJuimHueaJVy4iG/YYLGIMnbJcwzj+E/Q== 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=+mqQCFvGSShVoc1hxR4OmlozNt7Xc1M2crX/MK/P+3E=; b=XGAq2T+D08L/gbcGXTX/QqxenU2vVZeYhhUAFevLVEX+5X4lIeYWSo5YolAKLQkGAj7guH8eJdcvRyr/m9VU/X+rhxf52MNYBuTmNwLK4aEPchBMcUpPT/VzfNKiSp8Yp7Dv4tT0S7Mr2++VPxguZ7N5D9NTb+Wlp9GbHkYucau6aTxHe6ifLofekoniqSpJ9WWslOnIU58BKsC+PsjmFUMqn/Kv/xUKPTZwxvDIFSHA2lRbVfCQ4EtlvV8+9zXHGpazfRguYfE6Jqn5sX3c0JqnRWxil7q58BKmIU5Jc0Y+2PQhaMfiMYaAo9YXnp7C5hD6E71GKcAtXMUcJJ/sMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+mqQCFvGSShVoc1hxR4OmlozNt7Xc1M2crX/MK/P+3E=; b=iKhXIE8gnOu6bVbwCbc2pQ9szkdZudhqt3XNLdIH2zsp3YL2pb4ffNL31xtwO4DzXYC/zA81yCpgjmwPpcfKVodqMC3TdTlDv9DMW87M6bCNVCYO4Ldh5zYQ5+sTD3FvA0gBS+M1hHaKNqHSJW60iKJ0b4I6XgyGCFCEJQMSK0k= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , "Julien Grall" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [RFC PATCH v6 38/43] arm/altp2m: Add support for altp2m_init_by_id Date: Mon, 20 Apr 2026 17:32:01 -0400 Message-ID: <20260420213206.208750-39-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|DS1PR08MB10099:EE_|MWH0EPF000C6185:EE_|BN0PR08MB6920:EE_ X-MS-Office365-Filtering-Correlation-Id: ead1d366-7fa0-41f8-8d0e-08de9f247a8e X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?AOwhsdbYL4bDC9CWS7pnSrSlCuy24/CPyYIuRDv93TJHWsfLbWsvfAvXzB23?= =?us-ascii?Q?BUEx/nFfNsDXZEHYaYlpQPSKr1oJZzkYqu977j+kf4yeCgOprzLKs711mdR9?= =?us-ascii?Q?D+gPURAHuw/5KwEAj7AkBatFKUCH4dV93D0tDx7JxdPMKBTJYYs6LbvfiPCO?= =?us-ascii?Q?sjdnI1+Pg9G2l7bzxrn/48TBj3tcyKraYks8x3L6nEsbTOQkneUa8e/eAEtD?= =?us-ascii?Q?gHpW/+ztO3sZhyI9SjJE1sbVppg/KrNU+sh77BxqyRt7Krqi7kGKFz14l5G5?= =?us-ascii?Q?XVaugMWv/6cVzhlR1jZWIEZlCV9L/GBfTZyjP45dZPmGudKlSot/2MgKeG4d?= =?us-ascii?Q?VZSHFkzvDantKBs3RJ7MYm8fbYMrnQ0SXbVh0LJLUGMWy2AFHjrwGfgtSAEO?= =?us-ascii?Q?yrU4WANKw3YPbnLW9xl3ayyZrch5/UfLcD3co2feGTBVzLlYowcl6aOYETNs?= =?us-ascii?Q?hrvWbAp6L0sJxPwGQawz3ONyPb6oBQK1b+hiljn/pWdbaV/eAyOmyAjgJBJn?= =?us-ascii?Q?55eYdCceT4T3atSd/BKGNWvaHmTMGz+zi/wlQJuEpFiD5eJH/xeT9BtQvGsW?= =?us-ascii?Q?A7luczdYsuEtS4NihWjluj+RiP+MJh/6epqDVDz/zU6tC4Yd9qEQSHVdemwT?= =?us-ascii?Q?mR4kW2ybHvlOZNis4sMuN3ioGzCKUKEuiEaCgaFjcnFLlnUHszHhXUQVeRtp?= =?us-ascii?Q?67id44ztjRCnP8GGSWTVK73+wDz3GGtYHq2GAJtNC48Akz3aEHUkxzSNWYIv?= =?us-ascii?Q?Zxu3ADlaxnbdKGHm5f/+eKgxmqUxWp+sDwwEsYFf81gO7gy0PyOk3LQUHsQs?= =?us-ascii?Q?McdoLsOC+wu25vvhsiWMpInV1k9dly6w9g1+49ISwsuqJxeKJCp9h13XhSAs?= =?us-ascii?Q?Gg82aihpXr3FCsf8yHdx5mHjUSTl479IuTVAeqJ+b9X0B1ABr3A2R934B8FT?= =?us-ascii?Q?s+3ZNOTxFEDlcBgH6YibAaxJLh7pC2nppafAEgDhWxlRiLa4/pyfHonVuFL5?= =?us-ascii?Q?4WmC5PsZ+9vI3H54knGp/MBUaBayJ0waoeQgmEgZxFFJJj0e5LQPpVF1Apxx?= =?us-ascii?Q?/WRgtZXUpYhVjOhVCO5cwQHndB+PhdhX4inUeYBNXFCFT4+EjiO4y5NII5Lu?= =?us-ascii?Q?ZBpRzUkfNOFMWZ1wnsDvFR7T9wUUAMPNLEncyNliRiFjU7SYOk/2I4DwXgd6?= =?us-ascii?Q?ZZaVRw9PpaimwKP1E7DqumVIiwZj3945A+kWnyx0BqEV+5A97ydhAst3X0Ls?= =?us-ascii?Q?HYcjAvL1ZvK0orBpJR/L?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: uTiSGuTxkmOZwL4lNf+a06EX2VHSnKDXc0p8bU77+AJk4qLgrOulvZ/zlIlVJjuiXyGMFnJ5JZooI1B3T/SpjmADvic4/UJNvDFKUYD8Ug9x3KtqJLGXj8zWVH95BaX8+CrZsoOmJwiReqWTbENk6upZ1rGSlwh96fdWHjiQsnPoaDqgVgq5JViiQ8C+hg+P+FpFif8QsnToaKbZMDuEkIJfrBDBkAMxqEH49UItsjN/QG9yfy3KNcmiKPGmXtG7TIzy8oSpH5z1WMJOWNFmqkbMRPjsvZB6yVKJnJJLhsIvgDG5LtOiaN+XVlHjBk4I0+1MBdH86dpFRfHRWsySAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR08MB10099 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.12.7];domain=BN1PR07CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.12.7];domain=BN1PR07CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: MWH0EPF000C6185.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3286eb50-8f0c-4385-be6d-08de9f247773 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|14060799003|35042699022|376014|82310400026|156008|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?NnetbnwJvX18TCuumQ7Ji2CnoQdxRNOvamS3ZZBBWJ6LyzSfhU173tjFePus?= =?us-ascii?Q?PrELWA929vsHy1S4MAIni0ZJIe+CxfXRs6OMlXmilPDXWgh3J63BnM/t9BZf?= =?us-ascii?Q?yk8AENn78dYHZdsXliGhaY3ZBmsT2k1tWSW1vahcNUz99ldYyTVOXfuA5tWb?= =?us-ascii?Q?Ao0MjkOFj+v0IaZorY9Kk3Sz2ZC75o4w2kWwZud9IMRQYA6kj4LhZTCDXt7k?= =?us-ascii?Q?sKY6oKoIqg4E6LNJfc3o4g7nY4Mtlen7iqiC0yvnGgLYwQI6dfdPtseaUx5i?= =?us-ascii?Q?Nfm3NalUcL3UbzwDyP5aDxwGRrXLaqDtn6AjD5RmRCOOMdvRF2bUIT+PSl0n?= =?us-ascii?Q?ixIxXHseCfK8twl80EwxkOP/cWQT4/JGCIi1YTC+4WOTxnCYgSjGGwDmnni5?= =?us-ascii?Q?aVY1ulDCK6N7dmEm+uAZ4//v54wu4qteQUPuB/JeIEbISLsgzegY15SzqKfP?= =?us-ascii?Q?8MIeWsZ+vyxOVU2SxwVkUIQuku3dCBBvYtDplfeAXOCx/vq+SzToU2AFVZWK?= =?us-ascii?Q?Iq64TwlJE2Pay6vNTlD7OX042ELK0Z/ocUbVRdxiS/SmqEWM5NFIiKFttQk4?= =?us-ascii?Q?2seENOqlYHB5sVC19aTj35RHkk3eIcSWzKIBTmq2/4Y2FrpRoJgT4fW4qtTo?= =?us-ascii?Q?sVzHxph3l8652hz7VLAXzl1BpPSqXxgndpfw569yLNzKGYcxVUVzlVTGtuRN?= =?us-ascii?Q?hd6Soi3R6gIEc45KOAfqXSYOXVEXa4TVaWII2Md/+ozbknoWWxZ+jAe7Nz5M?= =?us-ascii?Q?RMy84Ky4IN7Y1mhcpFShILwKMQXpk/20LfQ4PbYoT1jOqNnbdIOihgka0DFI?= =?us-ascii?Q?RlMsn75PppN1634MjXK8tg15SEOQN2aQf219jT7uBnsVhmJNGsR5S6n9auQB?= =?us-ascii?Q?CgIHAYn3vT4mmsahPmDe3C2LoBqW2davl8e/nz7+s5TYT9Hemv+jMaVE5UHj?= =?us-ascii?Q?99UKPDHZtCX46zB/XmluGQagxtgc9gBzOC8ZqjqrRFyRcBJJ4BANO7IFI70r?= =?us-ascii?Q?4XTN4DT7OV8qSfGuFI6NVGSOLyOdNHM2Em6b60eUCMJizAdE4/elQZYpJ+Xr?= =?us-ascii?Q?SVmJJY6SyxDbE+eapokIpQZMV1ipscma9Mkb8uaxnylh3zJMEGlKkOxWgQpO?= =?us-ascii?Q?a21O6C2M9zFv0dH53xXFRcFagvhz6D8bhlJET4ECib5a14TbgmV4GpASMhST?= =?us-ascii?Q?UCNmhzBVLcl3dPA/YxbPoMa57xAI5MaV6ayCNkZ8/CiI+wZXqkIIy5vdYSpg?= =?us-ascii?Q?7ooCvWt+0Bhxb49PAl5x?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN1PR07CU003.outbound.protection.outlook.com;PTR:mail-bn1pr07cu00307.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(36860700016)(14060799003)(35042699022)(376014)(82310400026)(156008)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2wa6ZVX9f1JCMWd8JHft/npKOl0AqbsaQ4YNPJ6O5BD55W1SAJSB+uE5gO6RZLxrhSr+0CPci0556uEFOV1b+VjfeWympzAK2CqyY9wnQn8VZLgH60k5yEk2v3oPPqdHucXdcKSAjVHLDtWUnXzM1JAGxjVxASV+Dc2r/tMcllKwe7ttIXhTuS1ASfgqM6DDNpYIW6HCRyWLtIniP9cYGXg4JHXXlw5++YZaoVszFP03F+G/xUzno5jKWJww8D9kO/Ux+nYdZV5QQ10SDZJCW3AXt2ZMlBYCeErSBr3HrmeRmpVTAxRwDia15lXYjVqjS0N1BXcw7CaDQs4kI8/r0gg06HzYlWJ+pvBzL4Zp0pbiSgZWVEVMAfARCsN33gLDX9xvTJpUhZte38/p8Mq7aCJKIMu/L1XK5u3jZ8X/aykKElhe6k3xuNjooxuPoIa1 X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:35.4840 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ead1d366-7fa0-41f8-8d0e-08de9f247a8e X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-MWH0EPF000C6185.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR08MB6920 X-purgate-ID: tlsNG-42698a/1776720820-04D67F3B-040191CC/0/0 X-purgate-type: clean X-purgate-size: 1848 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720853385158500 Content-Type: text/plain; charset="utf-8" This commit makes altp2m_init_by_id compatible with ARM by replacing the x86 domain validity check with an architecture independent check. This makes it possible to call the function in the common HVMOP_altp2m_set_domain state implementation. This is commit 2/2 of the altp2m_init_by_id phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/common/altp2m.c | 5 +---- xen/include/xen/altp2m.h | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index 9f5f98e1e8a5..929449b1b03c 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -106,7 +106,6 @@ void altp2m_vcpu_destroy(struct vcpu *v) vcpu_unpause(v); } =20 -#ifdef CONFIG_X86 int altp2m_init_by_id(struct domain *d, unsigned int idx) { int rc =3D -EINVAL; @@ -117,14 +116,12 @@ int altp2m_init_by_id(struct domain *d, unsigned int = idx) =20 altp2m_lock(d); =20 - if ( d->arch.altp2m_eptp[array_index_nospec(idx, MAX_EPTP)] =3D=3D - mfn_x(INVALID_MFN) ) + if ( !altp2m_view_is_valid(d, idx) ) rc =3D altp2m_activate_altp2m(d, idx, hostp2m->default_access); =20 altp2m_unlock(d); return rc; } -#endif =20 /* * altp2m operations are envisioned as being used in several different diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index cd96c3b4792a..8fc16346d95b 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -71,10 +71,8 @@ static inline bool altp2m_set_altp2m(struct vcpu *v, uns= igned int idx) =20 int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(void) arg); =20 -#ifdef CONFIG_X86 /* Make a specific alternate p2m valid */ int altp2m_init_by_id(struct domain *d, unsigned int idx); -#endif =20 #else /* CONFIG_ALTP2M */ =20 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720868; cv=pass; d=zohomail.com; s=zohoarc; b=eJ1TVadi4K0Bv4JgKsJKtONokn85PfQcOPiGNosGLRkTIvcZ9fn3uZeoB2nrqIHLh0ZhT/3NC5XyTcn/4wtIUiccYvkVHkKH15Mwkjl/pRAVb/w6HERvJS/p77uLwjmWavGAZRxg+pfM+xPqA2n/XP/X3jegtJf29otIMqBO0v8= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720868; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+XnwEw2LkEZsqrQt7TCPVOkF1Np7ZHiylY2Nnd/lA20=; b=nabzzxXKCPun09qNmVnodRiHZY6VquWtfsn4lOTk9/DFC3PiNI44v8cnUna06dE/jYHjYfOG9jPWkys8SDsR2qyoT8NWOxezS3iVOykSj+BIjBptrT629mNzehwkrT2bww9MnASb62RA3RpT+DNT6ke/R1G7nHBgD804FtRBgVk= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1776720868525804.5760859034975; Mon, 20 Apr 2026 14:34:28 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287924.1568381 (Exim 4.92) (envelope-from ) id 1wEwFk-0002Ou-6Z; Mon, 20 Apr 2026 21:34:00 +0000 Received: by outflank-mailman (output) from mailman id 1287924.1568381; Mon, 20 Apr 2026 21:33:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFi-0002GI-Gd; Mon, 20 Apr 2026 21:33:58 +0000 Received: by outflank-mailman (input) for mailman id 1287924; Mon, 20 Apr 2026 21:33:47 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFW-0008Rr-OD for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:46 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFW-00EgH4-44 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:46 +0200 Received: from [10.42.69.8] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69bb5-e002-0a2a0a5209dd-0a2a4508b40e-4 for ; Mon, 20 Apr 2026 23:33:46 +0200 Received: from [40.93.198.89] (helo=CY7PR03CU001.outbound.protection.outlook.com) by tlsNG-c1860d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bb7-63b5-0a2a45080019-285dc6597c53-3 for ; Mon, 20 Apr 2026 23:33:45 +0200 Received: from SJ0PR13CA0237.namprd13.prod.outlook.com (2603:10b6:a03:2c1::32) by CH0PR08MB8613.namprd08.prod.outlook.com (2603:10b6:610:183::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:38 +0000 Received: from MWH0EPF000A672E.namprd04.prod.outlook.com (2603:10b6:a03:2c1:cafe::3f) by SJ0PR13CA0237.outlook.office365.com (2603:10b6:a03:2c1::32) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:36 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by MWH0EPF000A672E.mail.protection.outlook.com (10.167.249.20) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:36 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzJ00jxGz1wdZ; Mon, 20 Apr 2026 14:33:36 -0700 (PDT) Received: from BYAPR08CU003.outbound.protection.outlook.com (mail-byapr08cu00306.outbound.protection.outlook.com [40.93.1.110]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:35 -0700 (PDT) Received: from BY1P220CA0022.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::14) by SN4PR0801MB7744.namprd08.prod.outlook.com (2603:10b6:806:203::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.31; Mon, 20 Apr 2026 21:33:32 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::77) by BY1P220CA0022.outlook.office365.com (2603:10b6:a03:5c3::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:31 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:31 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:27 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=qy7UIJL/oN9FpqFvzzZX+5OdMbiJFhvoafWRadBDZTleAPIPY3HIfHAKDepSmpxwZMFGjOPb9/94NDEUX+lEElIZdBS0Mz4KfHafrDt27XCu8YSDIzp0YrAxlbbmJZgHT9M5NLty5YG3REnS7oxcEePWnxaMLaLEMbJBJqCe56jRuvuXRy4bwUbERNrk79WkepqrTUVeqFcpYXN0I8lbwBhKOXY85le7fqYd/X4EVC9wS4U7c7vhgawDAMV8oIjUAqfgzpqxw156yO11Ax1vjnSTWiLW2h4tLiZmf7yDYGbcHAgL3qnp4TzLOMDB5myCFABsXPYI9arkOlpqYBMPSw== ARC-Message-Signature: i=2; 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=+XnwEw2LkEZsqrQt7TCPVOkF1Np7ZHiylY2Nnd/lA20=; b=YosoNoBUx/1PByQi96zDzHPdjtE0qhu3dOB+G6wGpHNoPWo2qCIAbKNn06h+53cxl1pmx4cAWd+dK9V4edtimHeyMcOA+nO4E3juynjRHD3H0scF8Snj2xqxLwJfv+nhPWm9+YalcGbuabQPOvPFOonposDTQFOZvONb5a3S5no6AXLaX3go7H76yiEfKgJg0U/DBE5DjkRhVM8h7dI4ZAWFj6xwhOHAbUOPc8/4pB8PIpeV8zLE8+3VEd6lUZykiEZBGfZ3czdIAFkooHcb+vU1gzyUtMIdVHiXS7Qs+y1HDR2s1d7WA4w8I62c6DS0lO9+nboZBwqpajhwNoh8Cw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.110) smtp.rcpttodomain=citrix.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+XnwEw2LkEZsqrQt7TCPVOkF1Np7ZHiylY2Nnd/lA20=; b=qy4OxXo/yi1hnlY7uxDjofXtPsTmYct5+syZRTbfhkQX0DKC3b+fiih7p72pj5579ZSgRDQ6xIpahCPm5AejfOjQ99oMDqGlcDcS7OEcKtA1k0DI4Sz3QOgzXNyPB4Mo32C/e9wTyHEXgbsS15OGhNeV3fMLpmDAsqrbyLs+Lvw= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.110) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.110 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.110; helo=BYAPR08CU003.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CTALkUp0W1HYpm/ttqRs3aAkLj/U7l9l6Ho1hmYAK6Z2t6r84G6g8/I4u9tQIzr0gKWny/L6sI/nE3mjNkMHuSE8SqWdkftJTw4zZMJSx0J0LnvDdaWYZhwTyddXihrqueyXLZoWkxJG6r5lNZsdbh1PTszn61bWmazaO9ECQ6kHdv/6dzbn0dxPhmQaRZcOAdqFKc31p5zIVRAeN2kAybuoxaJRje1iX4Vr1XhmBuQHOKNX1MqWICkcdGix6RdsbqKDV5/8UIBq2qGepLKYj66NgK/61WRrA/sJp3iGOi/LPsp9wNOW15l/4CEzI2i+Fof7UwWnyAqfhsvq5iS/ew== 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=+XnwEw2LkEZsqrQt7TCPVOkF1Np7ZHiylY2Nnd/lA20=; b=jG5/hAnuJK7rRtpZFBzH3MbvyLJzgmcmPOF9/M4jFlVOsi5dUWbrjMsFnbUontAd0XMCpl1XCP6V/+ZaQri2aKEtbtJap6xeb8LcGlA6RQeFXwJ5l+O261Iq0Ark4kv4S7d8mz8mAmv4FfUMKPfmqU8weycri1BRlugVKd8QtiOeA8hd9rBwTfsIy5gG1rwXLgBjluHuP8dOTQnclNQYXF2HcyQ5rbRDJTAKUMWCi3vGNh8GDNYibej6kZ/LbyWmBXEXPFhz6EJDKK8teFAZvN66HaRYW79ynrnlPPGA71pLo/Bk0ZHP/ILS6h4dZt2dbn7Q2VvGhAeLYn2iNhgqWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+XnwEw2LkEZsqrQt7TCPVOkF1Np7ZHiylY2Nnd/lA20=; b=qy4OxXo/yi1hnlY7uxDjofXtPsTmYct5+syZRTbfhkQX0DKC3b+fiih7p72pj5579ZSgRDQ6xIpahCPm5AejfOjQ99oMDqGlcDcS7OEcKtA1k0DI4Sz3QOgzXNyPB4Mo32C/e9wTyHEXgbsS15OGhNeV3fMLpmDAsqrbyLs+Lvw= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie Subject: [RFC PATCH v6 39/43] x86/altp2m: Add altp2m_reset_altp2m declaration to arch header Date: Mon, 20 Apr 2026 17:32:02 -0400 Message-ID: <20260420213206.208750-40-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|SN4PR0801MB7744:EE_|MWH0EPF000A672E:EE_|CH0PR08MB8613:EE_ X-MS-Office365-Filtering-Correlation-Id: 51c387a7-23ea-462f-bd5f-08de9f247b08 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704162011799003|36860700016|1800799024|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?2sPogMVMPSPUsJHrSh7XpbJ4/jqd92+FIPgwwlWwauy8VvC5aGqBvwCoZqrv?= =?us-ascii?Q?yDjf706pvs+yG72nWeCTOkBuM9uDz8PvxngY0PKzQiDwTrFfhQt+dFpgR7OY?= =?us-ascii?Q?Q0T9lVaJTk3eno+EOdNLNc646l+u2TdxrkKFWj1r3iGBn/isJ3WJ/8popzPf?= =?us-ascii?Q?1Mla0LR5dF9A6nmUY5Vrz7ei3ZD8KrA8EInrqBqRei2mb5Vlhh1zJ/ABTLzf?= =?us-ascii?Q?y1kVdeT9BhUvlzy9gzQomFVk3HLMDdmrun62IDOHtEnefuqCUA2lnsUwmUMx?= =?us-ascii?Q?AnoCfHM23Of949V8WDbE/iHBeuL+lwxDZZ4iM6Dys/hglw95PlX5wWdkDvOO?= =?us-ascii?Q?GalvvNAaS+ZITZYQssAi6S6ewmM6enldNoqKU3U2J4NlQ016HhuCSLKoAcYz?= =?us-ascii?Q?wmGyEl1ZS2ZTDawYF1W9PT245H4PXLh6dKNqbpQZt2uEmLrgPHnazjTKfiNK?= =?us-ascii?Q?wjQ7W8yFBWhEIN7Ltmoj0MIEl+qFLCoWW6K4X7nzRlkn8Pi+++A8y2fi4V/b?= =?us-ascii?Q?hHgaKwo0YyzDWOdalaqWKsCylpo71zUmuDQmBovp2MVe+mnihStJZ4jOxKRW?= =?us-ascii?Q?8twlCHur3X9/j2fcDACv9qg5oRf9BZs/aF8p0W3qmQ7vnC5yWkqwgD12y8d9?= =?us-ascii?Q?o5hQRugJNzNqrFVO9xTymuXsJQCkkMGcdHdPJKLOqKyJNlMcNnmRlc3KaTgh?= =?us-ascii?Q?QY6PVP+TSxj9JyEosGQfT226vp6boZvZn4HTZxJ6r6ei3ixZ3t3Ba3envp1P?= =?us-ascii?Q?4qVnG2j6xyBd9+nyx+ZrYImOvguqLVMQe9g19CaEYdqnCE4iqVrKkeIzTobE?= =?us-ascii?Q?8njHin354ihYZRNJDVKRRZvIZjYOUV/q7tNgOQPPuqCkrTqxd3PTk+9knfDQ?= =?us-ascii?Q?RhiT/whrhJvISnDBmIGdZmmJreyaLiy38DcpN2PmPbYAIBshLt/otZGrcm41?= =?us-ascii?Q?a0Q9tH8se6N87vVjUJmyPgj6p6AfCN5HW/Z9iblJ8Q/fOSUBbKQnq4OTznOK?= =?us-ascii?Q?pgWWHvS5M2ebWjmsUC/RhCZ12Irao0qhe6beiEczgEEDhDmRTMHC31EwGL0S?= =?us-ascii?Q?lYTzfqOlJZ0RggOzmNc4rH69UiowLTVhI2n4eLbjrC+L/z3hu69u/GuJ/4hf?= =?us-ascii?Q?oWCbrAJIe7hNObNIkqKDQSYWEDNxtcWauw=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704162011799003)(36860700016)(1800799024)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: ibjRNCsaVZPLxim+jwQAEC7p2KfBsnqlcyiOXbecBaQGfj5P20tR8JOD8aZ5alA0GIQdOjDcEUfx2/vzAQvlxC9IO62VaO8ENH7EVIG30JuNhNzdUYMB1iKbf2neVDO1luwX+4x2fTpDbo4ju3k+Sr2qhR5F4ZmOOxjcRMfR/I1/8ldLQ5mk5Hg7ziDY5PaRT3DnOabqANhmWjoSKalb0AaR95W7zsFcZOY6Z/Rpyc04epSSmmTh6Ka+zftPN+iitSCh6wYCrD3nh8Lo+zs2Df0I7hl1VRcaBU5Wnyw8BOGGTzRG5hyQg83WaoZ+znjo7g9L+V7MGjiaoXdcRHLLGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0801MB7744 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.110];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.110];domain=BYAPR08CU003.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: MWH0EPF000A672E.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 976af3c1-c846-43cf-6d77-08de9f247806 X-Microsoft-Antispam: BCL:0;ARA:13230040|704162011799003|82310400026|14060799003|35042699022|156008|36860700016|376014|1800799024|22082099003|56012099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?FdnjhJkfiVR2wZIHyfzOlbdNabjPJY4Bw2fh9lU9BsmVPIs6WZzfFo6xvqSM?= =?us-ascii?Q?K3evjX0FPmckCkUGEQnb854AZh04RwI6trj+7yFVsp+1vt6Kj9Q3vwrO4JL1?= =?us-ascii?Q?BQG63zxdz+CWM9dGN2J2iR50v8SRiXCAsgYbznvTDELfcDE9DthQ+lmuh6FR?= =?us-ascii?Q?ReMJjsa5S2jcr28UlvcqYxES2RqWrcoyCsV069+u6B+1405BYI9DXcFWD7Tb?= =?us-ascii?Q?fr19W1CNZnDVu8EdcMWALTb49BIaJZ5be9PGn1FSsaQNE/CG03MsNEe3MOxu?= =?us-ascii?Q?FU79yY7EuIVQ+2GVFvW/gIBW0AmKp55lD5KSge2iCMfo6BhQQ+G5dJz5hnbz?= =?us-ascii?Q?FbKm5xG8ob/J8uWJWRnTiG77+utkXQXPN5ne/4Hh7NhAP3PSJYNkSoyD8M/1?= =?us-ascii?Q?LOVtr0gYGjGnNQygGZKXYo28hXaLGHrSHvZxMlFjFC0HZIZZrANOxms7J27s?= =?us-ascii?Q?ua66g5H/CMw3w2wQi8qI9HV0Zy1atfq0j3Lm+KiBHhLy0LzV7TrLAKnFprs6?= =?us-ascii?Q?yO/6veunonTpvdESGieS/8OEcUXkYehap0B9rJZkoX6y1LdnVfdsZXnmYC9c?= =?us-ascii?Q?C0FCnEzDAstVGbAEKaA1odvj69sgAKW4W6Ox0tJ65dw29a1x/Jo4SZgsvAai?= =?us-ascii?Q?mwagRskBaSaK5wCU7ZDWaeRsCJPS47XIKkV6T0ixQ32afHVCnSfvqan0bDtg?= =?us-ascii?Q?a5tw4nT9RKjaDUSSl1cUn3FHCpSvj/+mQENIHMi+3IDXYknaX0ZiLb+5GiBI?= =?us-ascii?Q?RH5xMXYVIlQcrFYGtD/JH60ENrMqyXqyXY8c2w2sNOghrRi1fCkmh13gJyqv?= =?us-ascii?Q?lFHCxMEzvcxd4sP4UVlg7qtEsSEZQB+sPVTRyAJEge9IBqOEyXKAoZjWB/Vp?= =?us-ascii?Q?QQAJXTPJcTKloxy5P6DOSJY5vOfM6h0HxE06A/zFtPxjy7VKW2oSAim6F6zx?= =?us-ascii?Q?vRQA7awhDB1poe5D7seVGnc1JnYV0z/Y/HL4dFs+lPYfPvBjQGV2mBvq9crE?= =?us-ascii?Q?Xhn5YTdFEs8V7FXpEkIa3JAA3fkJtZFxA+mZ8F08AumxR+vsStentk9UWANG?= =?us-ascii?Q?6CIrxmb3l9p8bRodUhLhmNTEDvYvxFzhQcfYJ7JCxb0Dnd2jx+GCCINimTgm?= =?us-ascii?Q?SCPE1r42uwhXQnrEoW+RCCKcDxLjTO89ZA=3D=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR08CU003.outbound.protection.outlook.com;PTR:mail-byapr08cu00306.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704162011799003)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(1800799024)(22082099003)(56012099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iZyVvjaEa4NT7vLxP5WRAvyzQAMgIIwQdvYCK6Qzq8x1i0ac/oewITB0TA/LitktWnLBtEy5XSz47adkwNsxPtvD5cx4FcVvG5/XFV3rNu4CyWPSahESXNhCY/cJ/hqgrfSPdzPI1GQg/VYSwRx8ZsaoXXzMfwnoBYVA6R/le6wrbqr2jLHrPEchLdC6yjBukiNciQ6gKRLr0ss5tC0uanjt1Rqmx4p5DlcxD3kZSq/BGwoYsD2kWX35/b+K91113B0/cdRYCfVGsrnlhbrUJpJpF+jeF6RCILCniCnufRR1AdRa0xJ0xssGIfCtJ56CTZDCvql4qXlvHmwi2mUW0AfI98ne8f02QSRXexTBOeSIIJji4pGp8FAuTNMiWFNS4bWg+1582Bgtuqc/2w/445WJsHAEz+iPtZcfnEawLoJqJop97TTS1X2rT4ktw4/Z X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:36.3595 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 51c387a7-23ea-462f-bd5f-08de9f247b08 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-MWH0EPF000A672E.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR08MB8613 X-purgate-ID: tlsNG-c1860d/1776720825-C3D7BDB1-4353C520/0/0 X-purgate-type: clean X-purgate-size: 2107 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720869453158500 Content-Type: text/plain; charset="utf-8" This commit makes altp2m_reset_altp2m non-static and adds a declaration to the asm/altp2m.h header. This makes it possible to call this function in common altp2m routines. The altp2m_reset_type enum (which is the type of one of the parameters of altp2m_reset) is also moved to the asm/altp2m.h header. This is commit 1/2 of the altp2m_reset_altp2m phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/include/asm/altp2m.h | 8 ++++++++ xen/arch/x86/mm/altp2m.c | 9 ++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index e7239326c71d..02b5e1a11220 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -92,6 +92,14 @@ int altp2m_init_next_available(struct domain *d, uint16_= t *idx, /* Make a specific alternate p2m invalid */ int altp2m_destroy_by_id(struct domain *d, unsigned int idx); =20 +/* Reset an altp2m view */ +enum altp2m_reset_type { + ALTP2M_RESET, + ALTP2M_DEACTIVATE +}; +void altp2m_reset_altp2m(struct domain *d, unsigned int idx, + enum altp2m_reset_type reset_type); + /* Activate an altp2m view */ int altp2m_activate_altp2m(struct domain *d, unsigned int idx, p2m_access_t hvmmem_default_access); diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index edbaf54c3761..18f8a71f1682 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -228,13 +228,8 @@ bool altp2m_get_or_propagate(struct p2m_domain *ap2m, = unsigned long gfn_l, return true; } =20 -enum altp2m_reset_type { - ALTP2M_RESET, - ALTP2M_DEACTIVATE -}; - -static void altp2m_reset_altp2m(struct domain *d, unsigned int idx, - enum altp2m_reset_type reset_type) +void altp2m_reset_altp2m(struct domain *d, unsigned int idx, + enum altp2m_reset_type reset_type) { struct p2m_domain *p2m; =20 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720872; cv=pass; d=zohomail.com; s=zohoarc; b=X22pQyZ2r/E7Uby8MXkFP4jkRuiZ40GRZ3fUJEsNigfO9VUOtU0VjfoFfR6uxJmwW8O9XzZGyJOLwpeRIb9EUkIpymnQWufQtZK8evF3WqisYjhqqujn4F5iukX5SeW01OB+ZC/V4897M/42HC4OAAXHaKdNGrRfFj1RKKDhHgM= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720872; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ASN5ZYxdsnJbb4wpR/egaU8I/r7OxT8I6SsLPMu6BO4=; b=dJxuQDH4VjiZUIIj1/8Rm69DGs9VjNwcdVum+WOVGF0X8KZ/lFNCtSTkiIcXlRioexulNI3ItRvdlIUFPtBJLQE6bh7qHRtm5rCaDoVkkMqGTIDr31pJBT7V152xLj+EKrTR2zvwUbyOCY6C/1BJeM8JEG0WfaWhNgz1xkFBCb8= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 17767208722371021.4999879208251; Mon, 20 Apr 2026 14:34:32 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287941.1568406 (Exim 4.92) (envelope-from ) id 1wEwFq-0003ao-7n; Mon, 20 Apr 2026 21:34:06 +0000 Received: by outflank-mailman (output) from mailman id 1287941.1568406; Mon, 20 Apr 2026 21:34:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFo-0003UW-PZ; Mon, 20 Apr 2026 21:34:04 +0000 Received: by outflank-mailman (input) for mailman id 1287941; Mon, 20 Apr 2026 21:33:51 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFa-0000d5-4h for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:50 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFZ-00CCTa-Gg for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:49 +0200 Received: from [10.42.69.10] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b69-bab6-0a2a0a5309dd-0a2a450a8c08-48 for ; Mon, 20 Apr 2026 23:33:49 +0200 Received: from [52.101.62.128] (helo=DM5PR21CU001.outbound.protection.outlook.com) by tlsNG-4011c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bbb-56b3-0a2a450a0019-34653e801d3b-3 for ; Mon, 20 Apr 2026 23:33:49 +0200 Received: from BYAPR08CA0013.namprd08.prod.outlook.com (2603:10b6:a03:100::26) by SA3PR08MB8873.namprd08.prod.outlook.com (2603:10b6:806:382::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:41 +0000 Received: from SJ1PEPF000023D0.namprd02.prod.outlook.com (2603:10b6:a03:100:cafe::14) by BYAPR08CA0013.outlook.office365.com (2603:10b6:a03:100::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:40 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SJ1PEPF000023D0.mail.protection.outlook.com (10.167.244.4) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:40 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzJ34rdhz1wdN; Mon, 20 Apr 2026 14:33:39 -0700 (PDT) Received: from CY3PR08CU001.outbound.protection.outlook.com (mail-cy3pr08cu00103.outbound.protection.outlook.com [40.93.6.107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:39 -0700 (PDT) Received: from BY1P220CA0026.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::17) by LV9PR08MB10801.namprd08.prod.outlook.com (2603:10b6:408:2ed::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.25; Mon, 20 Apr 2026 21:33:33 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::f3) by BY1P220CA0026.outlook.office365.com (2603:10b6:a03:5c3::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:33 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:32 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:29 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=CLpCBLD1qECGrCupVE1yKbteMT4bUT66alW5ozmUBIcWoZCikY9MUOn2yN0PkZ+92pGrKlLVVQFGkrkz/O60i4/k/ogG8mz3YhDYQBSeKGqK3hToMz1ls8P68vADnkbXIftl02oQBEoDRT79KC0NHBVYJAUwy9R/TDyIxqxmqVEb77Abh/njqUeU31GMw2chpKrhd7rj36TVCNSVHO8rEIZxZthwSymZC+Z0DqzouTDsyKTlaH11UHkKfF32FnwVvqGcI1vgho9/OfotOgLwsMycxS8qpMn6nHY9qPGFvdJaR4XjQFtbm7BkKOp4lKf1TyXO93MsWUW0CNGJMnZVGA== ARC-Message-Signature: i=2; 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=ASN5ZYxdsnJbb4wpR/egaU8I/r7OxT8I6SsLPMu6BO4=; b=BJouAqVicquqoWCYiMYD3zIxec8/3zkqhKoLe+H71Ym2JoecnfUWO+oP2Hkcm1bVYtSIlQHrvrsrnFBd0OE4Xas6a3PvOGl5vOU7ilWg0V90F2vk0sQZLEAgl1G7jYk6M2jK4t+ZqrnHARBh8qXPxDvcL9iKtB49Z9uj4i5EitL/KjB1fLziOa62aRL82KKtreNjR9z2lA1Xu3anDU7PScSE5jwJ31ChEhvRooF5yyDFanZoUr7/z7c0G+NMqFnoLcE4FfaO1h3ch8/HVb32fbVzhSD/xAc1MPYlTYF0IadBs+rpTyxuvqlqoFpZ8iyUVpYPZeatydPInZapknMthA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.6.107) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ASN5ZYxdsnJbb4wpR/egaU8I/r7OxT8I6SsLPMu6BO4=; b=FTHiPl3+ccGn+jBT6XxYr4R9R+BmQH08vXOVcHUBxlGGtrl63hPwx/mY3h5D2U6NO7s/asl3hIWtJGdInSRBow2vEpokhqFXME1UNt8DjNrzhcg+6RA68M1tkf0Xrkfyco9yVoQTS7TqToO8uOkL0z9m8HdBIVtPuwZIUta1eeg= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.6.107) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.6.107 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.6.107; helo=CY3PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mGGmhqDc+C13sdDWM1adpVFrCmZNecvUwEBiAe4N4mugtgQtzMKK03myi94tIA4jVr/DdaVIs0f0MrR4+nSREpjE67+i6i0IW7ehuV1fxaNPZ8EGzNAx/poLEgCEjmprvOlA47IjyBqPlJMOCMdGroJnC29rPf31F/sj1RbJK+mEWzET4I9se9yd7CA8mjaKb9SZhwPzqnz0D1Mb6rMnWIOQyC/PKDKNNKU9HgJbEYzdOKvF3I2mCgZ3zdOzDevXcZ9TzWEmf2yI9lN3Skb5Ym598sWWuVVxPmPXrZOQYrfc+05AMgWxR4JhZ57FO/im5l79Fg15xer7q35VvwV2uQ== 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=ASN5ZYxdsnJbb4wpR/egaU8I/r7OxT8I6SsLPMu6BO4=; b=xSpq/8cXq7G+xQ4UWS/Rsbi1AsgCj8wvrtNsy2nLxNIGurYSLIOK3VCoLNxRf2wXYivJPPxLBuS7kEWMXZGGpb15lDdchTbU4eeUpU5cdAzQpb/FH8u+7nVkX24t78wsz30IzO4hcLpVvziOnvU2FpVM17Iw20FcXHOLZj4BrI2X46+BP1qpenqRz3Xgg190KFBUQ3gufhZR0TSMpQtwB6V57bXBFrLl3NkJ4/n3bHpifvdavqt1v6V5w5r3rnCxBvkeNlfNIJGC21sIOSY2mJ+W25zBGGHOzXIUna5hG8darGgEIIlH9h0b7LCiZbYo9Q6+ceO13sjHlPYmFVLD8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ASN5ZYxdsnJbb4wpR/egaU8I/r7OxT8I6SsLPMu6BO4=; b=FTHiPl3+ccGn+jBT6XxYr4R9R+BmQH08vXOVcHUBxlGGtrl63hPwx/mY3h5D2U6NO7s/asl3hIWtJGdInSRBow2vEpokhqFXME1UNt8DjNrzhcg+6RA68M1tkf0Xrkfyco9yVoQTS7TqToO8uOkL0z9m8HdBIVtPuwZIUta1eeg= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" Subject: [RFC PATCH v6 40/43] arm/altp2m: Add altp2m_reset_altp2m routine Date: Mon, 20 Apr 2026 17:32:03 -0400 Message-ID: <20260420213206.208750-41-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|LV9PR08MB10801:EE_|SJ1PEPF000023D0:EE_|SA3PR08MB8873:EE_ X-MS-Office365-Filtering-Correlation-Id: cf24d18c-5d95-462b-b2d2-08de9f247d63 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704162011799003|376014|1800799024|82310400026|36860700016|18002099003|22082099003|56012099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?s6vliefx3GpQZCqeZuOM+iXFqwD7ukgMMeP5hK752tHrdzdGWYeBn4Dq9CXe?= =?us-ascii?Q?snTZdV/m7pGlg5uK8nGouYvAkpewt5WfiAVDkLczhLcK9QmGueUtHX0zeCoW?= =?us-ascii?Q?y7gGKb4kofw6Z7WiyLC6lWkXae3rg8afVEXLJKnkySY+cb6pDAtGuSOEnJc0?= =?us-ascii?Q?waOz9HiZc9eVVvdpU+GOXXxTnQaE1S/39JgqSoP1wcKzrI1LMyxM2JwHpp3V?= =?us-ascii?Q?tTznaZGM1Dovmi935AtSI9q/NmFYsH45JeqqDlGTzqEaH8yO9gL6sAAN47qv?= =?us-ascii?Q?VZK4rrQrTGDAQT9GVRJhZ2HdjTahqZ8RWQogdFLFuzeVLsL3G4/Uq1qVCqDF?= =?us-ascii?Q?bEa1L570btGziTrbQGUFXAKSzGQXbWEo1rlTOV9/HEwMG+u9ToRPTWKtKezA?= =?us-ascii?Q?RzZuc0dtqSNKhSVupf7tJeWNhvp+d27IrCc9tkCfD/43DuFaqw3X+znrq+Qx?= =?us-ascii?Q?45xHSTHp4bsdylgLm2FBT8V10007L6RAN9UJ0MTERElr/2Q6RfdUYx17ArBo?= =?us-ascii?Q?n3r1AxHOIbeNjqULXbBgaGiVq+nP9RdskEYUEWcIACrbNr8Q8VQlu/oakrJn?= =?us-ascii?Q?OUb/NGlE3AtyljVYH7IX+W02dkuGOxV3sqtevLRFobIWt0zONxcVRgmgYDwi?= =?us-ascii?Q?kvhl6O9eOE4O15obw9Gbj90e2ulgFajePuHgpvhkeZ1pQK2B7Uih0VJcienI?= =?us-ascii?Q?/TFoBOHeRzqyFsrqyGiXpVTjbzfOMnxhIuTH1izpcJRZE3QHaoWoZMv8KT//?= =?us-ascii?Q?LbEesRWzadjqKlWJ0hWyQUQGo8CVK2V5o3CaoglmzSK3lAdxZ3czzFIKMbt1?= =?us-ascii?Q?COH3cV8ciNusjgZ3JfLJpLlV8axnvq7Rv17VarwLaUyitEoo5ts/Q5dV/T7i?= =?us-ascii?Q?9inE3Sjp2AgjuVslx5VxypEAUSCAWuZPxwqOkmkibR8kC+ldgMs+2k903Vd3?= =?us-ascii?Q?KCiDa5cQyxH15VTYDE3HvmGHSSH1YLWQOagyhBAVR49qlmJtE8JH9d7MoBY1?= =?us-ascii?Q?S5tU9JhxIICkrL8iHzYpLdUkcNtqLgiA0Bq/Ttlash9hsjVfDSz3QfYD1TTS?= =?us-ascii?Q?tka8uIH3vKz8HyHtSKEgXEhjR9ERdXm7DE/eLqs0Jn4/RiCD4Uc=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704162011799003)(376014)(1800799024)(82310400026)(36860700016)(18002099003)(22082099003)(56012099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: IxRRx6+wrYJ9V2waQwMuNc5bE5bOaDoYwo3uz4jQJFF42sU967oju/3OAdkfzApRzxRhrkiXjQt2js97syHWNC1GbDNKZOBmq2rQPud9bADEnoknd/8uAwKDCXArgvvA7ax5reHlWHC2W8482QwuWK/podGPZohWrfH2hZLJxdF+ZxxUGGTC11K0gkL1kmjDkoeeg8HjxJCi6kiRn+Z4Q4VNdhWZBzWAdMIdG4t+hho9mBuRJ1P1PPy9D98dzyjrhFF3oRbjcKlB4Vku7Ipn/vOj1O9FVCETne5Mc51WheStyblEAUYEukOeCDtpKW2plpCKiSFWYsBUkVS1hFhW5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV9PR08MB10801 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.6.107];domain=CY3PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.6.107];domain=CY3PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SJ1PEPF000023D0.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 901b3b4f-562a-4792-3597-08de9f2478f3 X-Microsoft-Antispam: BCL:0;ARA:13230040|704162011799003|14060799003|35042699022|1800799024|36860700016|82310400026|376014|156008|22082099003|56012099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?PpKD3+MlMGAA8XtGrCVh1Hz5VEtQOLwfx++A/XBPHvrcitHFdQhNY7fEZr4r?= =?us-ascii?Q?Z797vF1dOV2xN0d7mcZ5wPyw0ZJ8Sp2QIWlfqM3XkGKBhPJVmiSTMiEYad3z?= =?us-ascii?Q?8GvBVtHjNtUQUROeIbFgIS/k1DExd7ZJuLttXa7MHA7xYqB1MaUH2vypKRCc?= =?us-ascii?Q?sGc2UHvT956KIBQhNPG1uGE+lvSzPN2QGXPBy0CJ/4OwFug9erGL3GYPmUg0?= =?us-ascii?Q?7beKEJYweKGyUA1BTrym0M8SFe5Dv7AZ/NqGCjh5umK3F1c9sjdSSXSqs8n/?= =?us-ascii?Q?lBfo2iWt1HNcfkUUEpaPLevfqoG88fELN7Gn3AldtsVykOVjaXZLu7LZlVqk?= =?us-ascii?Q?oNZ903wUx5V1/y24xYhK470YjLTnsgAojh2pZZ+sNtbIZ9QFmfpu2mc/52/a?= =?us-ascii?Q?BBmRCx20ZfyQEMpqQGfSngXI12HG/qo98JKWDomsM0nBH/FwIwJHDHE+xeSt?= =?us-ascii?Q?yVY40y/wUytAgG1vrpKj8zq8+gH+cGGnISTrXWUYabJdUYE9Zw7OkwzWzVcc?= =?us-ascii?Q?6tx8IoFdauXZXHQsxhN3bA/yg0LV1HbtvR82r4GQfKav1v/TAaUV0BlMHwKf?= =?us-ascii?Q?qMN84j4I+EZ8W2Iu4j5+9uTpHI3X4yLgM0/IY1oDMvzaRhwb4WFoGldj6uZs?= =?us-ascii?Q?JaTbqTi94Z46ZXvomI3AfLDnRZpE4MUtSDl6KUmK7qOiTWoUSKEj3ZOrAqmw?= =?us-ascii?Q?Pwzphj50NEo5XHWhh6xrV0ryoC2i2244VgUg/oF6sNSq2cIhPxtALsLDhVbO?= =?us-ascii?Q?UZtucXiLJ01K74LXRJo+VXSUvuNiJDYri8H4ppw0AiqIuserMiggKtAuzeAw?= =?us-ascii?Q?ty04zv4PWaU4IV6wGa7Z/CwMXX00mMsvjRpcppLRN7XZ/S4XVLcVkBXLqX9M?= =?us-ascii?Q?10z97xn4A2+TlooEEXZOd7nCheXWX/RbGLKpPNYOlewLQRdn6yr4K1uCTjC2?= =?us-ascii?Q?D090l+tQgtJidcG9TjBv/IZ1Z1GJ5lKcgkbsgMySr4jmEpBAdwNYbNrJkja0?= =?us-ascii?Q?FoTUWahU3fq4N2bv0Kx0RB75MDKHHZZ7xsKJhFXArzcMBaiiYv7ZzXxxzm3K?= =?us-ascii?Q?MMZX8hSwlqk3+Jp1Rr0jNxDQo4UmNnaoIT5hgMbev+SSVfKcPHA=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY3PR08CU001.outbound.protection.outlook.com;PTR:mail-cy3pr08cu00103.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704162011799003)(14060799003)(35042699022)(1800799024)(36860700016)(82310400026)(376014)(156008)(22082099003)(56012099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dwZyBiBD99JqkrBkyJmkBFFJ0eo0gfn7CN6N9/KHPdkbz0ffDmbwQQPK6lgbl7q6iAab1BKobnxorc2OZt3hFkWlK14t/jCaH5c57eUnrpI7vwlgPH0giBoamf0ARFkpQa10gRoD3Qy9tyrxpvCJhk2Qc4IeJnVzZldz271BcSmBUSydQ9EzK+JvjMaCx6qZO76oHBmp3daZLRd/mSC2oMlkWDZRBbr/LxcmaKawm6dM1aIhgAPIgtnf3w0aA69nZhpg4GH0Zg21OtvloFEIMH/r8QgnCxfDH+ey3DLHaiUyhAz1UmwtNh/B7eQnfiyCrRseUwPrtedICz7eUGvoYlFYmKDINLg/pvhJLx76iojPhVmR9MvURY5jGFyZUvU+0yIy1TP5QWJ+H7aGfu5rFbXKxuAGbW2mEO7ES9o8NpTYQpDjM8kjsENJ8Bfj3ZyU X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:40.1651 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cf24d18c-5d95-462b-b2d2-08de9f247d63 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SJ1PEPF000023D0.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR08MB8873 X-purgate-ID: tlsNG-4011c0/1776720829-45B6F8B7-073EC061/0/0 X-purgate-type: clean X-purgate-size: 3083 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720873497158500 Content-Type: text/plain; charset="utf-8" This commit adds the altp2m_reset_altp2m routine on ARM. This will later be used as part of the altp2m_flush routine. This is commit 2/2 of the altp2m_reset_altp2m phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. I'm not sure if duplicating the altp2m_reset_type enum is really the best way to handle this. The distinction isn't even relevant on ARM since the logdirty ranges don't need to be freed. However, the function prototype has to be the same in order to call it on both x86 and ARM. Ideally the altp2m_reset_type enum would be part of a header that asm/altp2m.h includes on both architectures. The main xen/altp2m.h header can't fill this role since it includes asm/altp2m.h, so it would be a circular include. Introducing *another* header file to just hold altp2m_reset_type also isn't great, so I chose to just duplicate the enum. Any better ideas here would be appreciated. --- xen/arch/arm/altp2m.c | 20 ++++++++++++++++++++ xen/arch/arm/include/asm/altp2m.h | 8 ++++++++ 2 files changed, 28 insertions(+) diff --git a/xen/arch/arm/altp2m.c b/xen/arch/arm/altp2m.c index aa56b3ca79b5..bf2d9095830f 100644 --- a/xen/arch/arm/altp2m.c +++ b/xen/arch/arm/altp2m.c @@ -7,6 +7,7 @@ =20 #include =20 +#include #include =20 /* Check to see if vcpu should be switched to a different p2m. */ @@ -37,6 +38,25 @@ bool altp2m_view_is_visible(struct domain *d, unsigned i= nt idx) return d->arch.altp2m_state[array_index_nospec(idx, d->nr_altp2m)] =3D= =3D ALTP2M_VISIBLE; } =20 +void altp2m_reset_altp2m(struct domain *d, unsigned int idx, + enum altp2m_reset_type reset_type) +{ + struct p2m_domain *p2m; + + ASSERT(idx < d->nr_altp2m); + p2m =3D d->altp2m_p2m[array_index_nospec(idx, d->nr_altp2m)]; + + p2m_write_lock(p2m); + + while ( p2m_flush_table(p2m) =3D=3D -ERESTART ) + continue; /* No preemption support here */ + + p2m->lowest_mapped_gfn =3D INVALID_GFN; + p2m->max_mapped_gfn =3D _gfn(0); + + p2m_write_unlock(p2m); +} + int altp2m_activate_altp2m(struct domain *d, unsigned int idx, p2m_access_t hvmmem_default_access) { diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h index 192240f48c33..14961736a238 100644 --- a/xen/arch/arm/include/asm/altp2m.h +++ b/xen/arch/arm/include/asm/altp2m.h @@ -52,6 +52,14 @@ int altp2m_set_view_visibility_locked(struct domain *d, = unsigned int altp2m_idx, int altp2m_activate_altp2m(struct domain *d, unsigned int idx, p2m_access_t hvmmem_default_access); =20 +/* Reset an altp2m view */ +enum altp2m_reset_type { + ALTP2M_RESET, + ALTP2M_DEACTIVATE +}; +void altp2m_reset_altp2m(struct domain *d, unsigned int idx, + enum altp2m_reset_type reset_type); + #else /* CONFIG_ALTP2M */ =20 static inline bool altp2m_supported(void) --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720864; cv=pass; d=zohomail.com; s=zohoarc; b=HZwAN2RfYUv6zZCVPPf1MuC5Mw1sCZxWlaEHHgpq72pylUb2eNTTZ//2VTEtaCxUe/i8V48y/sn/wmiw4gg+Ma2MZAbKRqVBnPaF+YRGkb6YH6FEqpSEntDTMO01xWCln8ypjSgKPtRbFAGj0Hmiemo//p5yDGMj+ieBxevxvRA= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720864; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=v5iBIWyVgGmcouUlKkYdR5ODo5vGhPP2Z4ch8z9yjL8=; b=A+nZPG96HKhYPYXwep/pvISp9zNOXgflUbZd73CfdmAPXLYGAHiWLIv+NKeUyTXNc4I8rxnlRlCzBsQAWc8eXA1hxNqZaNpYzYRDYkg5U1YJi+UEOjoj0qPCEtM70zLR2SMFfZiuzIK1f2fobTJ97xWl9PiXA8qb3GR8gqF02TI= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 17767208646101023.3820092924345; Mon, 20 Apr 2026 14:34:24 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287931.1568393 (Exim 4.92) (envelope-from ) id 1wEwFn-00033O-4C; Mon, 20 Apr 2026 21:34:03 +0000 Received: by outflank-mailman (output) from mailman id 1287931.1568393; Mon, 20 Apr 2026 21:34:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFl-0002y9-Sa; Mon, 20 Apr 2026 21:34:01 +0000 Received: by outflank-mailman (input) for mailman id 1287931; Mon, 20 Apr 2026 21:33:49 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFY-0000IB-7v for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:48 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFX-001NnB-Iz for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:47 +0200 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69b93-5cb7-0a2a0a5109dd-0a2a4504dc78-48 for ; Mon, 20 Apr 2026 23:33:47 +0200 Received: from [52.101.56.72] (helo=BN1PR04CU002.outbound.protection.outlook.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bba-1dec-0a2a45040019-34653848551b-3 for ; Mon, 20 Apr 2026 23:33:47 +0200 Received: from BYAPR07CA0064.namprd07.prod.outlook.com (2603:10b6:a03:60::41) by LV3PR08MB9642.namprd08.prod.outlook.com (2603:10b6:408:210::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:41 +0000 Received: from SJ1PEPF000023CB.namprd02.prod.outlook.com (2603:10b6:a03:60:cafe::21) by BYAPR07CA0064.outlook.office365.com (2603:10b6:a03:60::41) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:41 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SJ1PEPF000023CB.mail.protection.outlook.com (10.167.244.5) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:40 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzJ4185Vz1wdY; Mon, 20 Apr 2026 14:33:40 -0700 (PDT) Received: from BL0PR07CU001.outbound.protection.outlook.com (mail-bl0pr07cu00104.outbound.protection.outlook.com [40.93.4.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:39 -0700 (PDT) Received: from BY1P220CA0019.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::15) by SA6PR08MB9893.namprd08.prod.outlook.com (2603:10b6:806:422::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:34 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::ad) by BY1P220CA0019.outlook.office365.com (2603:10b6:a03:5c3::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:34 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:33 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:30 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=aGA81ZM5jZpEAtKeiiJKpcD0wQSrPx1rZ3a5gI9hqA30PGO+3UqvUe9PyTyBYQKrXFJVVsq/86lKghLfPiPbRaPYgLtbihCvE+LcPUex7QI5wDQ0/Tpk633OEWuhucDFZgVMkPz6udlUL55E7qO546q0Wg6x1j6KurXqhF7XlvJORQOTPypgx1ehTSRQtv1vSthlRydpu6QmKtq8LZG9lr6EebsrIpXsIgXl6G7w4+gj8j4MuwxbdYsZ3fCkwtgNZ4MGOYDzSsdG8Ly7i/D6tA2Wui4VfVxfBnDRFpIqEEmQ1bvQylERpHEAS8oap3MXnwQtC3/naY3vLP5EQnu3NA== ARC-Message-Signature: i=2; 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=v5iBIWyVgGmcouUlKkYdR5ODo5vGhPP2Z4ch8z9yjL8=; b=CRC4Ke7WwldP8SrDJndTQiLvs4Rsh+ie7rIrkAg4HhKvzaHhAoaH2L5METN7dyVI2Mvcdgb024CI+K4LXk6Oh9DQmBjspjv8OY92dxBw530jr0DJHhnJCuAG+hsUaFgECWQzlbeBqdoQpuzZFCtwdUXBWZXIo6Sh8cuYBCuVEIBA1FAKkvjwivo2hMmxw3gk3/aw718LK+FPGce8soQqt5rET96s0/HLUdWi7jVP684YmhmGhzP0NIW1OgrgNeKiymzjLNypzXujA0cbNsWnC7iIVaaaihzCWordnR9JxYyLraScOGhswqP8MtcXRA5LkyV4EWi4uf28DWLV86a6ug== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.4.4) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v5iBIWyVgGmcouUlKkYdR5ODo5vGhPP2Z4ch8z9yjL8=; b=TdQ5DuCT9XJan8tgPvjbA5zlhQgyrIcHjM1PqgcsiMhUBnoSl3mqld+EWUd+wDrOEXdBeqF40F7hjnHRmwGP5IOHVWA1CwcxUx4xUTF+6qp0RTauw4/QL1HgnEddbdTUKFfpoNRcukBuPf4P8CSqvQl8TwfjbxEoudyhu2XLxF8= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.4.4) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.4.4 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.4.4; helo=BL0PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T2ooh8zc6xOiI/OPfEqqNSvE8jQJm31OJVCdVS1Vbx7Ek6cKs1lu4ok8N9nWWp4op2ghtb8OKvDvHHHfBZ/pVGxyqqNbYjYh9/YBlgZtzvXOPVoIfxhE1Vo95/DVbdyu6ihyeBzLTVhOnYLXTt6paJAP2ZAMCa5mKTWOW9EDZhX99qt6N+phcBTSTd9Tqd/nT8CO8BGjVGqswczOC8eI0VkkFSekaBSvN2gFtmphsCsKlPMNBBSY8i057kDo/QWtrdLyj57M7V8YnYh9rHotU8XOkM7fW01I2yUYF+dLW9fROxYHJaXcdHcF00iJFcBrvWMQuhyIzD4yWYrzs827eQ== 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=v5iBIWyVgGmcouUlKkYdR5ODo5vGhPP2Z4ch8z9yjL8=; b=xCdEeAWMjqr9rSRO0U285nwG4100hDKe2LZE3G1Wp90klxs8xiRxjJ89ddqyd5MLqr8FoC7RBrZvuKoss9H79MxiRu2MQX7InsctihJNSDNm33PR23DjECIT9VRlzqHInlk9zAMPUBktjuz1ko5Sql2zGfeX/m+lzaMjIKY+77zdiH+sW+D5odtiLD67m1fWeI0IdXwecObL70X/u+L6UddVtVcBCmLp9hmZhUG6Oh9ANNPSuJx3+wO5eyI5uFLJEG6HhKWhj924pmrdm2LjbkVki2lg3wNolJrCIo9fMc6D0jgLXR/6nsLUSmyQrBm3rHQ6lXvfpF3vrl2/ifUWnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v5iBIWyVgGmcouUlKkYdR5ODo5vGhPP2Z4ch8z9yjL8=; b=TdQ5DuCT9XJan8tgPvjbA5zlhQgyrIcHjM1PqgcsiMhUBnoSl3mqld+EWUd+wDrOEXdBeqF40F7hjnHRmwGP5IOHVWA1CwcxUx4xUTF+6qp0RTauw4/QL1HgnEddbdTUKFfpoNRcukBuPf4P8CSqvQl8TwfjbxEoudyhu2XLxF8= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Anthony PERARD , "Michal Orzel" , Julien Grall , "Stefano Stabellini" Subject: [RFC PATCH v6 41/43] altp2m: Move altp2m_flush to common code Date: Mon, 20 Apr 2026 17:32:04 -0400 Message-ID: <20260420213206.208750-42-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|SA6PR08MB9893:EE_|SJ1PEPF000023CB:EE_|LV3PR08MB9642:EE_ X-MS-Office365-Filtering-Correlation-Id: 696c9fe1-ec7e-47f8-8082-08de9f247da6 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704160111799003|36860700016|1800799024|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?5VKCAxS7yB7pui9qV4QsfElVzYTZyZYJNlNksX0OkUvzl8RO+tQOag3ZjqUk?= =?us-ascii?Q?Q9T1jdlBqHvsVaPRVR5ucLrTBCdlcp7cCpbWoA5VQe7kicN5x7GY9pc5LYyj?= =?us-ascii?Q?hsm0CAYWTAOmZdNqABD+Uq3Py1aLyMqJFrjmkIm02ag/Ss6yMKld4PHjmIGI?= =?us-ascii?Q?m209KaLgiY1BMSc2xMr5AtfFHoo107BsXfkSYCPdpw4rUSPbbsiK1ecuQUuS?= =?us-ascii?Q?DL6F62FF58Z1CMrRUQF4RrXHs2dJCKOtZ487DGubFlaR4viFajNPdRGrqrbH?= =?us-ascii?Q?dGSGv058kb2mJ6RpTQzWBVCYVmi2P+Bd1j/qEJlkykKPO9n/0PN3R0IBamVf?= =?us-ascii?Q?qrPsJRac9mIod1ys2r8qKse4eOhZHSDArm7jTzNa5kOXnHx/ryfEvuX619td?= =?us-ascii?Q?rqm9LsRW5MyhuI9gIHv3dinCLTu9KhY7UIuCRH8+6R4x6B5GWBpsnk7F9lf8?= =?us-ascii?Q?WsvPSzyzSnIim9wkFzu9UgIrba4FQWuhQVtCSoBtyAHAYErec9xPrkz66FwV?= =?us-ascii?Q?T0fYl+HjL83GRvbMoVcKVSjnKWhI7SUDbn2nTtyKbIo1aw8EreAPmXknmMQE?= =?us-ascii?Q?wa8O8i2IxSiLx1yS3RxaSKQr7S+crML5eilBtZbJTYgvceHxyTp62X5aeBY7?= =?us-ascii?Q?kSrv21+5cv5RCbtkKiRff2vw3XKWGxKwmJSwYHEoD52efnDJXLDaTWalXxWX?= =?us-ascii?Q?sQnRTOx/DpACyyWhpmWTlqGraBelRDQFw+8hjFP28j8jxlopcerr3B7NZxz0?= =?us-ascii?Q?Lgo/IoZthrOqaKUmCZoDP9mgZjh2Jh4grrUUdC/sobSTmaw375I6dWJORzhL?= =?us-ascii?Q?xXlroUDW9O7QPAl90NW3N/7jcJYV6CW8rEkpxcrwEOyp1X3F7NRVpVhbUCiw?= =?us-ascii?Q?UTkTiYROVCo06gsUw7lDMumt6dUtSRVM9ZzhbyrwJj5BOagX476flBasXbvw?= =?us-ascii?Q?sJq1JwN+v5c2ImFuZxm73wmU1EJaLoZLp+Hb+yNmGqGgOpx2z45iwzv9oX7E?= =?us-ascii?Q?iy6uEvRmhF9v8djqvlUGoVmjRyOaXD2EcmPMFDjPPEtAFOmzecrl9XkqCCyG?= =?us-ascii?Q?g2arcpX9dIjJpkJZ7GORIG+Lqan34pLMCLBIyZr+NCzSlj3zMp+ez4CBI5oV?= =?us-ascii?Q?TljthU0gMgHgXNw6vos4QSelFenJfbnfTKxedIbrtRFSE8p64owhDOtp1jb/?= =?us-ascii?Q?G8ZMT/4IKiJYP+/Q?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704160111799003)(36860700016)(1800799024)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: OzXw9y9zYJt0BF9Wte8aNPLKGxMClHZ99RbWkdkFyvFLVfA01gINsOeR0rHRZWvPm8fLoF6wAiZCWLIAs3wKrzmUDv2qkVjRarlkzPWwG9RgoZuQxLn92Iyyn91TbnWopdHKWD+s1pH4jy0v7ePU0hrJI4N2MQfN6MonV5JCQ5xzihEsFqc72vFyiW0qBP97atjCoKbSfzLh7xx0Bk8R8yiEX41T7TL2DnO0jtEoNXhhUeNwajhCh5wIEVoSN7JMlMiN/rIjYfZV3wRASY5APOHVpTI3wukGZ8dNuW9/Hdw/ghu8iE//cgc6MXe9ka6mzW8PJNmCTOgsQvE87III5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA6PR08MB9893 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.4.4];domain=BL0PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.4.4];domain=BL0PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SJ1PEPF000023CB.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f3f46968-f9d9-4744-07a6-08de9f247998 X-Microsoft-Antispam: BCL:0;ARA:13230040|704160111799003|82310400026|14060799003|35042699022|156008|36860700016|376014|1800799024|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?I1nVlwQjpAM0RHXl1TCGVqGGSA8afTd8SQMHq72EyYO6M+ZA/BrkvFHr/spG?= =?us-ascii?Q?3UMlmpvGupOypHnVaj1eyH8WE73LrzdSbPpoSerNm/4kKQZslDOx5r6/G6sY?= =?us-ascii?Q?CW5rkY8zr/0u+qe6nqeN/cr7lKDWqpNVweyQ4bjq2MTOCp8p0uNLUbc1nW+M?= =?us-ascii?Q?WKVuyNiRTvsTcgo6RgwFs2VxAbRNaK2uWXAMhUM2sNie/NiI0KSN4yLU+p7u?= =?us-ascii?Q?hgezl7TLCLHDfSgzDRIFeVEtnyUWAH765FTm859gk3KpCcAt5+jL477PQLBn?= =?us-ascii?Q?bm/SN38i5q/UqBFp+dXnfheTyEW0CH3jwW36vNsT9kQczpBg4KEnL+D0Gnx9?= =?us-ascii?Q?2MsvUXsLgzpJWip8wjN+v85u5+DJONP/XSHG2Z68e+w2Ei38PrrxGIu4C4k5?= =?us-ascii?Q?8gAnudYZwgNrkQUu+gfsTYg4Ze6P8mmY0ANZ/LnwhVsBMZA+ro1JPF57uR/s?= =?us-ascii?Q?82Km+lSejn20cv7seMvXdRtj1HLYS9C08/V9FBm/k2dEHxWSE1lakrAQMF0/?= =?us-ascii?Q?MOhO0FLr3KRF853zFHgoT6EokPWAQ+fv0SUZeznrn2ozu9OOQKOeHcQ5cU1g?= =?us-ascii?Q?u+wWqmg1DN3GgJ1ujJbax9MvhdGMZ6ZQ4T92374txfEHXwhGc3vWMA5NJIUY?= =?us-ascii?Q?Lcv+BN8kLfamfzKjySyLn0Hn0K1R5qwRlKJ1GGmPXpnbpAujppD6muL81x72?= =?us-ascii?Q?CxZ5ooErIcleDSfAjs+nfZKfhKcvIQhCSRJ11eAmLWDlYjpfAaZSUepmJ/7d?= =?us-ascii?Q?f/CiK/7DB57kLavT3wDjrRgxzzXg56e46AOYn9/CYUb3+bH1UEdtrOX/VBSS?= =?us-ascii?Q?uEPlv/aTlQ0vXel/sPRhDd/NtBGMqL5Xwd4JnD6MO0ObA9tQK4I0uhP7iN8H?= =?us-ascii?Q?nurr2YpS2wGmYC3F1PvpytsUJ89bQ0Jc+7PQVTzgcdXSiIUUmxsWDujQ5Vy0?= =?us-ascii?Q?W8q3DtYBsWcSIWU6GoGmTZZ7ALV/F3iuw+g59Mr69VGg/V+tjBQZfWoNfU7Y?= =?us-ascii?Q?Zv4vkUJehFZpRb7KzO4jH8adwBH7NcYxTpkFlfkbEcWd9O8CGHOvcvtJl/oC?= =?us-ascii?Q?jlpupIvQyZ5nI8poKAND70AEN4LMAOCMupERmsclJG54N3h0rWPl0vJQdjzw?= =?us-ascii?Q?X7IrKeybayuHsRxRb2Mk+VL/QF44aSizedDXePT6F/NN27xDPeOUiEl63wkz?= =?us-ascii?Q?7soIEOaL/jzuTeYf?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR07CU001.outbound.protection.outlook.com;PTR:mail-bl0pr07cu00104.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704160111799003)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(1800799024)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: r90BpymZfY4KxP4VqWirW8NzUJQNL2BmkzWIAJLkoG6hmvUCa3e53qTuzUu8rbAi22FfYBo9uz6n65G72R1vEnG31ZsbBUcjC1nnxQdi0UAoVboCicBYLxbtFuvBqwEWyQUwnbxeyCiWnWK+qyOaPqA+iMB40zTDkjXSLpJiqe7LvKZ9EyI0Au4m9w/71R4Nqe/8KuICHdwj1Rokb6st78up6ky5yNp2i0RZ3X3sK7gLXbwcEIquQYKzwSBnYsTxp65ioSI3g2NDTQMUtZTteEZLkMp9QUu4i6AiUsJa2PJotcwXC3t/K/XbCreiUO4kighhaKfL7+EMMe5HeaDO1kDYYpLF1Sc0A9SluQ1t4a/oHYrDzvEuhl0LxEkmnre491b6rKtZPELl5TcYPfAAXAUq6a3FFGzrmTdlknxSO8A29BF0qRxmbesNm6PuAhcS X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:40.5888 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 696c9fe1-ec7e-47f8-8082-08de9f247da6 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SJ1PEPF000023CB.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR08MB9642 X-purgate-ID: tlsNG-ebf023/1776720827-2997A3FF-29B9BF9D/0/0 X-purgate-type: clean X-purgate-size: 3378 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720865642154100 Content-Type: text/plain; charset="utf-8" This commit moves the altp2m_flush function to common code. This makes it possible to call in the common implementation of HVMOP_set_domain_state. This commit contains only code movement, and no change in functionality is intended. This is commit 1/2 of the altp2m_flush phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. --- xen/arch/x86/include/asm/altp2m.h | 2 -- xen/arch/x86/mm/altp2m.c | 16 ---------------- xen/common/altp2m.c | 18 ++++++++++++++++++ xen/include/xen/altp2m.h | 5 +++++ 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/a= ltp2m.h index 02b5e1a11220..d11f20f1e790 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -82,8 +82,6 @@ static inline bool altp2m_view_is_visible(struct domain *= d, unsigned int idx) /* Switch alternate p2m for a single vcpu */ bool altp2m_switch_vcpu_by_id(struct vcpu *v, unsigned int idx); =20 -/* Flush all the alternate p2m's for a domain */ -void altp2m_flush(struct domain *d); =20 /* Find an available alternate p2m and make it valid */ int altp2m_init_next_available(struct domain *d, uint16_t *idx, diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c index 18f8a71f1682..de91d1e67709 100644 --- a/xen/arch/x86/mm/altp2m.c +++ b/xen/arch/x86/mm/altp2m.c @@ -253,22 +253,6 @@ void altp2m_reset_altp2m(struct domain *d, unsigned in= t idx, p2m_unlock(p2m); } =20 -void altp2m_flush(struct domain *d) -{ - unsigned int i; - - altp2m_lock(d); - - for ( i =3D 0; i < d->nr_altp2m; i++ ) - { - altp2m_reset_altp2m(d, i, ALTP2M_DEACTIVATE); - d->arch.altp2m_eptp[i] =3D mfn_x(INVALID_MFN); - d->arch.altp2m_visible_eptp[i] =3D mfn_x(INVALID_MFN); - } - - altp2m_unlock(d); -} - int altp2m_activate_altp2m(struct domain *d, unsigned int idx, p2m_access_t hvmmem_default_access) { diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index 929449b1b03c..0dd3ecf226fd 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -123,6 +123,24 @@ int altp2m_init_by_id(struct domain *d, unsigned int i= dx) return rc; } =20 +#ifdef CONFIG_X86 +void altp2m_flush(struct domain *d) +{ + unsigned int i; + + altp2m_lock(d); + + for ( i =3D 0; i < d->nr_altp2m; i++ ) + { + altp2m_reset_altp2m(d, i, ALTP2M_DEACTIVATE); + d->arch.altp2m_eptp[i] =3D mfn_x(INVALID_MFN); + d->arch.altp2m_visible_eptp[i] =3D mfn_x(INVALID_MFN); + } + + altp2m_unlock(d); +} +#endif + /* * altp2m operations are envisioned as being used in several different * modes: diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index 8fc16346d95b..fa2c11f5432e 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -74,6 +74,11 @@ int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(void) arg); /* Make a specific alternate p2m valid */ int altp2m_init_by_id(struct domain *d, unsigned int idx); =20 +#ifdef CONFIG_X86 +/* Flush all the alternate p2m's for a domain */ +void altp2m_flush(struct domain *d); +#endif + #else /* CONFIG_ALTP2M */ =20 static inline bool altp2m_active(const struct domain *d) --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720851; cv=pass; d=zohomail.com; s=zohoarc; b=TpeGFLlM0k1LfUuUzuQm3NmrZU8i9LH7ZrgMD5hnfheNOXgQo0UuECGAdZ5oLWovzOOfxHcEufW4NPMkgDNrxrADcE6rCC/JlGaQY8q1AIpjykklTk9v2sOYsCmwTVWTUWitGKLf6fP2soYmP+vvRvqQkDigo3oP3K6vtRincWI= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720851; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LB6UB8nPNPDJ1HE6m3AZNiyAJltYGI2r4/Nm/aLYhC4=; b=CkbxmCOD05ZaBmX5XVGFBNXq/+spp0VBL9pmAbOsWb5ylovDZPJqJUn/zFMm5As2SNuZ3B+JWiHqqpzFNjnvWK8SDwRJK7u3eFtzRPU7BQu7jh8ddeRY8ZEDC/oYxxiPRLO9TEn6pv0659aLecT0MV5ugryroUGvT5L+ZatX4M0= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 177672085103478.37993230207178; Mon, 20 Apr 2026 14:34:11 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1287922.1568374 (Exim 4.92) (envelope-from ) id 1wEwFg-0001jj-UZ; Mon, 20 Apr 2026 21:33:56 +0000 Received: by outflank-mailman (output) from mailman id 1287922.1568374; Mon, 20 Apr 2026 21:33:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFf-0001cX-Ej; Mon, 20 Apr 2026 21:33:55 +0000 Received: by outflank-mailman (input) for mailman id 1287922; Mon, 20 Apr 2026 21:33:47 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwFV-0008IB-VA for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:33:46 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwFV-00CCPQ-BA for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:33:45 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69bb9-bab6-0a2a0a5309dd-0a2a4502c9e8-2 for ; Mon, 20 Apr 2026 23:33:45 +0200 Received: from [40.107.208.97] (helo=PH0PR06CU001.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bb7-af86-0a2a45020019-286bd061ffdf-3 for ; Mon, 20 Apr 2026 23:33:44 +0200 Received: from MW4PR03CA0050.namprd03.prod.outlook.com (2603:10b6:303:8e::25) by BY3PR08MB7201.namprd08.prod.outlook.com (2603:10b6:a03:36e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:40 +0000 Received: from MWH0EPF000A6735.namprd04.prod.outlook.com (2603:10b6:303:8e:cafe::d0) by MW4PR03CA0050.outlook.office365.com (2603:10b6:303:8e::25) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:40 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by MWH0EPF000A6735.mail.protection.outlook.com (10.167.249.27) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:40 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzJ414vXz1wdW; Mon, 20 Apr 2026 14:33:40 -0700 (PDT) Received: from SJ0PR08CU001.outbound.protection.outlook.com (mail-sj0pr08cu00101.outbound.protection.outlook.com [40.93.1.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:39 -0700 (PDT) Received: from BY1P220CA0015.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::10) by CYXPR08MB9634.namprd08.prod.outlook.com (2603:10b6:930:d9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:35 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::14) by BY1P220CA0015.outlook.office365.com (2603:10b6:a03:5c3::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:35 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:35 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:32 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=QfxDAwOGhuwOOhRNDAhFecwO/twv8Ua/nLdlSrHHXpBfyC+ufbBIryVG9I4PyLEpQZhepD91KCFGN+sTKhDu+V46aTvpkTvQhGbM+msGz8kgrhs+QEi8DPEGO5G1jhSG6A7SEGai21wv3cRnW6Fma/sqJ3R4eZTZ4lSUAqyC4RrBXMiDwZq2wOHUDi/2XRKvt2ETbfbcfRCFTNEYOV/EZniYvQxzFgBccDiikWOfWVCemWntV4c5X+oDRZ1BBdeUGGT3WrKcqWvFu0+mAb6dUvH2Da9qjZsyKTuNzdekV/Bcq4ec+LSncVjW+R6Xs2INN5kktFSmpSS1HkDTBu6hdQ== ARC-Message-Signature: i=2; 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=LB6UB8nPNPDJ1HE6m3AZNiyAJltYGI2r4/Nm/aLYhC4=; b=jLVs9z2xzofau9m3ZT1VltZOFIby1kP3p2Om2m33fVvJ7Et3XbsY4fEBU1zEj+mVLae7jniBPB1L0NcsW+JZHimHuW0zE8SzTg48ghlrNgktcJqYfH7bNVtpkNYSrYJAGX/O5IN2qvyt9nkalHmGjxFDwpyA3q676940yMqTDKl/HVxTN/MrFqs1914H/kpESX2pwmwHoEK9aFxTlJHNXU/VYURDuFVOBGhAIeCnBW9XJxpd/IjkGZurndb2X9RQ0pMgLiZiKfT/Ps0nZsk127wgHz145Jz1dpFmxFa75UVTJKl9PI5ySARs7y/BZAIMurb5D/adTFYWT0VdCWvVcA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.73) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LB6UB8nPNPDJ1HE6m3AZNiyAJltYGI2r4/Nm/aLYhC4=; b=qED/O/8XMTwmpggQg9GZlEmZdhwreyCWLSuB3TN1fhjUGzpNo+c2dgtByVHMmmKI6GXrF4wuGrf+aGO5PgAD4xKUrbFi0cZvpK74mNO3RWh6BgwjVSwQdoZJOOqzDq1mTyHqAjRJmwfCLG0Bv13c0FzZk9givNhaeu9p/KXjYQk= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.1.73) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.1.73 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.1.73; helo=SJ0PR08CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Iw4fK9+0SsQEVeh607QdPYVVrAaF/Vlw9FPSAlsfxdaVCAyuArXLk+5WOxFsGtIS6+/cwxS2iE8OEkMZE4VgvdnDt30QNqzzP8eTWH9LUs5iC3CZS8RcdJOBnGPFDICS4rXS2J/lk4aY+vqfvHVm76J5F9xSOOKXT1Gz43sCEYCLFwzn/YBWbu1i6u7Eaix/7al4hW7E3Qa/ys+eET7aD5jw996sLBd9lb79gLKTYNH3rYWVh3IegISIzwLidi2mOufcU7M+rzpC8KoM53xL5Umc1y0LqdQZDKgzxjxjbST6limSfvzV8TaBwgd3HdK+TV/9Tw9uAPuICfjw2IpRHA== 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=LB6UB8nPNPDJ1HE6m3AZNiyAJltYGI2r4/Nm/aLYhC4=; b=oNzsDnwNZ3hW3nYWEEX0wfwbMKvsFIIT4VdBa9saQ8mqfCQjKfsT7YpDPMYyoB7Yx2T4YdEO/GyLChAzEduz8jtOLFcGLg28VrIyq2mSdDKTo2Z8wVKqE68DzoH+8u3EyCLAaozdRrkmQcFS1051DH6kMtWLPl0mIL4c1P/dzszQQRjIFT002OFsyxO85tyw/K74eSdmGMlrfFc5GIGP54u5PK/wsi23MSgFOuXOccPr5vx4ksa+HN2l0jC1FG8IZuWLR270fcjhbRBofRGaqtkpGz/2vogd78UWLvDkW50gGLCS7Tn0i3xLPaIFgQRXj0Du49WhU5+E6MFNvBXBig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LB6UB8nPNPDJ1HE6m3AZNiyAJltYGI2r4/Nm/aLYhC4=; b=qED/O/8XMTwmpggQg9GZlEmZdhwreyCWLSuB3TN1fhjUGzpNo+c2dgtByVHMmmKI6GXrF4wuGrf+aGO5PgAD4xKUrbFi0cZvpK74mNO3RWh6BgwjVSwQdoZJOOqzDq1mTyHqAjRJmwfCLG0Bv13c0FzZk9givNhaeu9p/KXjYQk= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , "Julien Grall" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [RFC PATCH v6 42/43] arm/altp2m: Add support for altp2m_flush Date: Mon, 20 Apr 2026 17:32:05 -0400 Message-ID: <20260420213206.208750-43-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|CYXPR08MB9634:EE_|MWH0EPF000A6735:EE_|BY3PR08MB7201:EE_ X-MS-Office365-Filtering-Correlation-Id: 2401a26c-74af-4c81-3b81-08de9f247d65 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704161411799003|36860700016|1800799024|376014|82310400026|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?u030/QuE4rdGUY8y1qsuRdeWQokMDXqv3zAIhtEb1MAJdaFiRoGjChW0a1jz?= =?us-ascii?Q?8MjaKe0abcGAQbRmXW3rD7cp6zQQwMKzfVwwp26VOb6g7xBJnXesKIpjSt72?= =?us-ascii?Q?iA9QnRdhtZYLcQp+6NWiJ3hcpox4tYuiKCnM1rLZGx8QrR5RC/uMZhIfi+JX?= =?us-ascii?Q?d4W00FhoXEPhOohfRtkciYYE/SJ4HdbNrSfX7Ij69Q2gUYIV5yw3eEP7qRi1?= =?us-ascii?Q?1pYqhQMB4TQw926DvXIkxEaZzEln2PmFeVnvT0VNtNE9ZMgsFldUqZosgnBt?= =?us-ascii?Q?ZnTKrMrKr947Q1L/+CNEwYLE2bRD6kPDoYQ+M3IwoZhbTZXt+Yy3ddMFAR0b?= =?us-ascii?Q?Bedkll78e35Z7HMsTxKKgbcqZAn2CM2ZCWgl9ynVYhYUUPhdEVw8c7p2x9I1?= =?us-ascii?Q?4ym3v5Y63ELa0vy6K5i+2wMS4K2xYsflLWmfPGceFaojsIYV2WiemNt3LSu3?= =?us-ascii?Q?G+8gnPR59ug5IilRLuqAFq29bSKPYzBlstUQwcBhqqavO6WNwFDorApHflTx?= =?us-ascii?Q?h71+/O3hH3F1OP9RhNOCAZfpynO7XI7rtXr9rBQfS9eUZ2dJtVlM2P79gPVB?= =?us-ascii?Q?/FOxV06po1LXcP4Eg5icD8iPP9ys9bfVR0Eiz/rycjDRlhCRgnlFhVE5GlxH?= =?us-ascii?Q?eZRczVMU7dN1RQ9as8pxhkxBc7TmwfEMrwL5e4rquXWXj67Tp2bfLrdMkCrF?= =?us-ascii?Q?nvIBcqiofStQKHs8BD/0FZyvkq5r8rGsLKEUlw3cb1RcyYyBQCM0kCh+L1oi?= =?us-ascii?Q?fhZkbu64bI+T6IYtY2iq2C+40EUfxsNVFM2W1q2qSFXur2nTeGhDT82r9EgH?= =?us-ascii?Q?OE/iwAU13ALlbARAjf035x2E8r2LMgYep0oNVUZtqQNWZ/kC8sF/7KCLNsMy?= =?us-ascii?Q?+anJk0odYHlvz1uuiJK2PR/oSpdLSJOz+8WAZa8eHVR2oMOoUz/bgl8e1P2t?= =?us-ascii?Q?mlwn8adeSKiU3PYM+wsGIJ/VgROmuJPxkCgem6YYKea685wqfxKT/jdLd+Di?= =?us-ascii?Q?+uAlh6GQjcGVQGGXmgvH2NCKuMVRJG0HmQt5LYlmIqK5xRZNu5YiHH8ewoje?= =?us-ascii?Q?LpS4JfxBzjBMfp5E7Hd770wDQYpU4yVC9H7aN1Mr6Wi40jijROCh+Bf3/a1u?= =?us-ascii?Q?SpOfXbF7/YP88CPIBEdumH4Yik33wu5wZyyexDJG/LnqayqHsc9gjamimkNo?= =?us-ascii?Q?Q0Jm9nRFNcwY1eIl?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(704161411799003)(36860700016)(1800799024)(376014)(82310400026)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: GQ/HbE+wkVPlVkB5iPvgF5xwT8hbGFBg2Rz21nhd6YHP1pFQwfl8Ey2d8MTESumB8JaN4CgzPZOo/Nq8Bwe5h+1dYRN6uxkOKUeOm+UXkt0JjsikmrSzEUYCV74foOXWfVa8R2UBF5Y4gPrvJQuDHxAhBtzLqbWSlYqV9JG8jWuVGdLUUvPioY1UqWsrTFHTdDWVkjkCJ87N42QmnZTDbW//3BM9CqMzCKEBA9gZNcadzPHOBsPDjQbdPcNTsAwHMYIlFx7b32a2hRjGOe4mT1au3iovVi2JEecj1Yd16BKa56Xp6upyisT2Gmxu9PIvX4um848Q8kyomIb0cgzX+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR08MB9634 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.1.73];domain=SJ0PR08CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.1.73];domain=SJ0PR08CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: MWH0EPF000A6735.namprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 7c2e5957-f544-4a56-a68e-08de9f247a65 X-Microsoft-Antispam: BCL:0;ARA:13230040|704161411799003|1800799024|82310400026|14060799003|35042699022|156008|36860700016|376014|56012099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?rAbgB1WKgSJIfDnpSDZdr0v71AOeEGt7H97Bc2ACE/1N3raT4n2B+ERi0IyC?= =?us-ascii?Q?0uB1o1EwCCndHW892UX5/zzdYZsxv/0lo5KaNcfw1Nyk+EyJks2OyeXZYED/?= =?us-ascii?Q?61oj5lTJAcYlgjJ5zO+Qu23pSeIUBn5P2JCDpMDpfwreqUH4SGNAjYaqFoo6?= =?us-ascii?Q?E5ZlKz9x/DlADBl2T3n94KT7tAV5snEa6f86/x2i9ZOou9cJtJew+/eMIGyJ?= =?us-ascii?Q?cokiHSRrdrhWWFytnTU68GpsS+jC+I34Q7ql2a09OEUWe9Aq18yacurT++R9?= =?us-ascii?Q?bnQ+HPyl3eKHGCDS9f2UpMTpEKuMLpDQ4yaBW9GbZWeeyQbq0WcdPBN91hQv?= =?us-ascii?Q?uNbmp5FqjId+Nx8kJlt3xdyHAV9YCw+b5dh8SaA8i/pu5sLUW5V94qxguwlj?= =?us-ascii?Q?5wqOqngM707QNQkwjNK20/x+7KuWOf2lGMOmM+boQwob5U4AG6YhLHnnvgMl?= =?us-ascii?Q?Vx2QnJB4DWxvG5Xlckvar6q3YFU4Yt9GQTOBfwI4Qy7xY39I0yLu5srWKRMs?= =?us-ascii?Q?RjRa1uQ7W5cOSDvwawMcezURSlkWjCXzOhDpQ//6MrYXS2lmvsYzuyN2vV7Q?= =?us-ascii?Q?Csa5Wq61O687ytEGC6N5LTUgy+R+1GTlT2/1il3oGEhYsa5F9f4zfPtAAKMf?= =?us-ascii?Q?5bOCNce2QVDoRhscNGO/y+6X0/Ew6Q4OOIOwUU/PksYWJQ/E00jGdXMdSiVB?= =?us-ascii?Q?OtkvvVAefFYszJlG5hmxKcseNiqGqrn8R9m6aelZpBblOjdZC3LYngTd2ojc?= =?us-ascii?Q?82XAz/f5gPJQNgkZXGcE2HVRORdUp6HbR65k7tn23kW52nwpvOTIC71zogFP?= =?us-ascii?Q?VewbRP+JJXL1QIHq2PNcVwMYvZXMBRrwkLqHWNlJRsaPoiWND8lzUA6aGC/4?= =?us-ascii?Q?rFayCb92CQwT3buGZm9baXLTyMZ0yPj5siG4yrWnWv4IwCqDOo2QKIni5gWH?= =?us-ascii?Q?L9Js3WwNOktpZNNINRpgauDpWBBptxh3MNQioTOhnYjwG3HpEyChrJ8+UWmM?= =?us-ascii?Q?RwgdSV7YfcqMjUY/MvtSk5dxd9xfwLcdyubxhxF6zmjrY91BJKcyP2Ev7JUb?= =?us-ascii?Q?Am2PDNJiHLi0TPD1JkS0sXyJjg6SbyW/9CeUxXbfLPsbOPIkl3IRXfNTAj45?= =?us-ascii?Q?IbxQADU/YKQJ0eoy6tu6EVScKIJ83xotUwIIkFbwTXgPfeSsk4OeOCXRkAp6?= =?us-ascii?Q?tkKoWPCZyDezxa4J?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR08CU001.outbound.protection.outlook.com;PTR:mail-sj0pr08cu00101.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(704161411799003)(1800799024)(82310400026)(14060799003)(35042699022)(156008)(36860700016)(376014)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8+NdLyPprCdCj3SMjh/5XbLTBqrjD0tnuhkeJ9TusAAYfeX4FprfAr15p3Z/rcVDIZRoaMC0jplzpB4utpkin/joIH3miEW0Aaa8mA4AEj7w8g5Ii23i5KrMk4qETp4P07ws2fXJjJVTn4Q/1AN8u7whp4JpFBDqrJR7XiE37syySqMdHvj8aBojrSKQztzH6i4gcum41r8S7QYVc5qYY8g8PlDMyAS5ILogK3mAZMiTGEVDWc7AE8BariKgN2pm58QByh4MGlBrHj/qfYEhxqbDIHCuqnXgRNLEX9MCs1ZaLZNy8hwbD3sJ3/b2m94bHOqM6W+HU/jni1fNuE+yso2ZCVI2qKjYC01+u7PjOsnSyWCfRv3TUlGrcFNp21k3IofnDpH6S/jI7KiCPR0I29BYaql4/T3iIQI0eyBPmYsYDOl9+mw7uv0YH07k+2Zd X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:40.3694 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2401a26c-74af-4c81-3b81-08de9f247d65 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-MWH0EPF000A6735.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR08MB7201 X-purgate-ID: tlsNG-720697/1776720825-B2969161-FA4B2E62/0/0 X-purgate-type: clean X-purgate-size: 2484 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720851412158500 Content-Type: text/plain; charset="utf-8" This commit makes the altp2m_flush compatible with ARM by replacing the x86-specific set view visibility code with the architecture independent altp2m_set_view_visibility locked. This is commit 2/2 of the altp2m_flush phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. There is a small amount of additional overhead introduced on x86 by replacing these direct array sets with calls to altp2m_set_view_visibility_locked. That function also calls altp2m_is_eptp_valid, which performs additional checks, and also bounds the array sets with array_index_nospec, which isn't technically necessary here since we can be certain that the array set will be less than nr_altp2m. This could be resolved by introducing another altp2m_set_view_visibility variant (ex. altp2m_set_view_visibility_unchecked?) which would replace usages of altp2m_set_view_visibility_locked, but I'm not sure if the overhead is enough to matter here. --- xen/common/altp2m.c | 5 +---- xen/include/xen/altp2m.h | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index 0dd3ecf226fd..d980ebed08ab 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -123,7 +123,6 @@ int altp2m_init_by_id(struct domain *d, unsigned int id= x) return rc; } =20 -#ifdef CONFIG_X86 void altp2m_flush(struct domain *d) { unsigned int i; @@ -133,13 +132,11 @@ void altp2m_flush(struct domain *d) for ( i =3D 0; i < d->nr_altp2m; i++ ) { altp2m_reset_altp2m(d, i, ALTP2M_DEACTIVATE); - d->arch.altp2m_eptp[i] =3D mfn_x(INVALID_MFN); - d->arch.altp2m_visible_eptp[i] =3D mfn_x(INVALID_MFN); + altp2m_set_view_visibility_locked(d, i, 0); } =20 altp2m_unlock(d); } -#endif =20 /* * altp2m operations are envisioned as being used in several different diff --git a/xen/include/xen/altp2m.h b/xen/include/xen/altp2m.h index fa2c11f5432e..5222c24ef418 100644 --- a/xen/include/xen/altp2m.h +++ b/xen/include/xen/altp2m.h @@ -74,10 +74,8 @@ int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(void) arg); /* Make a specific alternate p2m valid */ int altp2m_init_by_id(struct domain *d, unsigned int idx); =20 -#ifdef CONFIG_X86 /* Flush all the alternate p2m's for a domain */ void altp2m_flush(struct domain *d); -#endif =20 #else /* CONFIG_ALTP2M */ =20 --=20 2.34.1 From nobody Tue May 5 08:59:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass(p=quarantine dis=none) header.from=elektrobit.com ARC-Seal: i=3; a=rsa-sha256; t=1776720962; cv=pass; d=zohomail.com; s=zohoarc; b=kUtjK3WTDgylA5PkCbDuSaxFNbQArLq3w1RVuSL5x0FZFB9KBk2wGzoPwaJ4oV+baCn2Sc4AcExZ1uU/OcriiZCyYAz0f3wAgvKcm+DeE2ehq+n+J7ymTlAfKZQ0WtbjP4vn9EDG1Oju5FV5Y8H3w3t8E+W4HBuuBQAvCYEhRqw= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776720962; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0lp53s3cEzb9Nvz/oAdVE45KuMPihoHv/HOfldJHvpI=; b=Fv3lUWjOGha2HZ/tpvAsObhhP1CN5/jw0e9FxOzaazYEExR2+HqO6/XtRRILig7m/n3HIiM/bI/UbZheVUAuxKrHd1WMUrKKCcIiR2rQ5non0CvWZrwsmsRTkersCAK136WaShX5n51g8mqbxAe/mELTaxsl2spw18IYiOxM/kU= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=2 dmarc=pass fromdomain=elektrobit.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 17767209629192.5986268656324683; Mon, 20 Apr 2026 14:36:02 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1288108.1568447 (Exim 4.92) (envelope-from ) id 1wEwHV-0000nS-Qh; Mon, 20 Apr 2026 21:35:49 +0000 Received: by outflank-mailman (output) from mailman id 1288108.1568447; Mon, 20 Apr 2026 21:35:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwHV-0000nL-Nu; Mon, 20 Apr 2026 21:35:49 +0000 Received: by outflank-mailman (input) for mailman id 1288108; Mon, 20 Apr 2026 21:35:48 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wEwHU-0000nA-D6 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 21:35:48 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wEwHT-00CDNp-Q1 for xen-devel@lists.xenproject.org; Mon, 20 Apr 2026 23:35:47 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69e69c0c-2eae-0a2a0a5409dd-0a2a450283ce-28 for ; Mon, 20 Apr 2026 23:35:47 +0200 Received: from [40.93.196.138] (helo=SA9PR02CU001.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69e69bba-af86-0a2a45020019-285dc48a8c50-3 for ; Mon, 20 Apr 2026 23:33:47 +0200 Received: from BY1P220CA0049.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::15) by SA1PR08MB972883.namprd08.prod.outlook.com (2603:10b6:806:4c6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.32; Mon, 20 Apr 2026 21:33:44 +0000 Received: from SJ1PEPF000023D2.namprd02.prod.outlook.com (2603:10b6:a03:59e:cafe::10) by BY1P220CA0049.outlook.office365.com (2603:10b6:a03:59e::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:43 +0000 Received: from usbth1es003.ebgroup.elektrobit.com (4.79.107.243) by SJ1PEPF000023D2.mail.protection.outlook.com (10.167.244.9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:43 +0000 Received: from usbth1es003 (localhost [127.0.0.1]) by usbth1es003.ebgroup.elektrobit.com (Postfix) with SMTP id 4fzzJ71Vrkz1wdN; Mon, 20 Apr 2026 14:33:43 -0700 (PDT) Received: from CH4PR07CU001.outbound.protection.outlook.com (mail-ch4pr07cu00106.outbound.protection.outlook.com [40.93.20.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp384r1 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by usbth1es003.ebgroup.elektrobit.com (Postfix) with ESMTPS; Mon, 20 Apr 2026 14:33:42 -0700 (PDT) Received: from SJ0PR05CA0206.namprd05.prod.outlook.com (2603:10b6:a03:330::31) by BY3PR08MB7073.namprd08.prod.outlook.com (2603:10b6:a03:354::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.33; Mon, 20 Apr 2026 21:33:39 +0000 Received: from SJ1PEPF000026C4.namprd04.prod.outlook.com (2603:10b6:a03:330:cafe::b4) by SJ0PR05CA0206.outlook.office365.com (2603:10b6:a03:330::31) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:39 +0000 Received: from denue6es012.ebgroup.elektrobit.com (213.95.148.172) by SJ1PEPF000026C4.mail.protection.outlook.com (10.167.244.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Mon, 20 Apr 2026 21:33:37 +0000 Received: from ubuntu.localdomain (10.10.178.50) by denue6es012.ebgroup.elektrobit.com (10.243.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 20 Apr 2026 23:33:34 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=im6LliEQZ3m2AR2HF9hF1s7UQpm9HNlH+h5Tu2HuE07+r/2f3etESXKmVGzEVp/p9rgePwxwUXca2CKl1iTPQzfTR5EkhqPcJ1/wi6/c+VZ4Sehs8xyqqeXYcOM5VfZLd9vRetRiHCHaUdGc+pMnxJk512Oos5T9r52BlAFfhFUFKZEho4qjBE4PrAqkW98pnDMywsOvUrxd99mZt5OFZrqdqQ0C2ItW8dvygxWNA8rZlow2sERQ5YzBpGNlmwLM1sUwDmM94FCDr7pxj3qMB0zflN/zD7OjtehTzHA6YC848ka+dtVj9F1v4QuEvvnVo89vejJZ9iE/ifOUoSHuCw== ARC-Message-Signature: i=2; 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=0lp53s3cEzb9Nvz/oAdVE45KuMPihoHv/HOfldJHvpI=; b=ESQoQIwe8euF5LIVQghc6IfjENqzcJk76jBUvhyI6hpcb2OhKQCyXhLgNBmA37kemK2LTT6FHCcDByD0jj5+gqS1gbB+OosetrQJ1L5zUH7LZIbhKPkSqoMGYsjnoPS1Y3f/drnex9pbmSyTIdd6ct1y3L6c/Q/ou7lA3EOCM+R1A6Xl1pzKeHIdlhJCTzwrj+mvaL1XNUJHRK8/nutBJZ37rstbkqdAeA1wVg3Efb0K04FokHhEXDZTuVBGungM9DlmIhTD3N+/8O7bXpnQ3NteltBYm1ZqfKRQGTNC91RzQwZqu/bIpkZxDTtrMhTodh8QuKmuUTxvKAsFEthSLg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.20.102) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0lp53s3cEzb9Nvz/oAdVE45KuMPihoHv/HOfldJHvpI=; b=H8/hFK6Ut/PXlgIFGIVC5syrzlfuJoFy6mSaEAnuE3fTo3FcjtySmJDtDEAFV4N0snSSgRtKfI1CYVj2BNv9a2nCLyuIN9a1Sx5U4+6CKdqAhPBK+/Z1oCcFOl+DRGpUycy4YAj+EoGbgjQo4hd3AtvoVia+ekSCH6v0YClZR3A= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.93.20.102) smtp.mailfrom=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 40.93.20.102 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.20.102; helo=CH4PR07CU001.outbound.protection.outlook.com; pr=C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Jf9tnIA8AwpI8imNcSBLeboRng7KeUMit5GD9SlEZgGkXORDoCFQ0vPKShWICtEueBTzPCHxQ/yrvR5QMD1FSh0Em/0KDnRw7PfKVO15uyHssqhggEKBSebgoqcH6WrV5+ga95wg9a+UoVsuYsqWK+fbTElGwqAkJtADwy8ZYSoXjy3FpIgN5liuHXaxHbCvhEOOeyN9vOTMQvMf790hYGvTLElP44TqePpJ4ySYxsE+HJX39aH2XxsGSt+HHQSwxT9W5kmZinM9CPpnYrWZZccvI2Mn0yByA1jKUaJNPWrwiHYsMvhG9SVro4imJsKscdNNWTfrLw++6g5KWFQYow== 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=0lp53s3cEzb9Nvz/oAdVE45KuMPihoHv/HOfldJHvpI=; b=zKR8dxAoXwv6XmvmDUKm89I+qDmihjxzxr9bKcgBqRhlf67TEanfnn6JeNVcpBf0VPRywUDWG8DBvj18fhB7uxbTXaKmiU6R/RaPpFKyAoKXXr+Gr0YuIC2h11TQyFFR/z7E72SJ9prRccA7eV44asqS/Q+C7h8mRa3gN+VdYReuPsve5lGpNK7tTjFs46S+Ct2muJdsT2NHEZcQLhRsCFXBSiPAaXmZgafcYZp4rJzZvlbEXagVMijbn+srlgN5SYx9MkUt7x+OpncVY0mq2AteqIlAspQGgiaC2Y/CUyhRMCGMxfIwDlFH2vYBvslj/sNx/7Y+8ptxmjwNWhqztQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elektrobit.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0lp53s3cEzb9Nvz/oAdVE45KuMPihoHv/HOfldJHvpI=; b=H8/hFK6Ut/PXlgIFGIVC5syrzlfuJoFy6mSaEAnuE3fTo3FcjtySmJDtDEAFV4N0snSSgRtKfI1CYVj2BNv9a2nCLyuIN9a1Sx5U4+6CKdqAhPBK+/Z1oCcFOl+DRGpUycy4YAj+EoGbgjQo4hd3AtvoVia+ekSCH6v0YClZR3A= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 213.95.148.172) smtp.mailfrom=elektrobit.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=elektrobit.com; Received-SPF: Pass (protection.outlook.com: domain of elektrobit.com designates 213.95.148.172 as permitted sender) receiver=protection.outlook.com; client-ip=213.95.148.172; helo=denue6es012.ebgroup.elektrobit.com; pr=C From: Rose Spangler To: CC: Rose Spangler , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , "Julien Grall" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [RFC PATCH v6 43/43] arm/p2m: Add support for HVMOP_altp2m_set_domain_state Date: Mon, 20 Apr 2026 17:32:06 -0400 Message-ID: <20260420213206.208750-44-Rose.Spangler@elektrobit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> References: <20260420213206.208750-1-Rose.Spangler@elektrobit.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.178.50] X-ClientProxiedBy: denue6es012.ebgroup.elektrobit.com (10.243.160.140) To denue6es012.ebgroup.elektrobit.com (10.243.160.140) X-EOPAttributedMessage: 1 X-MS-Exchange-SkipListedInternetSender: ip=[213.95.148.172];domain=denue6es012.ebgroup.elektrobit.com X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C4:EE_|BY3PR08MB7073:EE_|SJ1PEPF000023D2:EE_|SA1PR08MB972883:EE_ X-MS-Office365-Filtering-Correlation-Id: 7bfcb31a-e5ab-4865-8208-08de9f247f72 X-SM-outgoing: yes X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|36860700016|376014|82310400026|1800799024|18002099003|22082099003|56012099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?XV5aBKWlpb6NDi+PEZFfUtbkf2TWx49dxL1LnOR71yGAINOFiEHhxv94KKjm?= =?us-ascii?Q?TAeWPdeHGXuuiB73DnDguIjppQqwfl55Uv1Atrv1E3qv4IUO6HkF+3TvsOP+?= =?us-ascii?Q?zfp9oPWIYNBEiE/FZcCSuPPJQ4lafeu7F+Ch9sJFkgXnuWZzXaJMiyTeo7S2?= =?us-ascii?Q?biDpHRho+3dPEpGbbn5krfHtesla2H9fOAeOyoIQ5jw9GgES0wSNe7nsrIOy?= =?us-ascii?Q?zUdfUlcx8GxpJ+rVoO2frnrUF0s7hiokmM/9MhDMv0vKEs0C00vwMCloivVI?= =?us-ascii?Q?MJIUqny8+mgrpL9XYZbOFeCULELpLF3FIUZEcX+LBLCThaMiJtVhYYgxK+9i?= =?us-ascii?Q?TpSocLuFWgSv4C8d1dzd4M5MkPPFRXuFWAYAl15aE4ley2BZ2p+oyp7MP7VR?= =?us-ascii?Q?TLWYR+rPaqKkP8dOdIzpJMfqsQ7mPlxD/nn9m2jxdlzl7wluP4b4UiZopsw0?= =?us-ascii?Q?zDSCCRwQNzzS7ZbqDV1nf0p6Pec2zOrmEluKfCcJvgAoUNs+9W/dehDhws7o?= =?us-ascii?Q?9aMj2Bk3cjOc32aTB7pPiloCz6LDZGPA8qys4YtxBxUbBzlicmwwUuPd4T9K?= =?us-ascii?Q?wXK86PBM1X3+9ybljSP7Q3GAFdqGBjMfP9+qrgTTPCyKFxZkFLR6CBYt06zX?= =?us-ascii?Q?oaKYsOAj7xITVbiPzIL5/BvZAZaloQmSty0d/Njc7pTDOL2fZHGCww3+YWvf?= =?us-ascii?Q?vmtMmFNlb72EcrIIH0pNuejaTWzj+QiK1NM9a20h3hq8fvEZHeBFCUTYtVOm?= =?us-ascii?Q?BjhMNxJG0G/VdEXC3wOJKZKzjJFBwmLaeis32CfJpaAhrk1AmuzZjpDbWy37?= =?us-ascii?Q?Ky9rrHFY66KcqDLlFf1LHSwIKjpPxMOWauljDDz1bpGwe4RjTu93SPlgrg4g?= =?us-ascii?Q?BuOqbDLNvUj/HsRuPBwAD3CkDUb2QTvJMDwzWb6EiuUxvb1bjsq868Uzg/Pg?= =?us-ascii?Q?30g3KAYkvPEHW05O7lOgBdU1ekprEh/W3pMdqDxXsoiS3ANdcv49XO6CXfwg?= =?us-ascii?Q?P61oGXuq48iX8ZCPGs77jv0J1OpohyIB6B4zHjFIzC2uBFwYTvDM+ZI93BpC?= =?us-ascii?Q?jndUdTcw/9Ryc/V6F/6NGtZZUsCi8iCpu4ZGVPmElYlDbMFn7EZiWe5vYV42?= =?us-ascii?Q?94VhiRcfBVfziutLB7kGp9yfmQbUPasbJAq+4/YTMDjSihkt3zEOiD8x2TTv?= =?us-ascii?Q?AFtUg/aUhfIb+sWb3vcWBhDy5jb9hYwpZ1Hw1ZWJ49Gp0wPSfhcggYFzGOc?= =?us-ascii?Q?=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:213.95.148.172;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:denue6es012.ebgroup.elektrobit.com;PTR:eth1-fw1-nbg6.eb.noris.de;CAT:NONE;SFS:(13230040)(36860700016)(376014)(82310400026)(1800799024)(18002099003)(22082099003)(56012099003);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: ExNxAdtuiKBPTX2JDOR+q+vPH+FIqED8FhsC0WEwfEWRYWT/+nwC7W470VTuAKTXZDvph9sgzjInGZZ2tmiY2z9EPbBBusfDZdmMfuZS4e8C3IzMkv8cLRsdi9hMl6Ifv4aG3WOAwKB5zxW+skHQFr8aGJ38rjVEUjkBxZaO+J25drBtj2ZlX21W6oDi8qjdQSpgquIkzgjTL0HqIxJihonyQOw0WljnHWBc5nB48nDz4VTNo9/IyAFruri87jVkomJfNR09U7QX7D4mDJl98+tEf79Qmd/WWT75a+4Ra2Joifvsw9JY0D/sum8Wzi9EH64C+PKAdRDKYf3zONIWRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR08MB7073 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.20.102];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.20.102];domain=CH4PR07CU001.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: SJ1PEPF000023D2.namprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: abed3dca-89bb-4aa2-7d3e-08de9f247c07 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|376014|14060799003|156008|82310400026|35042699022|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?CzUBfs88kWSB2eNUE2NR9pK/rkKUp46uknjaT4UiI9DlbuhTI7LrW5VnqWjl?= =?us-ascii?Q?mv0r+4Pcvl+dDJTZ9m8CwCfnq19ecOzcTAd5KX8JC5IjolyW/XegekfHsr15?= =?us-ascii?Q?SUK9fPgB7oNKi8XGEmQwq3v98VrOvjdGTTt4uM9PL3fx+VOtooX3byr2M4BI?= =?us-ascii?Q?XLXHmHjmwcxPMrmaGdFF0IsIcm1eZTI3ZkbohJg/thtAPMQ8yEp3RuLb89e9?= =?us-ascii?Q?ZlSHO6z16bEJJQCKI6RWgT/ze/Nuly4BjXP/KIjc12fwlwmHeRvsdxUOM9cX?= =?us-ascii?Q?b9CmVJSf58QXHpjTYYlsHvZuc1HqQUSSibDem+Am4XTgP4NkmPM4B03/Rhu9?= =?us-ascii?Q?KykRUM6ZviRQZKB8XQDVbpKEDlaIJdKNtll4u0x1lmPiHuxqq1s59zFhYwWZ?= =?us-ascii?Q?aldfL9kvPxFcSKxGCxUw+MpWW195h4sHUGkunRZ0o5BFERgpOCV5k5awVEHV?= =?us-ascii?Q?gHP/eglXm631w1ydSHV7HLkNqHwTXKXzjXdI3U38sl65W9k8RVcmw73dECBV?= =?us-ascii?Q?E3t5MtnuNxpn/FCtdzVGMhxO4FD9TwoO61WigybK9pAAURyRcknHWcDurrfR?= =?us-ascii?Q?VIQimmMk6JlUZ8bCuWKj2Op+/k55m/lwannbrDHLtZ6G9M4J/EwEHaXes+6p?= =?us-ascii?Q?4iHH/H65jpbJFvoqXnW2Ku0RWbNEMti36l5m+IzFpRuai25ywKTV6YA/rRZT?= =?us-ascii?Q?VwHsr5eh46bxzK+YM9v35fMp2FwLnqypM6xKMbbuMzlA79vHVEt1lDrGR+7B?= =?us-ascii?Q?zbXhUfi/NbS3pOO9cuNnf9Z8jqhx055MKTLf6HrL+wgmLKAXVc4sfBaJ1buR?= =?us-ascii?Q?/V7JOx5VvFdNxpxSqHr2AumMH/7PvZQonGIy8PbGkNsgPpNgJ4+EeQ4r7Lrx?= =?us-ascii?Q?HsNYUydteZDcYgI952n4ZdehnLPze678BgTX3aAja4iQ3Nce+9DHWFa3msJS?= =?us-ascii?Q?ZFPjUsYOF/lb5d0BmH3VRanacqVuM8paVG3iq3xhu3XByemh1RAzg1Z8zBTL?= =?us-ascii?Q?jZlDRzcjvwILFvV6TFeSoDluieMy0kOOu1HfvUKTpZSxFSyEp+wxKMnjyj4H?= =?us-ascii?Q?KkzgPKKoymVxxPMVMF+GrZBFFsIWwCtTU6/Mco8sNiSVhN7LMe8yGtMu3vYJ?= =?us-ascii?Q?oG0e+pfh9DKz5pp0c4fZF1+iebJIal1c4gpeof8Q2g/3TKWwaD+NJ9k9qam2?= =?us-ascii?Q?9SpQgaYM01Izgn2JfNdqNe3qtwg90anB5lyvDFzINYziDbKN/SqyCKl70Xo?= =?us-ascii?Q?=3D?= X-Forefront-Antispam-Report: CIP:4.79.107.243;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH4PR07CU001.outbound.protection.outlook.com;PTR:mail-ch4pr07cu00106.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(376014)(14060799003)(156008)(82310400026)(35042699022)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UksYP3b4oDVxCbqelWpG9YZWPvxfoEGNQOm+ff+ywnt8jmVcc22RciV/dBPRK1lJpKL5/TJnZ5MTzyvhdCLtmoz5F5NmanUuCrzkDwaf8qyxb2P0rrp0hdD/7Qv+6PAMjumzWTdmbbGBN32nApcqEzToWqAZvDT8KWypd2+MbuTcDHZNhhVbFxgOy9ih8w9+N+tisMy5ygWZKnJFiJeZUQqk1c0gfka7tvhsszUmsZnVhUzEGIE4paLbTtxumh1fmGAg1UYcNd5kKzRgMWj7bVlMAYKX3uOxWzDs/vwy57PC/NnmR6OWgAXuGgbGKe/2p3k2M5wNIWSwGoVI5tY/glv1e4GyohQQfbJNWlMGXrsQnXs1lNI2okM/gHXOfLwd0msR0PgUaRLTRgFP+Q/YvsIy/ln+AqnK2jdMybj6M8TvSnEpJKVnlk6L2qHXYAqm X-OriginatorOrg: elektrobit.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2026 21:33:43.6478 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7bfcb31a-e5ab-4865-8208-08de9f247f72 X-MS-Exchange-CrossTenant-Id: e764c36b-012e-4216-910d-8fd16283182d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e764c36b-012e-4216-910d-8fd16283182d;Ip=[4.79.107.243];Helo=[usbth1es003.ebgroup.elektrobit.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SJ1PEPF000023D2.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR08MB972883 X-purgate-ID: tlsNG-720697/1776720827-8276A161-8699A42F/0/0 X-purgate-type: clean X-purgate-size: 1344 X-ZohoMail-DKIM: pass (identity @elektrobit.com) X-ZM-MESSAGEID: 1776720965005154100 Content-Type: text/plain; charset="utf-8" This commit enables the HVMOP_altp2m_set_domain_state command on ARM, since all prerequisite functions have been implemented. This makes it possible to activate altp2m on a domain. This is commit 1/1 of the set_domain_state phase. Signed-off-by: Rose Spangler --- v6: Introduced this patch. This patch replaces the "arm/p2m: Add HVMOP_altp2m_set_domain_state" patch from the v4/v5 patch series. --- xen/common/altp2m.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c index d980ebed08ab..951e56a2aba5 100644 --- a/xen/common/altp2m.c +++ b/xen/common/altp2m.c @@ -254,17 +254,18 @@ int do_altp2m_op( rc =3D __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; break; =20 -#ifdef CONFIG_X86 case HVMOP_altp2m_set_domain_state: { struct vcpu *v; bool ostate; =20 +#if defined(CONFIG_X86) && defined(CONFIG_HVM) if ( nestedhvm_enabled(d) ) { rc =3D -EINVAL; break; } +#endif =20 rc =3D domain_pause_except_self(d); if ( rc ) @@ -295,6 +296,7 @@ int do_altp2m_op( break; } =20 +#ifdef CONFIG_X86 case HVMOP_altp2m_vcpu_enable_notify: { struct vcpu *v; --=20 2.34.1