WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: More descriptive failed vmentry

To: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Subject: [Xen-devel] Re: More descriptive failed vmentry
From: Horms <horms@xxxxxxxxxxxx>
Date: Tue, 11 Jul 2006 21:30:17 +0900 (JST)
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 12 Jul 2006 01:32:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <0EBFB99D260C5B40AC33E0F807B1AD66958578@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (Linux/2.6.17-1-686 (i686))
Looks nice, though might it break some tools?
Minor comment inline.

-- 
Horms                                           
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/

On Wed, 5 Jul 2006 20:06:37 +0800, Li, Xin B wrote:
> [-- text/plain, encoding quoted-printable, charset: us-ascii, 4 lines --]
> 
> More descriptive failed vmentry.
> 
> Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
> 
> diff -r 4d2354be4aa6 xen/arch/x86/hvm/vmx/vmx.c
> --- a/xen/arch/x86/hvm/vmx/vmx.c      Wed Jul 05 10:32:33 2006 +0100
> +++ b/xen/arch/x86/hvm/vmx/vmx.c      Wed Jul 05 20:02:14 2006 +0800
> @@ -2057,8 +2057,26 @@ asmlinkage void vmx_vmexit_handler(struc
>  
>      if ( unlikely(exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) )
>      {
> -        printk("Failed vm entry (reason 0x%x)\n", exit_reason);
> -        printk("*********** VMCS Area **************\n");
> +        unsigned int failed_vmentry_reason = exit_reason & 0xFFFF;
> +
> +        __vmread(EXIT_QUALIFICATION, &exit_qualification);
> +        printk("Failed vm entry (exit reason 0x%x) ", exit_reason);
> +        switch ( failed_vmentry_reason ) {
> +        case EXIT_REASON_INVALID_GUEST_STATE:
> +            printk("caused by invalid guest state (%ld).\n", 
> exit_qualification);

Could this be <= 80 columns wide ?

> +            break;
> +        case EXIT_REASON_MSR_LOADING:
> +            printk("caused by MSR entry %ld loading.\n", exit_qualification);
> +            break;
> +        case EXIT_REASON_MACHINE_CHECK:
> +            printk("caused by machine check.\n");
> +            break;
> +        default:
> +            printk("reason not known yet!");
> +            break;
> +        }
> +
> +        printk("************* VMCS Area **************\n");
>          vmcs_dump_vcpu();
>          printk("**************************************\n");
>          domain_crash_synchronous();
> diff -r 4d2354be4aa6 xen/include/asm-x86/hvm/vmx/vmx.h
> --- a/xen/include/asm-x86/hvm/vmx/vmx.h       Wed Jul 05 10:32:33 2006 +0100
> +++ b/xen/include/asm-x86/hvm/vmx/vmx.h       Wed Jul 05 20:02:14 2006 +0800
> @@ -133,6 +133,11 @@ extern unsigned int cpu_rev;
>  #define EXIT_REASON_MSR_WRITE           32
>  #define EXIT_REASON_MWAIT_INSTRUCTION   36
>  
> +#define EXIT_REASON_INVALID_GUEST_STATE 33
> +#define EXIT_REASON_MSR_LOADING         34
> +#define EXIT_REASON_MACHINE_CHECK       41
> +
> +
>  /*
>   * Interruption-information format
>   */
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>