KVM: nVMX: Use correct root level for nested EPT shadow page tables
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 7 Feb 2020 17:37:41 +0000 (09:37 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2020 18:51:56 +0000 (19:51 +0100)
commit740d876bd9565857a695ce7c05efda4eba5bc585
tree04c131c1fa9c695656523d93ca5b88537d70ee21
parent7a89674c2e8758dcc809d680719055e4f5662b92
KVM: nVMX: Use correct root level for nested EPT shadow page tables

commit 148d735eb55d32848c3379e460ce365f2c1cbe4b upstream.

Hardcode the EPT page-walk level for L2 to be 4 levels, as KVM's MMU
currently also hardcodes the page walk level for nested EPT to be 4
levels.  The L2 guest is all but guaranteed to soft hang on its first
instruction when L1 is using EPT, as KVM will construct 4-level page
tables and then tell hardware to use 5-level page tables.

Fixes: 855feb673640 ("KVM: MMU: Add 5 level EPT & Shadow page table support.")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx/vmx.c