Skip to content

Commit

Permalink
KVM: x86: nSVM: restore int_vector in svm_clear_vintr
Browse files Browse the repository at this point in the history
In svm_clear_vintr we try to restore the virtual interrupt
injection that might be pending, but we fail to restore
the interrupt vector.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210914154825.104886-2-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Maxim Levitsky authored and Paolo Bonzini committed Sep 23, 2021
1 parent e1fc155 commit aee77e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kvm/svm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,8 @@ static void svm_clear_vintr(struct vcpu_svm *svm)

svm->vmcb->control.int_ctl |= svm->nested.ctl.int_ctl &
V_IRQ_INJECTION_BITS_MASK;

svm->vmcb->control.int_vector = svm->nested.ctl.int_vector;
}

vmcb_mark_dirty(svm->vmcb, VMCB_INTR);
Expand Down

0 comments on commit aee77e1

Please sign in to comment.