aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-01-05 19:36:40 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-06 02:55:24 -0500
commit17ac10ad2bb7d8c4f401668484b2e661a15726c6 (patch)
tree671a11b2be1d9f48e96eae8af2b05867f4199db0 /drivers/kvm/kvm.h
parentac79c978f173586ab3624427c89cd22b393cabd4 (diff)
[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.h17
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 {
123 hpa_t root_hpa; 123 hpa_t root_hpa;
124 int root_level; 124 int root_level;
125 int shadow_root_level; 125 int shadow_root_level;
126
127 u64 *pae_root;
126}; 128};
127 129
128struct kvm_guest_debug { 130struct kvm_guest_debug {
@@ -548,19 +550,4 @@ static inline u32 get_rdx_init_val(void)
548#define TSS_REDIRECTION_SIZE (256 / 8) 550#define TSS_REDIRECTION_SIZE (256 / 8)
549#define RMODE_TSS_SIZE (TSS_BASE_SIZE + TSS_REDIRECTION_SIZE + TSS_IOPB_SIZE + 1) 551#define RMODE_TSS_SIZE (TSS_BASE_SIZE + TSS_REDIRECTION_SIZE + TSS_IOPB_SIZE + 1)
550 552
551#ifdef CONFIG_X86_64
552
553/*
554 * When emulating 32-bit mode, cr3 is only 32 bits even on x86_64. Therefore
555 * we need to allocate shadow page tables in the first 4GB of memory, which
556 * happens to fit the DMA32 zone.
557 */
558#define GFP_KVM_MMU (GFP_KERNEL | __GFP_DMA32)
559
560#else
561
562#define GFP_KVM_MMU GFP_KERNEL
563
564#endif
565
566#endif 553#endif