]> xenbits.xensource.com Git - xen.git/commit
xen/arm: p2m: Introduce p2m_get_entry and use it to implement __p2m_lookup
authorJulien Grall <julien.grall@arm.com>
Thu, 15 Sep 2016 11:28:28 +0000 (12:28 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 28 Sep 2016 01:14:00 +0000 (18:14 -0700)
commita8be4ee4eae2a20ea67588f50d5a7344b9dddeb7
tree8832c99ac0004bdea78b823ee53ef9608b35c4fb
parent588d44e6277958540b3075331a03d5bf1cd4ad91
xen/arm: p2m: Introduce p2m_get_entry and use it to implement __p2m_lookup

Currently, for a given GFN, the function __p2m_lookup will only return
the associated MFN and the p2m type of the mapping.

In some case we need the order of the mapping and the memaccess
permission. Rather than providing a separate function for this purpose,
it is better to implement a generic function to return all the
information.

To avoid passing dummy parameter, a caller that does not need a
specific information can use NULL instead.

The list of the informations retrieved is based on the x86 version. All
of them will be used in follow-up patches.

It might have been possible to extend __p2m_lookup, however I choose to
reimplement it from scratch to allow sharing some helpers with the
function that will update the P2M (will be added in a follow-up patch).

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
xen/arch/arm/p2m.c
xen/include/asm-arm/p2m.h