xen/arm: mm: Rework setup_xenheap_mappings()
authorJulien Grall <julien.grall@arm.com>
Sat, 11 Jun 2022 11:26:18 +0000 (12:26 +0100)
committerJulien Grall <julien@xen.org>
Sat, 11 Jun 2022 11:29:06 +0000 (12:29 +0100)
commit26a470875b7e6f52a2c172a26c1f9ee432ad8893
tree45a9d5df25230711a1822af9f20487835543dffb
parent942eb0a831b0e2ca9d7cab4be67dc61eba59298a
xen/arm: mm: Rework setup_xenheap_mappings()

The current implementation of setup_xenheap_mappings() is using 1GB
mappings. This can lead to unexpected result because the mapping
may alias a non-cachable region (such as device or reserved regions).
For more details see B2.8 in ARM DDI 0487H.a.

map_pages_to_xen() was recently reworked to allow superpage mappings,
support contiguous mapping and deal with the use of page-tables before
they are mapped.

Most of the code in setup_xenheap_mappings() is now replaced with a
single call to map_pages_to_xen().

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