diff mbox

[1/1] correctly handle VM Entry Exit reasons and also show them in trace.

Message ID r2r652016d31004172335gb2f57dfaxef74b8aee03cc30@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Manish Regmi April 18, 2010, 6:35 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
index fb9a080..9bf84db 100644
--- a/arch/x86/include/asm/vmx.h
+++ b/arch/x86/include/asm/vmx.h
@@ -251,6 +251,8 @@  enum vmcs_field {
 #define EXIT_REASON_IO_INSTRUCTION      30
 #define EXIT_REASON_MSR_READ            31
 #define EXIT_REASON_MSR_WRITE           32
+#define EXIT_REASON_INVALID_GUEST_STATE 33
+#define EXIT_REASON_MSR_LOADING         34
 #define EXIT_REASON_MWAIT_INSTRUCTION   36
 #define EXIT_REASON_MONITOR_INSTRUCTION 39
 #define EXIT_REASON_PAUSE_INSTRUCTION   40
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 7e2f8d5..e93be6f 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3641,7 +3641,7 @@  static void vmx_complete_interrupts(struct vcpu_vmx *vmx)

 	exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);

-	vmx->exit_reason = vmcs_read32(VM_EXIT_REASON);
+	vmx->exit_reason = vmcs_read32(VM_EXIT_REASON) &
~VMX_EXIT_REASONS_FAILED_VMENTRY;

 	/* Handle machine checks before interrupts are enabled */