diff options
author | Avi Kivity <avi@qumranet.com> | 2007-01-05 16:36:40 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2007-01-05 23:55:24 -0800 |
commit | 17ac10ad2bb7d8c4f401668484b2e661a15726c6 (patch) | |
tree | 671a11b2be1d9f48e96eae8af2b05867f4199db0 /drivers/kvm/kvm.h | |
parent | ac79c978f173586ab3624427c89cd22b393cabd4 (diff) | |
download | lwn-17ac10ad2bb7d8c4f401668484b2e661a15726c6.tar.gz lwn-17ac10ad2bb7d8c4f401668484b2e661a15726c6.zip |
[PATCH] KVM: MU: Special treatment for shadow pae root pages
Since we're not going to cache the pae-mode shadow root pages, allocate a
single pae shadow that will hold the four lower-level pages, which will act as
roots.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r-- | drivers/kvm/kvm.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 8323f4009362..abe40dd34eea 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -123,6 +123,8 @@ struct kvm_mmu { hpa_t root_hpa; int root_level; int shadow_root_level; + + u64 *pae_root; }; struct kvm_guest_debug { @@ -548,19 +550,4 @@ static inline u32 get_rdx_init_val(void) #define TSS_REDIRECTION_SIZE (256 / 8) #define RMODE_TSS_SIZE (TSS_BASE_SIZE + TSS_REDIRECTION_SIZE + TSS_IOPB_SIZE + 1) -#ifdef CONFIG_X86_64 - -/* - * When emulating 32-bit mode, cr3 is only 32 bits even on x86_64. Therefore - * we need to allocate shadow page tables in the first 4GB of memory, which - * happens to fit the DMA32 zone. - */ -#define GFP_KVM_MMU (GFP_KERNEL | __GFP_DMA32) - -#else - -#define GFP_KVM_MMU GFP_KERNEL - -#endif - #endif |