]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: always use early vmcs check when EPT is disabled
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Apr 2019 13:57:19 +0000 (15:57 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Apr 2019 13:37:12 +0000 (15:37 +0200)
commit0257c3f7f9e97ff0cfe678ae32586c50cee3ce48
treef93f3634ecc1f4d83e7d3ebbd923078b3c46e675
parent6695d5f814dd06aaa3ce6e83cb9c6aae3dc9b8b9
KVM: nVMX: always use early vmcs check when EPT is disabled

The remaining failures of vmx.flat when EPT is disabled are caused by
incorrectly reflecting VMfails to the L1 hypervisor.  What happens is
that nested_vmx_restore_host_state corrupts the guest CR3, reloading it
with the host's shadow CR3 instead, because it blindly loads GUEST_CR3
from the vmcs01.

For simplicity let's just always use hardware VMCS checks when EPT is
disabled.  This way, nested_vmx_restore_host_state is not reached at
all (or at least shouldn't be reached).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/uapi/asm/vmx.h
arch/x86/kvm/vmx/nested.c