|
[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
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |