|
@@ -5979,13 +5979,24 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+ /*
|
|
|
+ * Note:
|
|
|
+ * Do not try to fix EXIT_REASON_EPT_MISCONFIG if it caused by
|
|
|
+ * delivery event since it indicates guest is accessing MMIO.
|
|
|
+ * The vm-exit can be triggered again after return to guest that
|
|
|
+ * will cause infinite loop.
|
|
|
+ */
|
|
|
if ((vectoring_info & VECTORING_INFO_VALID_MASK) &&
|
|
|
(exit_reason != EXIT_REASON_EXCEPTION_NMI &&
|
|
|
exit_reason != EXIT_REASON_EPT_VIOLATION &&
|
|
|
- exit_reason != EXIT_REASON_TASK_SWITCH))
|
|
|
- printk(KERN_WARNING "%s: unexpected, valid vectoring info "
|
|
|
- "(0x%x) and exit reason is 0x%x\n",
|
|
|
- __func__, vectoring_info, exit_reason);
|
|
|
+ exit_reason != EXIT_REASON_TASK_SWITCH)) {
|
|
|
+ vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
|
|
|
+ vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_DELIVERY_EV;
|
|
|
+ vcpu->run->internal.ndata = 2;
|
|
|
+ vcpu->run->internal.data[0] = vectoring_info;
|
|
|
+ vcpu->run->internal.data[1] = exit_reason;
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
|
|
|
if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked &&
|
|
|
!(is_guest_mode(vcpu) && nested_cpu_has_virtual_nmis(
|