]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/mmu: Release just the MFN list, not MFN list and part of pagetables.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 14 Aug 2012 20:37:31 +0000 (16:37 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 14 Aug 2012 20:56:42 +0000 (16:56 -0400)
commit5e494156ec23f18d885c4c3c61b30d64bde3d205
tree3449d15381272e900eaf4d5ba923e3686eef8aa4
parent561a20249631809e676652fdfd7471497d1e6263
xen/mmu: Release just the MFN list, not MFN list and part of pagetables.

We call memblock_reserve for [start of mfn list] -> [PMD aligned end
of mfn list] instead of <start of mfn list> -> <page aligned end of mfn list].

This has the disastrous effect that if at bootup the end of mfn_list is
not PMD aligned we end up returning to memblock parts of the region
past the mfn_list array. And those parts are the PTE tables with
the disastrous effect of seeing this at bootup:

Write protecting the kernel read-only data: 10240k
Freeing unused kernel memory: 1860k freed
Freeing unused kernel memory: 200k freed
(XEN) mm.c:2429:d0 Bad type (saw 1400000000000002 != exp 7000000000000000) for mfn 116a80 (pfn 14e26)
...
(XEN) mm.c:908:d0 Error getting mfn 116a83 (pfn 14e2a) from L1 entry 8000000116a83067 for l1e_owner=0, pg_owner=0
(XEN) mm.c:908:d0 Error getting mfn 4040 (pfn 5555555555555555) from L1 entry 0000000004040601 for l1e_owner=0, pg_owner=0
.. and so on.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit 0ebf4641eb144e633ae9a6466f4c9eaa1db6dc9b)

Conflicts:

arch/x86/xen/mmu.c
arch/x86/xen/mmu.c