|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/1] xen/arm: populate a default P2M pool for new domains
Since commit 9c962e07fb ("xen/arm: Clean-up in p2m_init() and
p2m_final_teardown()"), ARM domains start with an empty P2M pool. So,
populating the physmap fails, as no page tables can be allocated until
the pool is sized by, e.g., the toolstack.
Restore the call to add a small default pool of 16 pages in p2m_init()
again, as before 9c962e07fb. The hardware domain is skipped, as it
doesn't allocate its P2M pages from the page pool. Also skip it if LLC
coloring is enabled. The colors are only configured after domain
creation, so the pool pages would be allocated with the default colors.
Signed-off-by: Julian Vetter <julian.vetter@xxxxxxxxxx>
---
xen/arch/arm/mmu/p2m.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/xen/arch/arm/mmu/p2m.c b/xen/arch/arm/mmu/p2m.c
index 2cf35d8a37..de8dd26a72 100644
--- a/xen/arch/arm/mmu/p2m.c
+++ b/xen/arch/arm/mmu/p2m.c
@@ -3,6 +3,7 @@
#include <xen/domain_page.h>
#include <xen/ioreq.h>
#include <xen/lib.h>
+#include <xen/llc-coloring.h>
#include <xen/sched.h>
#include <xen/softirq.h>
@@ -1541,6 +1542,21 @@ int p2m_init(struct domain *d)
if ( rc )
return rc;
+ /* Populate 16 pages to the P2M pages pool here.
+ *
+ * Skip the hardware domain, which allocates its P2M pages from the heap,
+ * and LLC colored setups, as the domain's colors are only configured after
+ * domain creation.
+ */
+ if ( !is_hardware_domain(d) && !llc_coloring_enabled )
+ {
+ spin_lock(&d->arch.paging.lock);
+ rc = p2m_set_allocation(d, 16, false);
+ spin_unlock(&d->arch.paging.lock);
+ if ( rc )
+ return rc;
+ }
+
return 0;
}
--
2.53.0
--
Julian Vetter | Vates Hypervisor & Kernel Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |