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@intel.com>
>
> 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@lists.xensource.com
http://lists.xensource.com/xen-devel