Skip to content
Commit fb7333df authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

KVM: SVM: fix calls to is_intercept



is_intercept takes an INTERCEPT_* constant, not SVM_EXIT_*; because
of this, the compiler was removing the body of the conditionals,
as if is_intercept returned 0.

This unveils a latent bug: when clearing the VINTR intercept,
int_ctl must also be changed in the L1 VMCB (svm->nested.hsave),
just like the intercept itself is also changed in the L1 VMCB.
Otherwise V_IRQ remains set and, due to the VINTR intercept being clear,
we get a spurious injection of a vector 0 interrupt on the next
L2->L1 vmexit.

Reported-by: default avatarQian Cai <cai@lca.pw>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 75ad6e80
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment