Skip to content

Commit ee6268b

Browse files
LiangChen77bonzini
authored andcommitted
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 <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent c2a4ead commit ee6268b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/kvm/mmu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5341,6 +5341,9 @@ static int alloc_mmu_pages(struct kvm_vcpu *vcpu)
53415341
struct page *page;
53425342
int i;
53435343

5344+
if (tdp_enabled)
5345+
return 0;
5346+
53445347
/*
53455348
* When emulating 32-bit mode, cr3 is only 32 bits even on x86_64.
53465349
* Therefore we need to allocate shadow page tables in the first

0 commit comments

Comments
 (0)