]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/mmu: Copy and revector the P2M tree.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 26 Jul 2012 16:47:40 +0000 (12:47 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 31 Jul 2012 18:44:24 +0000 (14:44 -0400)
commita5edcff642d71bba11f7d65f064b4aaf4f548761
tree08e84051c8425043b123b228780e10cd20796e38
parent1623c6d180afd49b68bc154dc5c448213d464710
xen/mmu: Copy and revector the P2M tree.

Please first read the description in "xen/p2m: Add logic to revector a
P2M tree to use __va leafs" patch.

The 'xen_revector_p2m_tree()' function allocates a new P2M tree
copies the contents of the old one in it, and returns the new one.

At this stage, the __ka address space (which is what the old
P2M tree was using) is partially disassembled. The cleanup_highmap
has removed the PMD entries from 0-16MB and anything past _brk_end
up to the max_pfn_mapped (which is the end of the ramdisk).

We have revectored the P2M tree (and the one for save/restore as well)
to use new shiny __va address to new MFNs. The xen_start_info
has been taken care of already in 'xen_setup_kernel_pagetable()' and
xen_start_info->shared_info in 'xen_setup_shared_info()', so
we are free to roam and delete PMD entries - which is exactly what
we are going to do. We rip out the __ka for the old P2M array.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

arch/x86/xen/mmu.c
[upstream git commit 3a06359601deaec046ce33008527edfa6731ef23]
[s/memblock_free/memblock_x86_free_range]
arch/x86/xen/mmu.c