Skip to content

Commit 05311ce

Browse files
Maxim Levitskybonzini
authored andcommitted
KVM: x86: remove exit_int_info warning in svm_handle_exit
It is valid to receive external interrupt and have broken IDT entry, which will lead to #GP with exit_int_into that will contain the index of the IDT entry (e.g any value). Other exceptions can happen as well, like #NP or #SS (if stack switch fails). Thus this warning can be user triggred and has very little value. Cc: stable@vger.kernel.org Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20221103141351.50662-10-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 8357b9e commit 05311ce

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

arch/x86/kvm/svm/svm.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,6 @@ int svm_set_efer(struct kvm_vcpu *vcpu, u64 efer)
346346
return 0;
347347
}
348348

349-
static int is_external_interrupt(u32 info)
350-
{
351-
info &= SVM_EVTINJ_TYPE_MASK | SVM_EVTINJ_VALID;
352-
return info == (SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_INTR);
353-
}
354-
355349
static u32 svm_get_interrupt_shadow(struct kvm_vcpu *vcpu)
356350
{
357351
struct vcpu_svm *svm = to_svm(vcpu);
@@ -3426,15 +3420,6 @@ static int svm_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
34263420
return 0;
34273421
}
34283422

3429-
if (is_external_interrupt(svm->vmcb->control.exit_int_info) &&
3430-
exit_code != SVM_EXIT_EXCP_BASE + PF_VECTOR &&
3431-
exit_code != SVM_EXIT_NPF && exit_code != SVM_EXIT_TASK_SWITCH &&
3432-
exit_code != SVM_EXIT_INTR && exit_code != SVM_EXIT_NMI)
3433-
printk(KERN_ERR "%s: unexpected exit_int_info 0x%x "
3434-
"exit_code 0x%x\n",
3435-
__func__, svm->vmcb->control.exit_int_info,
3436-
exit_code);
3437-
34383423
if (exit_fastpath != EXIT_FASTPATH_NONE)
34393424
return 1;
34403425

0 commit comments

Comments
 (0)