diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-04-23 19:13:09 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-05-13 18:14:22 +0200 |
commit | 38c0b192bd6df089cdffd9828d19e764385f96e6 (patch) | |
tree | c4cc019b2459308bfc4e579f9b5815ae305c2011 /arch/x86 | |
parent | KVM: SVM: introduce nested_run_pending (diff) | |
download | linux-38c0b192bd6df089cdffd9828d19e764385f96e6.tar.xz linux-38c0b192bd6df089cdffd9828d19e764385f96e6.zip |
KVM: SVM: leave halted state on vmexit
Similar to VMX, we need to leave the halted state when performing a vmexit.
Failure to do so will cause a hang after vmexit.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/svm/nested.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c index 7a724ea3d994..2a0f1b043145 100644 --- a/arch/x86/kvm/svm/nested.c +++ b/arch/x86/kvm/svm/nested.c @@ -473,6 +473,9 @@ int nested_svm_vmexit(struct vcpu_svm *svm) leave_guest_mode(&svm->vcpu); svm->nested.vmcb = 0; + /* in case we halted in L2 */ + svm->vcpu.arch.mp_state = KVM_MP_STATE_RUNNABLE; + /* Give the current vmcb to the guest */ disable_gif(svm); |