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>
Thu, 23 Aug 2012 15:52:14 +0000 (11:52 -0400)
commit7f9140626c757b773624b97865cb53c2a8348a69
tree86b9035ee71b275d0fb9d23f180b03b797b3f758
parent357a3cfb147ee8e97c6f9cdc51e9a33aa56f7d99
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.

[v1: Fix smatch warnings]
[v2: memset was doing 0 instead of 0xff]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/mmu.c
This page took 0.025158 seconds and 5 git commands to generate.