]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "KVM: nVMX: Use correct root level for nested EPT shadow page tables"
authorSasha Levin <sashal@kernel.org>
Thu, 20 Feb 2020 11:54:06 +0000 (06:54 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:34:35 +0000 (08:34 +0100)
This reverts commit 740d876bd9565857a695ce7c05efda4eba5bc585.

Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/vmx/vmx.c

index 997926a9121c066a9b72754a92288202afab62d4..3791ce8d269e00ba4ebeec40880239716bcabf96 100644 (file)
@@ -2968,9 +2968,6 @@ void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
 
 static int get_ept_level(struct kvm_vcpu *vcpu)
 {
-       /* Nested EPT currently only supports 4-level walks. */
-       if (is_guest_mode(vcpu) && nested_cpu_has_ept(get_vmcs12(vcpu)))
-               return 4;
        if (cpu_has_vmx_ept_5levels() && (cpuid_maxphyaddr(vcpu) > 48))
                return 5;
        return 4;