Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee6268ba authored by Liang Chen's avatar Liang Chen Committed by Paolo Bonzini
Browse files

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: default avatarLiang Chen <liangchen.linux@gmail.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent c2a4eadf
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -5341,6 +5341,9 @@ static int alloc_mmu_pages(struct kvm_vcpu *vcpu)
	struct page *page;
	struct page *page;
	int i;
	int i;


	if (tdp_enabled)
		return 0;

	/*
	/*
	 * When emulating 32-bit mode, cr3 is only 32 bits even on 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
	 * Therefore we need to allocate shadow page tables in the first