ia64/xen-unstable

changeset 19516:ac21e640cc83

xentrace: Only trace 64b vmexit when in long mode.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Apr 07 11:04:27 2009 +0100 (2009-04-07)
parents 1ff30ca70186
children 47e836fc59de
files xen/arch/x86/hvm/svm/svm.c xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/svm.c	Tue Apr 07 10:57:11 2009 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Tue Apr 07 11:04:27 2009 +0100
     1.3 @@ -1217,9 +1217,14 @@ asmlinkage void svm_vmexit_handler(struc
     1.4  
     1.5      exit_reason = vmcb->exitcode;
     1.6  
     1.7 -    HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
     1.8 -                (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
     1.9 -                0, 0, 0);
    1.10 +    if ( hvm_long_mode_enabled(v) )
    1.11 +        HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
    1.12 +                    (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
    1.13 +                    0, 0, 0);
    1.14 +    else
    1.15 +        HVMTRACE_ND(VMEXIT, 1/*cycles*/, 2, exit_reason,
    1.16 +                    (uint32_t)regs->eip, 
    1.17 +                    0, 0, 0, 0);
    1.18  
    1.19      if ( unlikely(exit_reason == VMEXIT_INVALID) )
    1.20      {
     2.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Tue Apr 07 10:57:11 2009 +0100
     2.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Tue Apr 07 11:04:27 2009 +0100
     2.3 @@ -2241,9 +2241,14 @@ asmlinkage void vmx_vmexit_handler(struc
     2.4  
     2.5      exit_reason = __vmread(VM_EXIT_REASON);
     2.6  
     2.7 -    HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
     2.8 -                (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
     2.9 -                0, 0, 0);
    2.10 +    if ( hvm_long_mode_enabled(v) )
    2.11 +        HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
    2.12 +                    (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
    2.13 +                    0, 0, 0);
    2.14 +    else
    2.15 +        HVMTRACE_ND(VMEXIT, 1/*cycles*/, 2, exit_reason,
    2.16 +                    (uint32_t)regs->eip, 
    2.17 +                    0, 0, 0, 0);
    2.18  
    2.19      perfc_incra(vmexits, exit_reason);
    2.20