]> xenbits.xensource.com Git - people/royger/xen.git/commit
xen/arm: p2m: Fix incorrect mapping of superpages
authorJulien Grall <julien.grall@arm.com>
Fri, 19 May 2017 16:08:39 +0000 (17:08 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 19 May 2017 18:09:37 +0000 (11:09 -0700)
commit3fafdc28eb98dc1cb686379d83270516fc38049d
treec24274a1e1495cf5adbb1ed345164ce1dd349881
parent8f2e3d8913bba06651d9021b6f925bdcd1060f4a
xen/arm: p2m: Fix incorrect mapping of superpages

The same set of functions is used to set as well as to clean P2M
entries, except for clean operations (INVALID_MFN ~0UL) is passed as a
parameter. Unfortunately, when calculating an appropriate target order
for a particular mapping INVALID_MFN is taken into account which leads
to 4K page target order being set each time even for 2MB and 1GB
mappings.

This will result to break down the superpage into 4K mappings and leave
empty tables allocated.

This was introduced by commit 2ef3e36ec7 "xen/arm: p2m: Introduce
p2m_set_entry and __p2m_set_entry".

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