aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Chen <liangchen.linux@gmail.com>2018-07-25 04:32:14 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2018-08-06 11:59:19 -0400
commitee6268ba3a6861b2806e569bff7fe91fbdf846dd (patch)
treea43322cfc909ce16454ef5d9cdaa46dd9b51d026
parentc2a4eadf7747a1359a80ede64e4ae0e0ba64ca08 (diff)
KVM: x86: Skip pae_root shadow allocation if tdp enabled
Considering the fact that the pae_root shadow is not needed when tdp is in use, skip the pae_root shadow page allocation to allow mmu creation even not being able to obtain memory from DMA32 zone when particular cgroup cpuset.mems or mempolicy control is applied. Signed-off-by: Liang Chen <liangchen.linux@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/mmu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 8f216321d33b..f5aef52b148b 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -5341,6 +5341,9 @@ static int alloc_mmu_pages(struct kvm_vcpu *vcpu)
5341 struct page *page; 5341 struct page *page;
5342 int i; 5342 int i;
5343 5343
5344 if (tdp_enabled)
5345 return 0;
5346
5344 /* 5347 /*
5345 * When emulating 32-bit mode, cr3 is only 32 bits even on x86_64. 5348 * When emulating 32-bit mode, cr3 is only 32 bits even on x86_64.
5346 * Therefore we need to allocate shadow page tables in the first 5349 * Therefore we need to allocate shadow page tables in the first