[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v6 19/43] arm/p2m: Change function prototype of p2m_alloc_table
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Rose Spangler <Rose.Spangler@xxxxxxxxxxxxxx>
- Date: Mon, 20 Apr 2026 17:26:24 -0400
- 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])
- 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)
- 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=f0zBtlGuGq1vqwSfqy61GVuC3gHjqnBRZS0EWoZ5bs/T4FLC/0PR7akIEpeZ57XnG457QY0k0R0dnnCbPirUzrCLsoOY4+YsE8lrSPMid/p6hiv/fVp5wzOPYEtM26lfVw/MuEyNyG3a+Du+uqyxfWyvR+PdjglRm7USI6oZLF5lKWfOhbY3HwfITU6h/DuD8i34TlbdpndbxtJnegEoZM9QHQoDVA7vAX0Q3TnHDOS/3fqp/qC4bgBZrji6Z/Rg9NeAJk2f+8yYobIzbYcYQ30weB+Yc8wduVDzZBsbh6N9L/470Ee4PWWhv/Lg8Rmk6T469rPluWA2D71eDqqOXQ==
- 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=DcoRnEpsKD5Iw/qVeoNFPxtv2tzcQ7Twajrbu1sWE0LHhHdQdGguARdtLK78HMFIjq97C8NGy5iin4brhGvBEsEpJQ8uLpDhZeGLrTJJIjYCppNuNrMuJF6g1rWOAjOSHqeSitYEbF4YrBJ+UbY1zk5lV6jciS+/eefg62LHjNNbys6FwMRTQa6vFNlO2BzIZxYH37crAs+WOTYJ4oviXCktnmDFqlPWcDRCsRzPmyDwVARug1H6hqncBuBF4zhQvTCyI75b8+SOKy0umSaWv1zpH8bLQ+OQtKw3y3hm+Jbf2CLk5DqCh/p+SAsUVXXjBeb/0Q53y4m+DZj2SBz7sQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=ivfOIDUOdp+LyHfIJ8t4kMSbRk0wGIT21Lls5ORM553oUdjApND0jgJx8glVIj76+Ok7sbwhvyqwflecHb0B+IT1yUZgMhLUJF6em/emOmSzhsMJhNolAQha2GQUiTx6DFRuPYdjp65dFDEVqYguUg7rPqcRRwabRMX1R5Pc1sMZ3iw14jygb7lc/sZTX6JDpN4Fkb7Zf3UJttiQQg/g5wblFoF6RZVod/gvooAoVpNQFD5YozibG3iUq6Jc3t2OXhau+t+3NIQp0yjeHihcOzKAQzM09wIqSeKo6kw9Kr+CzcbuYuUL+eiQxyjKkdJHCf5o3cqtG7D5mD4zND/ZfQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yUbX/jSvCfjzga1niCnm5GjTMD5yEz5/AOuchf73f14TrX2muboQqaDir3Yu+KOJFBs/VW2v2fqQENoWT36SgcdwmkCYTbBPjf9SypLndekdTM68EmhyoT6RMErbh2YKBIsUl8wLvM4hU1dSP2zHfpM6/Nk+6kytEiIOeKFcwBI5jFwyXVbYG0WZxNnNlnb8cUt3f7sDk/LwHKif6o7ITT/Y5RzuBVOkt3MHUPmon5XegPeRCaz+/5q8QTCoLYogLeTwY3rQWmU9eg7+5/Ay/7ZhGb+Cd0ZS2JO+rOnHzJPce7tv3MfQQXpGVX21Tt94B93somUlwYVlR92F0HuzVw==
- 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"
- Cc: Sergej Proskurin <proskurin@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Julien Grall <julien.grall@xxxxxxx>
- Delivery-date: Mon, 20 Apr 2026 21:27:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
From: Sergej Proskurin <proskurin@xxxxxxxxxxxxx>
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 <proskurin@xxxxxxxxxxxxx>
Acked-by: Julien Grall <julien.grall@xxxxxxx>
---
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;
}
-static int p2m_alloc_table(struct domain *d)
+static int p2m_alloc_table(struct p2m_domain *p2m)
{
- struct p2m_domain *p2m = p2m_get_hostp2m(d);
-
p2m->root = p2m_allocate_root();
if ( !p2m->root )
return -ENOMEM;
@@ -1576,7 +1574,7 @@ static int p2m_initialise(struct domain *d, struct
p2m_domain *p2m)
if ( rc )
return rc;
- rc = p2m_alloc_table(d);
+ rc = p2m_alloc_table(p2m);
if ( rc )
return rc;
--
2.34.1
|