KVM: nVMX: Clear nested_run_pending if setting nested state fails
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 8 May 2019 18:04:32 +0000 (11:04 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 May 2019 19:27:03 +0000 (21:27 +0200)
commit21be4ca1ea685ab3ccc2fd18babb89bc477a9e5c
treea836a9222e1dec73eedd959631548e032e8a895b
parentdb80927ea1977a845230a161df643b48fd1e1ea4
KVM: nVMX: Clear nested_run_pending if setting nested state fails

VMX's nested_run_pending flag is subtly consumed when stuffing state to
enter guest mode, i.e. needs to be set according before KVM knows if
setting guest state is successful.  If setting guest state fails, clear
the flag as a nested run is obviously not pending.

Reported-by: Aaron Lewis <aaronlewis@google.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c