ia64/xen-unstable

changeset 18452:1abe2bf8c0fa

xentrace 3/7: Remove vcpu / domain from HVM traces.

This information is now redundant, as it can be determined using
runstate changes and lost record changes. This reduces log size for
long-running traces by 10-30%.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Sep 08 15:52:03 2008 +0100 (2008-09-08)
parents 0e3df63b9932
children 8305efd06749
files xen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/svm/intr.c xen/arch/x86/hvm/svm/svm.c xen/arch/x86/hvm/vmx/intr.c xen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/trace.h
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Mon Sep 08 15:50:33 2008 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Mon Sep 08 15:52:03 2008 +0100
     1.3 @@ -773,7 +773,7 @@ void hvm_hlt(unsigned long rflags)
     1.4  
     1.5      do_sched_op_compat(SCHEDOP_block, 0);
     1.6  
     1.7 -    HVMTRACE_1D(HLT, curr, /* pending = */ vcpu_runnable(curr));
     1.8 +    HVMTRACE_1D(HLT, /* pending = */ vcpu_runnable(curr));
     1.9  }
    1.10  
    1.11  void hvm_triple_fault(void)
     2.1 --- a/xen/arch/x86/hvm/svm/intr.c	Mon Sep 08 15:50:33 2008 +0100
     2.2 +++ b/xen/arch/x86/hvm/svm/intr.c	Mon Sep 08 15:52:03 2008 +0100
     2.3 @@ -80,7 +80,7 @@ static void enable_intr_window(struct vc
     2.4  
     2.5      ASSERT(intack.source != hvm_intsrc_none);
     2.6  
     2.7 -    HVMTRACE_2D(INJ_VIRQ, v, 0x0, /*fake=*/ 1);
     2.8 +    HVMTRACE_2D(INJ_VIRQ, 0x0, /*fake=*/ 1);
     2.9  
    2.10      /*
    2.11       * Create a dummy virtual interrupt to intercept as soon as the
    2.12 @@ -199,7 +199,7 @@ asmlinkage void svm_intr_assist(void)
    2.13      }
    2.14      else
    2.15      {
    2.16 -        HVMTRACE_2D(INJ_VIRQ, v, intack.vector, /*fake=*/ 0);
    2.17 +        HVMTRACE_2D(INJ_VIRQ, intack.vector, /*fake=*/ 0);
    2.18          svm_inject_extint(v, intack.vector);
    2.19          pt_intr_post(v, intack);
    2.20      }
     3.1 --- a/xen/arch/x86/hvm/svm/svm.c	Mon Sep 08 15:50:33 2008 +0100
     3.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Mon Sep 08 15:52:03 2008 +0100
     3.3 @@ -759,11 +759,11 @@ static void svm_inject_exception(
     3.4      if ( trapnr == TRAP_page_fault )
     3.5      {
     3.6          vmcb->cr2 = curr->arch.hvm_vcpu.guest_cr[2] = cr2;
     3.7 -        HVMTRACE_LONG_2D(PF_INJECT, curr, errcode, TRC_PAR_LONG(cr2));
     3.8 +        HVMTRACE_LONG_2D(PF_INJECT, errcode, TRC_PAR_LONG(cr2));
     3.9      }
    3.10      else
    3.11      {
    3.12 -        HVMTRACE_2D(INJ_EXC, curr, trapnr, errcode);
    3.13 +        HVMTRACE_2D(INJ_EXC, trapnr, errcode);
    3.14      }
    3.15  
    3.16      if ( (trapnr == TRAP_debug) &&
    3.17 @@ -919,7 +919,7 @@ static void svm_cpuid_intercept(
    3.18              __clear_bit(X86_FEATURE_APIC & 31, edx);
    3.19      }
    3.20  
    3.21 -    HVMTRACE_5D (CPUID, v, input, *eax, *ebx, *ecx, *edx);
    3.22 +    HVMTRACE_5D (CPUID, input, *eax, *ebx, *ecx, *edx);
    3.23  }
    3.24  
    3.25  static void svm_vmexit_do_cpuid(struct cpu_user_regs *regs)
    3.26 @@ -946,7 +946,7 @@ static void svm_vmexit_do_cpuid(struct c
    3.27  
    3.28  static void svm_dr_access(struct vcpu *v, struct cpu_user_regs *regs)
    3.29  {
    3.30 -    HVMTRACE_0D(DR_WRITE, v);
    3.31 +    HVMTRACE_0D(DR_WRITE);
    3.32      __restore_debug_registers(v);
    3.33  }
    3.34  
    3.35 @@ -1018,7 +1018,7 @@ static int svm_msr_read_intercept(struct
    3.36      regs->edx = msr_content >> 32;
    3.37  
    3.38   done:
    3.39 -    HVMTRACE_3D (MSR_READ, v, ecx, regs->eax, regs->edx);
    3.40 +    HVMTRACE_3D (MSR_READ, ecx, regs->eax, regs->edx);
    3.41      HVM_DBG_LOG(DBG_LEVEL_1, "returns: ecx=%x, eax=%lx, edx=%lx",
    3.42                  ecx, (unsigned long)regs->eax, (unsigned long)regs->edx);
    3.43      return X86EMUL_OKAY;
    3.44 @@ -1037,7 +1037,7 @@ static int svm_msr_write_intercept(struc
    3.45  
    3.46      msr_content = (u32)regs->eax | ((u64)regs->edx << 32);
    3.47  
    3.48 -    HVMTRACE_3D (MSR_WRITE, v, ecx, regs->eax, regs->edx);
    3.49 +    HVMTRACE_3D (MSR_WRITE, ecx, regs->eax, regs->edx);
    3.50  
    3.51      switch ( ecx )
    3.52      {
    3.53 @@ -1168,7 +1168,7 @@ static void svm_vmexit_do_invalidate_cac
    3.54  static void svm_invlpg_intercept(unsigned long vaddr)
    3.55  {
    3.56      struct vcpu *curr = current;
    3.57 -    HVMTRACE_LONG_2D(INVLPG, curr, 0, TRC_PAR_LONG(vaddr));
    3.58 +    HVMTRACE_LONG_2D(INVLPG, 0, TRC_PAR_LONG(vaddr));
    3.59      paging_invlpg(curr, vaddr);
    3.60      svm_asid_g_invlpg(curr, vaddr);
    3.61  }
    3.62 @@ -1191,7 +1191,7 @@ asmlinkage void svm_vmexit_handler(struc
    3.63  
    3.64      exit_reason = vmcb->exitcode;
    3.65  
    3.66 -    HVMTRACE_ND(VMEXIT64, 1/*cycles*/, v, 3, exit_reason,
    3.67 +    HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
    3.68                  (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
    3.69                  0, 0, 0);
    3.70  
    3.71 @@ -1216,17 +1216,17 @@ asmlinkage void svm_vmexit_handler(struc
    3.72      {
    3.73      case VMEXIT_INTR:
    3.74          /* Asynchronous event, handled when we STGI'd after the VMEXIT. */
    3.75 -        HVMTRACE_0D(INTR, v);
    3.76 +        HVMTRACE_0D(INTR);
    3.77          break;
    3.78  
    3.79      case VMEXIT_NMI:
    3.80          /* Asynchronous event, handled when we STGI'd after the VMEXIT. */
    3.81 -        HVMTRACE_0D(NMI, v);
    3.82 +        HVMTRACE_0D(NMI);
    3.83          break;
    3.84  
    3.85      case VMEXIT_SMI:
    3.86          /* Asynchronous event, handled when we STGI'd after the VMEXIT. */
    3.87 -        HVMTRACE_0D(SMI, v);
    3.88 +        HVMTRACE_0D(SMI);
    3.89          break;
    3.90  
    3.91      case VMEXIT_EXCEPTION_DB:
    3.92 @@ -1262,9 +1262,9 @@ asmlinkage void svm_vmexit_handler(struc
    3.93          if ( paging_fault(va, regs) )
    3.94          {
    3.95              if (hvm_long_mode_enabled(v))
    3.96 -                HVMTRACE_LONG_2D(PF_XEN, v, regs->error_code, TRC_PAR_LONG(va));
    3.97 +                HVMTRACE_LONG_2D(PF_XEN, regs->error_code, TRC_PAR_LONG(va));
    3.98              else
    3.99 -                HVMTRACE_2D(PF_XEN, v, regs->error_code, va);
   3.100 +                HVMTRACE_2D(PF_XEN, regs->error_code, va);
   3.101              break;
   3.102          }
   3.103  
   3.104 @@ -1274,7 +1274,7 @@ asmlinkage void svm_vmexit_handler(struc
   3.105  
   3.106      /* Asynchronous event, handled when we STGI'd after the VMEXIT. */
   3.107      case VMEXIT_EXCEPTION_MC:
   3.108 -        HVMTRACE_0D(MCE, v);
   3.109 +        HVMTRACE_0D(MCE);
   3.110          break;
   3.111  
   3.112      case VMEXIT_VINTR:
   3.113 @@ -1331,7 +1331,7 @@ asmlinkage void svm_vmexit_handler(struc
   3.114      case VMEXIT_VMMCALL:
   3.115          if ( (inst_len = __get_instruction_length(v, INSTR_VMCALL)) == 0 )
   3.116              break;
   3.117 -        HVMTRACE_1D(VMMCALL, v, regs->eax);
   3.118 +        HVMTRACE_1D(VMMCALL, regs->eax);
   3.119          rc = hvm_do_hypercall(regs);
   3.120          if ( rc != HVM_HCALL_preempted )
   3.121          {
   3.122 @@ -1406,7 +1406,7 @@ asmlinkage void svm_vmexit_handler(struc
   3.123  
   3.124  asmlinkage void svm_trace_vmentry(void)
   3.125  {
   3.126 -    HVMTRACE_ND (VMENTRY, 1/*cycles*/, current, 0, 0, 0, 0, 0, 0, 0);
   3.127 +    HVMTRACE_ND (VMENTRY, 1/*cycles*/, 0, 0, 0, 0, 0, 0, 0);
   3.128  }
   3.129    
   3.130  /*
     4.1 --- a/xen/arch/x86/hvm/vmx/intr.c	Mon Sep 08 15:50:33 2008 +0100
     4.2 +++ b/xen/arch/x86/hvm/vmx/intr.c	Mon Sep 08 15:52:03 2008 +0100
     4.3 @@ -198,7 +198,7 @@ asmlinkage void vmx_intr_assist(void)
     4.4      }
     4.5      else
     4.6      {
     4.7 -        HVMTRACE_2D(INJ_VIRQ, v, intack.vector, /*fake=*/ 0);
     4.8 +        HVMTRACE_2D(INJ_VIRQ, intack.vector, /*fake=*/ 0);
     4.9          vmx_inject_extint(v, intack.vector);
    4.10          pt_intr_post(v, intack);
    4.11      }
     5.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Mon Sep 08 15:50:33 2008 +0100
     5.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Mon Sep 08 15:52:03 2008 +0100
     5.3 @@ -1114,10 +1114,10 @@ static void __vmx_inject_exception(
     5.4      __vmwrite(VM_ENTRY_INTR_INFO, intr_fields);
     5.5  
     5.6      if ( trap == TRAP_page_fault )
     5.7 -        HVMTRACE_LONG_2D(PF_INJECT, v, error_code,
     5.8 +        HVMTRACE_LONG_2D(PF_INJECT, error_code,
     5.9              TRC_PAR_LONG(v->arch.hvm_vcpu.guest_cr[2]));
    5.10      else
    5.11 -        HVMTRACE_2D(INJ_EXC, v, trap, error_code);
    5.12 +        HVMTRACE_2D(INJ_EXC, trap, error_code);
    5.13  }
    5.14  
    5.15  void vmx_inject_hw_exception(struct vcpu *v, int trap, int error_code)
    5.16 @@ -1345,7 +1345,7 @@ static void vmx_cpuid_intercept(
    5.17              break;
    5.18      }
    5.19  
    5.20 -    HVMTRACE_5D (CPUID, current, input, *eax, *ebx, *ecx, *edx);
    5.21 +    HVMTRACE_5D (CPUID, input, *eax, *ebx, *ecx, *edx);
    5.22  }
    5.23  
    5.24  static void vmx_do_cpuid(struct cpu_user_regs *regs)
    5.25 @@ -1370,7 +1370,7 @@ static void vmx_dr_access(unsigned long 
    5.26  {
    5.27      struct vcpu *v = current;
    5.28  
    5.29 -    HVMTRACE_0D(DR_WRITE, v);
    5.30 +    HVMTRACE_0D(DR_WRITE);
    5.31  
    5.32      if ( !v->arch.hvm_vcpu.flag_dr_dirty )
    5.33          __restore_debug_registers(v);
    5.34 @@ -1383,7 +1383,7 @@ static void vmx_dr_access(unsigned long 
    5.35  static void vmx_invlpg_intercept(unsigned long vaddr)
    5.36  {
    5.37      struct vcpu *curr = current;
    5.38 -    HVMTRACE_LONG_2D(INVLPG, curr, /*invlpga=*/ 0, TRC_PAR_LONG(vaddr));
    5.39 +    HVMTRACE_LONG_2D(INVLPG, /*invlpga=*/ 0, TRC_PAR_LONG(vaddr));
    5.40      if ( paging_invlpg(curr, vaddr) )
    5.41          vpid_sync_vcpu_gva(curr, vaddr);
    5.42  }
    5.43 @@ -1434,7 +1434,7 @@ static int mov_to_cr(int gp, int cr, str
    5.44          goto exit_and_crash;
    5.45      }
    5.46  
    5.47 -    HVMTRACE_LONG_2D(CR_WRITE, v, cr, TRC_PAR_LONG(value));
    5.48 +    HVMTRACE_LONG_2D(CR_WRITE, cr, TRC_PAR_LONG(value));
    5.49  
    5.50      HVM_DBG_LOG(DBG_LEVEL_1, "CR%d, value = %lx", cr, value);
    5.51  
    5.52 @@ -1505,7 +1505,7 @@ static void mov_from_cr(int cr, int gp, 
    5.53          break;
    5.54      }
    5.55  
    5.56 -    HVMTRACE_LONG_2D(CR_READ, v, cr, TRC_PAR_LONG(value));
    5.57 +    HVMTRACE_LONG_2D(CR_READ, cr, TRC_PAR_LONG(value));
    5.58  
    5.59      HVM_DBG_LOG(DBG_LEVEL_VMMU, "CR%d, value = %lx", cr, value);
    5.60  }
    5.61 @@ -1531,13 +1531,13 @@ static int vmx_cr_access(unsigned long e
    5.62      case VMX_CONTROL_REG_ACCESS_TYPE_CLTS:
    5.63          v->arch.hvm_vcpu.guest_cr[0] &= ~X86_CR0_TS;
    5.64          vmx_update_guest_cr(v, 0);
    5.65 -        HVMTRACE_0D(CLTS, current);
    5.66 +        HVMTRACE_0D(CLTS);
    5.67          break;
    5.68      case VMX_CONTROL_REG_ACCESS_TYPE_LMSW:
    5.69          value = v->arch.hvm_vcpu.guest_cr[0];
    5.70          /* LMSW can: (1) set bits 0-3; (2) clear bits 1-3. */
    5.71          value = (value & ~0xe) | ((exit_qualification >> 16) & 0xf);
    5.72 -        HVMTRACE_LONG_1D(LMSW, current, value);
    5.73 +        HVMTRACE_LONG_1D(LMSW, value);
    5.74          return !hvm_set_cr0(value);
    5.75      default:
    5.76          BUG();
    5.77 @@ -1692,7 +1692,7 @@ static int vmx_msr_read_intercept(struct
    5.78      regs->edx = (uint32_t)(msr_content >> 32);
    5.79  
    5.80  done:
    5.81 -    HVMTRACE_3D (MSR_READ, v, ecx, regs->eax, regs->edx);
    5.82 +    HVMTRACE_3D (MSR_READ, ecx, regs->eax, regs->edx);
    5.83      HVM_DBG_LOG(DBG_LEVEL_1, "returns: ecx=%x, eax=%lx, edx=%lx",
    5.84                  ecx, (unsigned long)regs->eax,
    5.85                  (unsigned long)regs->edx);
    5.86 @@ -1803,7 +1803,7 @@ static int vmx_msr_write_intercept(struc
    5.87  
    5.88      msr_content = (u32)regs->eax | ((u64)regs->edx << 32);
    5.89  
    5.90 -    HVMTRACE_3D (MSR_WRITE, v, ecx, regs->eax, regs->edx);
    5.91 +    HVMTRACE_3D (MSR_WRITE, ecx, regs->eax, regs->edx);
    5.92  
    5.93      switch ( ecx )
    5.94      {
    5.95 @@ -1894,7 +1894,7 @@ static void vmx_do_extint(struct cpu_use
    5.96      BUG_ON(!(vector & INTR_INFO_VALID_MASK));
    5.97  
    5.98      vector &= INTR_INFO_VECTOR_MASK;
    5.99 -    HVMTRACE_1D(INTR, current, vector);
   5.100 +    HVMTRACE_1D(INTR, vector);
   5.101  
   5.102      switch ( vector )
   5.103      {
   5.104 @@ -2010,7 +2010,7 @@ static void vmx_failed_vmentry(unsigned 
   5.105          break;
   5.106      case EXIT_REASON_MACHINE_CHECK:
   5.107          printk("caused by machine check.\n");
   5.108 -        HVMTRACE_0D(MCE, curr);
   5.109 +        HVMTRACE_0D(MCE);
   5.110          do_machine_check(regs);
   5.111          break;
   5.112      default:
   5.113 @@ -2037,7 +2037,7 @@ asmlinkage void vmx_vmexit_handler(struc
   5.114  
   5.115      exit_reason = __vmread(VM_EXIT_REASON);
   5.116  
   5.117 -    HVMTRACE_ND(VMEXIT64, 1/*cycles*/, v, 3, exit_reason,
   5.118 +    HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
   5.119                  (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
   5.120                  0, 0, 0);
   5.121  
   5.122 @@ -2129,10 +2129,10 @@ asmlinkage void vmx_vmexit_handler(struc
   5.123              if ( paging_fault(exit_qualification, regs) )
   5.124              {
   5.125                  if ( hvm_long_mode_enabled(v) )
   5.126 -                    HVMTRACE_LONG_2D (PF_XEN, v, regs->error_code,
   5.127 +                    HVMTRACE_LONG_2D (PF_XEN, regs->error_code,
   5.128                          TRC_PAR_LONG(exit_qualification) );
   5.129                  else
   5.130 -                    HVMTRACE_2D (PF_XEN, v,
   5.131 +                    HVMTRACE_2D (PF_XEN,
   5.132                          regs->error_code, exit_qualification );
   5.133                  break;
   5.134              }
   5.135 @@ -2144,11 +2144,11 @@ asmlinkage void vmx_vmexit_handler(struc
   5.136              if ( (intr_info & INTR_INFO_INTR_TYPE_MASK) !=
   5.137                   (X86_EVENTTYPE_NMI << 8) )
   5.138                  goto exit_and_crash;
   5.139 -            HVMTRACE_0D(NMI, v);
   5.140 +            HVMTRACE_0D(NMI);
   5.141              do_nmi(regs); /* Real NMI, vector 2: normal processing. */
   5.142              break;
   5.143          case TRAP_machine_check:
   5.144 -            HVMTRACE_0D(MCE, v);
   5.145 +            HVMTRACE_0D(MCE);
   5.146              do_machine_check(regs);
   5.147              break;
   5.148          default:
   5.149 @@ -2213,7 +2213,7 @@ asmlinkage void vmx_vmexit_handler(struc
   5.150      case EXIT_REASON_VMCALL:
   5.151      {
   5.152          int rc;
   5.153 -        HVMTRACE_1D(VMMCALL, v, regs->eax);
   5.154 +        HVMTRACE_1D(VMMCALL, regs->eax);
   5.155          inst_len = __get_instruction_length(); /* Safe: VMCALL */
   5.156          rc = hvm_do_hypercall(regs);
   5.157          if ( rc != HVM_HCALL_preempted )
   5.158 @@ -2300,7 +2300,7 @@ asmlinkage void vmx_vmexit_handler(struc
   5.159  
   5.160  asmlinkage void vmx_trace_vmentry(void)
   5.161  {
   5.162 -    HVMTRACE_ND (VMENTRY, 1/*cycles*/, current, 0, 0, 0, 0, 0, 0, 0);
   5.163 +    HVMTRACE_ND (VMENTRY, 1/*cycles*/, 0, 0, 0, 0, 0, 0, 0);
   5.164  }
   5.165  
   5.166  /*
     6.1 --- a/xen/include/asm-x86/hvm/trace.h	Mon Sep 08 15:50:33 2008 +0100
     6.2 +++ b/xen/include/asm-x86/hvm/trace.h	Mon Sep 08 15:52:03 2008 +0100
     6.3 @@ -56,16 +56,13 @@
     6.4  #define TRC_PAR_LONG(par) (par)
     6.5  #endif
     6.6  
     6.7 -#define HVMTRACE_ND(evt, cycles, vcpu, count, d1, d2, d3, d4, d5, d6)   \
     6.8 +#define HVMTRACE_ND(evt, cycles, count, d1, d2, d3, d4, d5, d6)         \
     6.9      do {                                                                \
    6.10          if ( unlikely(tb_init_done) && DO_TRC_HVM_ ## evt )             \
    6.11          {                                                               \
    6.12              struct {                                                    \
    6.13 -                u32 did:16, vid:16;                                     \
    6.14                  u32 d[6];                                               \
    6.15              } _d;                                                       \
    6.16 -            _d.did=(vcpu)->domain->domain_id;                           \
    6.17 -            _d.vid=(vcpu)->vcpu_id;                                     \
    6.18              _d.d[0]=(d1);                                               \
    6.19              _d.d[1]=(d2);                                               \
    6.20              _d.d[2]=(d3);                                               \
    6.21 @@ -77,32 +74,32 @@
    6.22          }                                                               \
    6.23      } while(0)
    6.24  
    6.25 -#define HVMTRACE_6D(evt, vcpu, d1, d2, d3, d4, d5, d6)    \
    6.26 -                      HVMTRACE_ND(evt, 0, vcpu, 6, d1, d2, d3,  d4, d5, d6)
    6.27 -#define HVMTRACE_5D(evt, vcpu, d1, d2, d3, d4, d5)        \
    6.28 -                      HVMTRACE_ND(evt, 0, vcpu, 5, d1, d2, d3,  d4, d5, 0)
    6.29 -#define HVMTRACE_4D(evt, vcpu, d1, d2, d3, d4)               \
    6.30 -                      HVMTRACE_ND(evt, 0, vcpu, 4, d1, d2, d3,  d4, 0, 0)
    6.31 -#define HVMTRACE_3D(evt, vcpu, d1, d2, d3)                   \
    6.32 -                      HVMTRACE_ND(evt, 0, vcpu, 3, d1, d2, d3,  0, 0, 0)
    6.33 -#define HVMTRACE_2D(evt, vcpu, d1, d2)                       \
    6.34 -                      HVMTRACE_ND(evt, 0, vcpu, 2, d1, d2,  0,  0, 0, 0)
    6.35 -#define HVMTRACE_1D(evt, vcpu, d1)                           \
    6.36 -                      HVMTRACE_ND(evt, 0, vcpu, 1, d1,  0,  0,  0, 0, 0)
    6.37 -#define HVMTRACE_0D(evt, vcpu)                               \
    6.38 -                      HVMTRACE_ND(evt, 0, vcpu, 0, 0,  0,  0,  0, 0, 0)
    6.39 +#define HVMTRACE_6D(evt, d1, d2, d3, d4, d5, d6)    \
    6.40 +                      HVMTRACE_ND(evt, 0, 6, d1, d2, d3,  d4, d5, d6)
    6.41 +#define HVMTRACE_5D(evt, d1, d2, d3, d4, d5)        \
    6.42 +                      HVMTRACE_ND(evt, 0, 5, d1, d2, d3,  d4, d5, 0)
    6.43 +#define HVMTRACE_4D(evt, d1, d2, d3, d4)               \
    6.44 +                      HVMTRACE_ND(evt, 0, 4, d1, d2, d3,  d4, 0, 0)
    6.45 +#define HVMTRACE_3D(evt, d1, d2, d3)                   \
    6.46 +                      HVMTRACE_ND(evt, 0, 3, d1, d2, d3,  0, 0, 0)
    6.47 +#define HVMTRACE_2D(evt, d1, d2)                       \
    6.48 +                      HVMTRACE_ND(evt, 0, 2, d1, d2,  0,  0, 0, 0)
    6.49 +#define HVMTRACE_1D(evt, d1)                           \
    6.50 +                      HVMTRACE_ND(evt, 0, 1, d1,  0,  0,  0, 0, 0)
    6.51 +#define HVMTRACE_0D(evt)                               \
    6.52 +                      HVMTRACE_ND(evt, 0, 0, 0,  0,  0,  0, 0, 0)
    6.53  
    6.54  
    6.55  
    6.56  #ifdef __x86_64__
    6.57 -#define HVMTRACE_LONG_1D(evt, vcpu, d1)                  \
    6.58 -                   HVMTRACE_2D(evt ## 64, vcpu, (d1) & 0xFFFFFFFF, (d1) >> 32)
    6.59 -#define HVMTRACE_LONG_2D(evt,vcpu,d1,d2, ...)              \
    6.60 -                   HVMTRACE_3D(evt ## 64, vcpu, d1, d2)
    6.61 -#define HVMTRACE_LONG_3D(evt, vcpu, d1, d2, d3, ...)      \
    6.62 -                   HVMTRACE_4D(evt ## 64, vcpu, d1, d2, d3)
    6.63 -#define HVMTRACE_LONG_4D(evt, vcpu, d1, d2, d3, d4, ...)  \
    6.64 -                   HVMTRACE_5D(evt ## 64, vcpu, d1, d2, d3, d4)
    6.65 +#define HVMTRACE_LONG_1D(evt, d1)                  \
    6.66 +                   HVMTRACE_2D(evt ## 64, (d1) & 0xFFFFFFFF, (d1) >> 32)
    6.67 +#define HVMTRACE_LONG_2D(evt, d1, d2, ...)              \
    6.68 +                   HVMTRACE_3D(evt ## 64, d1, d2)
    6.69 +#define HVMTRACE_LONG_3D(evt, d1, d2, d3, ...)      \
    6.70 +                   HVMTRACE_4D(evt ## 64, d1, d2, d3)
    6.71 +#define HVMTRACE_LONG_4D(evt, d1, d2, d3, d4, ...)  \
    6.72 +                   HVMTRACE_5D(evt ## 64, d1, d2, d3, d4)
    6.73  #else
    6.74  #define HVMTRACE_LONG_1D HVMTRACE_1D
    6.75  #define HVMTRACE_LONG_2D HVMTRACE_2D