ia64/xen-unstable

changeset 10658:d6363854fb35

[HVM][VMX] More descriptive failed vmentry.
Signed-off-by: Xin Li <xin.b.li@intel.com>
author kfraser@localhost.localdomain
date Wed Jul 05 14:31:22 2006 +0100 (2006-07-05)
parents bbea54da02b5
children 2aa910eb3713
files xen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/vmx/vmx.h
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Wed Jul 05 14:29:57 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Jul 05 14:31:22 2006 +0100
     1.3 @@ -2093,8 +2093,26 @@ asmlinkage void vmx_vmexit_handler(struc
     1.4  
     1.5      if ( unlikely(exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) )
     1.6      {
     1.7 -        printk("Failed vm entry (reason 0x%x)\n", exit_reason);
     1.8 -        printk("*********** VMCS Area **************\n");
     1.9 +        unsigned int failed_vmentry_reason = exit_reason & 0xFFFF;
    1.10 +
    1.11 +        __vmread(EXIT_QUALIFICATION, &exit_qualification);
    1.12 +        printk("Failed vm entry (exit reason 0x%x) ", exit_reason);
    1.13 +        switch ( failed_vmentry_reason ) {
    1.14 +        case EXIT_REASON_INVALID_GUEST_STATE:
    1.15 +            printk("caused by invalid guest state (%ld).\n", exit_qualification);
    1.16 +            break;
    1.17 +        case EXIT_REASON_MSR_LOADING:
    1.18 +            printk("caused by MSR entry %ld loading.\n", exit_qualification);
    1.19 +            break;
    1.20 +        case EXIT_REASON_MACHINE_CHECK:
    1.21 +            printk("caused by machine check.\n");
    1.22 +            break;
    1.23 +        default:
    1.24 +            printk("reason not known yet!");
    1.25 +            break;
    1.26 +        }
    1.27 +
    1.28 +        printk("************* VMCS Area **************\n");
    1.29          vmcs_dump_vcpu();
    1.30          printk("**************************************\n");
    1.31          domain_crash_synchronous();
     2.1 --- a/xen/include/asm-x86/hvm/vmx/vmx.h	Wed Jul 05 14:29:57 2006 +0100
     2.2 +++ b/xen/include/asm-x86/hvm/vmx/vmx.h	Wed Jul 05 14:31:22 2006 +0100
     2.3 @@ -133,6 +133,11 @@ extern unsigned int cpu_rev;
     2.4  #define EXIT_REASON_MSR_WRITE           32
     2.5  #define EXIT_REASON_MWAIT_INSTRUCTION   36
     2.6  
     2.7 +#define EXIT_REASON_INVALID_GUEST_STATE 33
     2.8 +#define EXIT_REASON_MSR_LOADING         34
     2.9 +#define EXIT_REASON_MACHINE_CHECK       41
    2.10 +
    2.11 +
    2.12  /*
    2.13   * Interruption-information format
    2.14   */