[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:31:42 -0400
  • 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])
  • 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=fczuNj1r8/3hU3Mu4wGR68bARppeC58rxZXSn9gC54JQ/sHlZ7GxLGhOenz3w3uTfjBX/rh8AjiSjKt3YOha02fzcrXeUAPAsVosIJ99MT1ofRtpPM351h9G4YI7Pz9Gw0zwnkkovlzzbVG5y/aIpdoZWFSYtQkle7LDOqXvoyXYsN4W4RRRV41f05DBVVcJ+q14LsdMSCg2cLDy6JSXrlJJoT7N55sNEafrlqnHj5BDRiZrvvZwuSff5PKfP9nqvQrZhlC96Y73ywJe9eAGRJKFDc+5KohjtHdi27nv4ioI26m863/LaO7A8t2XJQDda2+Tq00LktrweBWY4IKtJw==
  • 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-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-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=INHQHzFBus8fJcIy+9wDMaO8kXxp6QDPkg90YHfbwKWwYNykPmG4cX0VJSvWiP6G8H6yE+7/5OUTrM0AHJzwu5JFzCRYC9jaTwqNPXP8gfVSfekab5+8XpeTjZb4k2gAGxTvSzG36fSp5osZ90hbAMGn8KYfBhNcaGenwgP1cMaQLGAn9PGJelG0HU4Xk14v8sfrHjjtybIYZbM05Rjn3eelHBKErRLLXeX3g3m55mqe36MRk/Ru07BzzvKwAAtJgng2Vpl13LXxOgfz95k4EwjBADgpqKm3ADSiyeg1eeONcySBH3GLZiGJ0lQpJ9TFfoT2x6b9daURXkQmsi5EUQ==
  • 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:42:23 +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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.