* [PATCH] KVM: x86: Skip pae_root shadow allocation if tdp enabled
@ 2018-07-25 8:32 Liang Chen
2018-08-02 12:57 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Liang Chen @ 2018-07-25 8:32 UTC (permalink / raw)
To: pbonzini; +Cc: kvm, linux-kernel, Liang Chen
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>
---
arch/x86/kvm/mmu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index d594690..af8cc1e 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -5029,6 +5029,9 @@ static int alloc_mmu_pages(struct kvm_vcpu *vcpu)
struct page *page;
int i;
+ if (tdp_enabled)
+ return 0;
+
/*
* 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
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: x86: Skip pae_root shadow allocation if tdp enabled
2018-07-25 8:32 [PATCH] KVM: x86: Skip pae_root shadow allocation if tdp enabled Liang Chen
@ 2018-08-02 12:57 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2018-08-02 12:57 UTC (permalink / raw)
To: Liang Chen; +Cc: kvm, linux-kernel
On 25/07/2018 10:32, Liang Chen wrote:
> 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>
> ---
> arch/x86/kvm/mmu.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
> index d594690..af8cc1e 100644
> --- a/arch/x86/kvm/mmu.c
> +++ b/arch/x86/kvm/mmu.c
> @@ -5029,6 +5029,9 @@ static int alloc_mmu_pages(struct kvm_vcpu *vcpu)
> struct page *page;
> int i;
>
> + if (tdp_enabled)
> + return 0;
> +
> /*
> * 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
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-02 12:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 8:32 [PATCH] KVM: x86: Skip pae_root shadow allocation if tdp enabled Liang Chen
2018-08-02 12:57 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.