aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-11-04 04:59:01 -0500
committerAvi Kivity <avi@redhat.com>2009-12-03 02:32:24 -0500
commit65ac7264043740572ba804edca03c374d70427c9 (patch)
tree9adc0414526ed289a7f9d6ff7c2ae4e968113cd8 /arch/x86
parenta9c7399d6cda0a092b347f8ee49bbe44f6e1fe66 (diff)
KVM: VMX: Report unexpected simultaneous exceptions as internal errors
These happen when we trap an exception when another exception is being delivered; we only expect these with MCEs and page faults. If something unexpected happens, things probably went south and we're better off reporting an internal error and freezing. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/vmx.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c0e66dd58a47..22fcd27a0b58 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2744,9 +2744,14 @@ static int handle_exception(struct kvm_vcpu *vcpu)
2744 return handle_machine_check(vcpu); 2744 return handle_machine_check(vcpu);
2745 2745
2746 if ((vect_info & VECTORING_INFO_VALID_MASK) && 2746 if ((vect_info & VECTORING_INFO_VALID_MASK) &&
2747 !is_page_fault(intr_info)) 2747 !is_page_fault(intr_info)) {
2748 printk(KERN_ERR "%s: unexpected, vectoring info 0x%x " 2748 vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
2749 "intr info 0x%x\n", __func__, vect_info, intr_info); 2749 vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_SIMUL_EX;
2750 vcpu->run->internal.ndata = 2;
2751 vcpu->run->internal.data[0] = vect_info;
2752 vcpu->run->internal.data[1] = intr_info;
2753 return 0;
2754 }
2750 2755
2751 if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR) 2756 if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR)
2752 return 1; /* already handled by vmx_vcpu_run() */ 2757 return 1; /* already handled by vmx_vcpu_run() */