xen/arm: lpae: Use the generic helpers to defined the Xen PT helpers
authorJulien Grall <jgrall@amazon.com>
Sun, 27 Feb 2022 19:21:59 +0000 (19:21 +0000)
committerJulien Grall <jgrall@amazon.com>
Sun, 27 Feb 2022 19:23:35 +0000 (19:23 +0000)
commit315c26f98d848d5214b8a288346e68a6ffe418c5
treec4750c53ce984c8b3d73234a1e0ec1aa93f33150
parentf7b7e2b9add53780e44e8f8c165c2281258ae367
xen/arm: lpae: Use the generic helpers to defined the Xen PT helpers

Currently, Xen PT helpers are only working with 4KB page granularity
and open-code the generic helpers. To allow more flexibility, we can
re-use the generic helpers and pass Xen's page granularity
(PAGE_SHIFT).

As Xen PT helpers are used in both C and assembly, we need to move
the generic helpers definition outside of the !__ASSEMBLY__ section.

Take the opportunity to prefix LPAE_SHIFT, LPAE_ENTRIES and
LPAE_ENTRY_MASK with XEN_PT_.

Note the aliases for each level are still kept for the time being so we
can avoid a massive patch to change all the callers.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Michal Orzel <michal.orzel@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
xen/arch/arm/arm32/head.S
xen/arch/arm/arm64/head.S
xen/arch/arm/include/asm/lpae.h
xen/arch/arm/mm.c
xen/arch/arm/p2m.c