xen/arm: p2m: Introduce p2m_get_page_from_gfn
authorJulien Grall <julien.grall@arm.com>
Fri, 21 Dec 2018 16:26:43 +0000 (16:26 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 21 Dec 2018 17:39:39 +0000 (09:39 -0800)
commit9c2f7c0123d9221d375833275223c668f00cf651
tree1548ac35c1787683f9e51815fc8d504573c0ea61
parentaf80e1d9c79e3bcb392775f311d20eec54b3389b
xen/arm: p2m: Introduce p2m_get_page_from_gfn

In a follow-up patch, we will need to handle get_page_from_gfn
differently for DOMID_XEN. To keep the code simple move the current
content in a new separate helper p2m_get_page_from_gfn.

Note the new helper is not anymore a static inline function as the helper
is quite complex.

Finally, take the opportunity to use typesafe gfn as the change is
minor.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/p2m.c
xen/include/asm-arm/p2m.h