]> bbs.cooldavid.org Git - net-next-2.6.git/commit
[PATCH] MM: page allocation hooks for VMI backend
authorZachary Amsden <zach@vmware.com>
Tue, 13 Feb 2007 12:26:21 +0000 (13:26 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Tue, 13 Feb 2007 12:26:21 +0000 (13:26 +0100)
commitc119ecce894120790903ef535dac3e105f3d6cde
treeb9a60fe46b03d396ba396912c237e6ee2e9ef873
parent90611fe923aa3ac7ffb9e5df45c83860b0f00227
[PATCH] MM: page allocation hooks for VMI backend

The VMI backend uses explicit page type notification to track shadow page
tables.  The allocation of page table roots is especially tricky.  We need to
clone the root for non-PAE mode while it is protected under the pgd lock to
correctly copy the shadow.

We don't need to allocate pgds in PAE mode, (PDPs in Intel terminology) as
they only have 4 entries, and are cached entirely by the processor, which
makes shadowing them rather simple.

For base page table level allocation, pmd_populate provides the exact hook
point we need.  Also, we need to allocate pages when splitting a large page,
and we must release pages before returning the page to any free pool.

Despite being required with these slightly odd semantics for VMI, Xen also
uses these hooks to determine the exact moment when page tables are created or
released.

AK: All nops for other architectures

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
arch/i386/kernel/paravirt.c
arch/i386/mm/init.c
arch/i386/mm/pageattr.c
arch/i386/mm/pgtable.c
include/asm-i386/paravirt.h
include/asm-i386/pgalloc.h