xen/arm: mm: Allow page-table allocation from the boot allocator
authorJulien Grall <julien.grall@arm.com>
Fri, 20 May 2022 12:09:29 +0000 (13:09 +0100)
committerJulien Grall <jgrall@amazon.com>
Wed, 8 Jun 2022 10:04:53 +0000 (11:04 +0100)
commit77f00c2f023ef1236ec29347bcef13069971fae2
treeed20ddd1928f81ac619d2b34ea8a63e63f688cd8
parent922936dc0657c3f6f21023308e93bc681762faf6
xen/arm: mm: Allow page-table allocation from the boot allocator

At the moment, page-table can only be allocated from domheap. This means
it is not possible to create mapping in the page-tables via
map_pages_to_xen() if page-table needs to be allocated.

In order to avoid open-coding page-tables update in early boot, we need
to be able to allocate page-tables much earlier. Thankfully, we have the
boot allocator for those cases.

create_xen_table() is updated to cater early boot allocation by using
alloc_boot_pages().

Note, this is not sufficient to bootstrap the page-tables (i.e mapping
before any memory is actually mapped). This will be addressed
separately.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/mm.c