direct-io.hg

changeset 14137:6efc22cb9c84

Missing files from previous changeset.
Signed-off-by: Thomas Friebel <thomas.friebel@amd.com>
author kfraser@localhost.localdomain
date Mon Feb 26 17:05:10 2007 +0000 (2007-02-26)
parents d2a91b73899a
children e7b2a282c9e7
files tools/xentrace/formats tools/xentrace/xentrace.8 tools/xentrace/xentrace.c xen/include/asm-x86/hvm/trace.h
line diff
     1.1 --- a/tools/xentrace/formats	Mon Feb 26 17:04:39 2007 +0000
     1.2 +++ b/tools/xentrace/formats	Mon Feb 26 17:05:10 2007 +0000
     1.3 @@ -16,29 +16,25 @@ 0x0002f00B  CPU%(cpu)d  %(tsc)d (+%(relt
     1.4  0x0002f00c  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  t_timer_fn
     1.5  0x0002f00d  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  dom_timer_fn
     1.6  
     1.7 -0x00080001  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMX_VMEXIT  [ domid = 0x%(1)08x, eip = 0x%(2)08x, reason = 0x%(3)08x ]
     1.8 -0x00084001  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMX_INTR    [ domid = 0x%(1)08x, trap = 0x%(2)08x, va = 0x%(3)08x ]
     1.9 -
    1.10 -0x00081001  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMEXIT_0    0x%(1)08x 0x%(2)08x 0x%(3)08x
    1.11 -0x00082001  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMENTRY_0   0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x
    1.12 -
    1.13 -0x00081002  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMEXIT_1    0x%(1)08x 0x%(2)08x 0x%(3)08x
    1.14 -0x00082002  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMENTRY_1   0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x
    1.15 -
    1.16 -0x00081003  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMEXIT_2    0x%(1)08x 0x%(2)08x 0x%(3)08x
    1.17 -0x00082003  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMENTRY_2   0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x
    1.18 -
    1.19 -0x00081004  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMEXIT_3    0x%(1)08x 0x%(2)08x 0x%(3)08x
    1.20 -0x00082004  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMENTRY_3   0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x
    1.21 -
    1.22 -0x00081005  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMEXIT_4    0x%(1)08x 0x%(2)08x 0x%(3)08x
    1.23 -0x00082005  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMENTRY_4   0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x
    1.24 -
    1.25 -0x00081006  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMEXIT_5    0x%(1)08x 0x%(2)08x 0x%(3)08x
    1.26 -0x00082006  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMENTRY_5   0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x
    1.27 -
    1.28 -0x00081007  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMEXIT_6    0x%(1)08x 0x%(2)08x 0x%(3)08x
    1.29 -0x00082007  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMENTRY_6   0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x
    1.30 -
    1.31 -0x00081008  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMEXIT_7    0x%(1)08x 0x%(2)08x 0x%(3)08x
    1.32 -0x00082008  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMENTRY_7   0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x
    1.33 +0x00081001  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMENTRY     [ dom:vcpu = 0x%(1)08x ]
    1.34 +0x00081002  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMEXIT      [ dom:vcpu = 0x%(1)08x, rIP  = 0x%(2)08x, exitcode = 0x%(3)08x ]
    1.35 +0x00082001  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  PF_XEN      [ dom:vcpu = 0x%(1)08x, virt = 0x%(2)08x, errorcode = 0x%(3)02x ]
    1.36 +0x00082002  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  PF_INJECT   [ dom:vcpu = 0x%(1)08x, virt = 0x%(2)08x, errorcode = 0x%(3)02x ]
    1.37 +0x00082003  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  INJ_EXC     [ dom:vcpu = 0x%(1)08x, vector = 0x%(2)02x, errorcode = 0x%(3)04x ]
    1.38 +0x00082004  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  INJ_VIRQ    [ dom:vcpu = 0x%(1)08x, vector = 0x%(2)02x, fake = %(3)d ]
    1.39 +0x00082005  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  REINJ_VIRQ  [ dom:vcpu = 0x%(1)08x, vector = 0x%(2)02x ]
    1.40 +0x00082006  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  IO_READ     [ dom:vcpu = 0x%(1)08x, port = 0x%(2)04x, size = %(3)d ]
    1.41 +0x00082007  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  IO_WRITE    [ dom:vcpu = 0x%(1)08x, port = 0x%(2)04x, size = %(3)d ]
    1.42 +0x00082008  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  CR_READ     [ dom:vcpu = 0x%(1)08x, CR# = %(2)d, value = 0x%(3)08x ]
    1.43 +0x00082009  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  CR_WRITE    [ dom:vcpu = 0x%(1)08x, CR# = %(2)d, value = 0x%(3)08x ]
    1.44 +0x0008200A  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  DR_READ     [ dom:vcpu = 0x%(1)08x ]
    1.45 +0x0008200B  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  DR_WRITE    [ dom:vcpu = 0x%(1)08x ]
    1.46 +0x0008200C  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  MSR_READ    [ dom:vcpu = 0x%(1)08x, MSR# = 0x%(2)08x, value = 0x%(3)08x ]
    1.47 +0x0008200D  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  MSR_WRITE   [ dom:vcpu = 0x%(1)08x, MSR# = 0x%(2)08x, value = 0x%(3)08x ]
    1.48 +0x0008200E  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  CPUID       [ dom:vcpu = 0x%(1)08x, func = 0x%(2)08x, eax:ebx = 0x%(3)016x, ecx:edx = 0x%(4)016x ]
    1.49 +0x0008200F  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  INTR        [ dom:vcpu = 0x%(1)08x, vector = 0x%(2)02x ]
    1.50 +0x00082010  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  NMI         [ dom:vcpu = 0x%(1)08x ]
    1.51 +0x00082011  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  SMI         [ dom:vcpu = 0x%(1)08x ]
    1.52 +0x00082012  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  VMMCALL     [ dom:vcpu = 0x%(1)08x, func = 0x%(2)08x ]
    1.53 +0x00082013  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  HLT         [ dom:vcpu = 0x%(1)08x, intpending = %(2)d ]
    1.54 +0x00082014  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  INVLPG      [ dom:vcpu = 0x%(1)08x, virt = 0x%(2)08x, invlpga = %(3)d, asid = 0x%(4)02x ]
     2.1 --- a/tools/xentrace/xentrace.8	Mon Feb 26 17:04:39 2007 +0000
     2.2 +++ b/tools/xentrace/xentrace.8	Mon Feb 26 17:05:10 2007 +0000
     2.3 @@ -1,4 +1,4 @@
     2.4 -.TH XENTRACE 8 "11 March 2004" "Xen domain 0 utils"
     2.5 +.TH XENTRACE 8 "22 February 2007" "Xen domain 0 utils"
     2.6  .SH NAME
     2.7  xentrace \- capture Xen trace buffer data
     2.8  .SH SYNOPSIS
     2.9 @@ -59,10 +59,10 @@ gathered by xentrace:
    2.10  .PP
    2.11          0x0001f000          TRC_GEN
    2.12          0x0002f000          TRC_SCHED
    2.13 -        0x0004f000          TRC_DOM0OP          
    2.14 -        0x0008f000          TRC_VMX
    2.15 -        0x000af000          TRC_MEM
    2.16 -        0xfffff000          TRC_ALL 
    2.17 +        0x0004f000          TRC_DOM0OP
    2.18 +        0x0008f000          TRC_HVM
    2.19 +        0x0010f000          TRC_MEM
    2.20 +        0xfffff000          TRC_ALL
    2.21  
    2.22  
    2.23  .SS Event Subclasses (More Masks)
    2.24 @@ -71,10 +71,8 @@ gathered by xentrace:
    2.25  .PP
    2.26          \fIID\fP                  \fIDescription\fP
    2.27  .PP
    2.28 -        0x00081000          TRC_VMXEXIT
    2.29 -        0x00082000          TRC_VMXTIMER
    2.30 -        0x00084000          TRC_VMXINT
    2.31 -        0x00088000          TRC_VMXIO
    2.32 +        0x00081000          TRC_HVM_ENTRYEXIT
    2.33 +        0x00082000          TRC_HVM_HANDLER
    2.34  
    2.35  
    2.36  .SS Events
    2.37 @@ -82,7 +80,8 @@ gathered by xentrace:
    2.38  collects the following events from the trace buffer:
    2.39  .PP
    2.40          \fIID\fP                \fIDescription\fP
    2.41 -.PP	
    2.42 +.PP
    2.43 +        0x0001f001         TRC_LOST_RECORDS
    2.44          0x0002f001         TRC_SCHED_DOM_ADD
    2.45          0x0002f002         TRC_SCHED_DOM_REM
    2.46          0x0002f003         TRC_SCHED_SLEEP
    2.47 @@ -99,16 +98,33 @@ collects the following events from the t
    2.48          0x0002f014         TRC_SCHED_SWITCH_INFPREV
    2.49          0x0002f015         TRC_SCHED_SWITCH_INFNEXT
    2.50  
    2.51 -        0x000af001         TRC_MEM_PAGE_GRANT_MAP
    2.52 -        0x000af002         TRC_MEM_PAGE_GRANT_UNMAP
    2.53 -        0x000af003         TRC_MEM_PAGE_GRANT_TRANSFER
    2.54 +        0x00081001         TRC_HVM_VMENTRY
    2.55 +        0x00081002         TRC_HVM_VMEXIT
    2.56 +        0x00082001         TRC_HVM_PF_XEN
    2.57 +        0x00082002         TRC_HVM_PF_INJECT
    2.58 +        0x00082003         TRC_HVM_INJ_EXC
    2.59 +        0x00082004         TRC_HVM_INJ_VIRQ
    2.60 +        0x00082005         TRC_HVM_REINJ_VIRQ
    2.61 +        0x00082006         TRC_HVM_IO_READ
    2.62 +        0x00082007         TRC_HVM_IO_WRITE
    2.63 +        0x00082008         TRC_HVM_CR_READ
    2.64 +        0x00082009         TRC_HVM_CR_WRITE
    2.65 +        0x0008200A         TRC_HVM_DR_READ
    2.66 +        0x0008200B         TRC_HVM_DR_WRITE
    2.67 +        0x0008200C         TRC_HVM_MSR_READ
    2.68 +        0x0008200D         TRC_HVM_MSR_WRITE
    2.69 +        0x0008200E         TRC_HVM_CPUID
    2.70 +        0x0008200F         TRC_HVM_INTR
    2.71 +        0x00082010         TRC_HVM_NMI 
    2.72 +        0x00082011         TRC_HVM_SMI 
    2.73 +        0x00082012         TRC_HVM_VMMCALL
    2.74 +        0x00082013         TRC_HVM_HLT
    2.75 +        0x00082014         TRC_HVM_INVLPG
    2.76  
    2.77 -        0x00081001         TRC_VMX_VMEXIT
    2.78 -        0x00081002         TRC_VMX_VMENTRY
    2.79 -        
    2.80 -        0x00082001         TRC_VMX_TIMER_INTR
    2.81 -        
    2.82 -        0x00084001         TRC_VMX_INT
    2.83 +        0x0010f001         TRC_MEM_PAGE_GRANT_MAP
    2.84 +        0x0010f002         TRC_MEM_PAGE_GRANT_UNMAP
    2.85 +        0x0010f003         TRC_MEM_PAGE_GRANT_TRANSFER
    2.86 +
    2.87  .PP
    2.88  
    2.89  .SH AUTHOR
     3.1 --- a/tools/xentrace/xentrace.c	Mon Feb 26 17:04:39 2007 +0000
     3.2 +++ b/tools/xentrace/xentrace.c	Mon Feb 26 17:05:10 2007 +0000
     3.3 @@ -350,8 +350,8 @@ int parse_evtmask(char *arg, struct argp
     3.4          setup->evt_mask |= TRC_SCHED;
     3.5      } else if(strcmp(arg, "dom0op") == 0){ 
     3.6          setup->evt_mask |= TRC_DOM0OP;
     3.7 -    } else if(strcmp(arg, "vmx") == 0){ 
     3.8 -        setup->evt_mask |= TRC_VMX;
     3.9 +    } else if(strcmp(arg, "hvm") == 0){ 
    3.10 +        setup->evt_mask |= TRC_HVM;
    3.11      } else if(strcmp(arg, "all") == 0){ 
    3.12          setup->evt_mask |= TRC_ALL;
    3.13      } else {
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/xen/include/asm-x86/hvm/trace.h	Mon Feb 26 17:05:10 2007 +0000
     4.3 @@ -0,0 +1,44 @@
     4.4 +#ifndef __ASM_X86_HVM_TRACE_H__
     4.5 +#define __ASM_X86_HVM_TRACE_H__
     4.6 +
     4.7 +#include <xen/trace.h>
     4.8 +
     4.9 +#define DO_TRC_HVM_VMENTRY     1
    4.10 +#define DO_TRC_HVM_VMEXIT      1
    4.11 +#define DO_TRC_HVM_PF_XEN      1
    4.12 +#define DO_TRC_HVM_PF_INJECT   1
    4.13 +#define DO_TRC_HVM_INJ_EXC     1
    4.14 +#define DO_TRC_HVM_INJ_VIRQ    1
    4.15 +#define DO_TRC_HVM_REINJ_VIRQ  1
    4.16 +#define DO_TRC_HVM_IO_READ     1
    4.17 +#define DO_TRC_HVM_IO_WRITE    1
    4.18 +#define DO_TRC_HVM_CR_READ     1
    4.19 +#define DO_TRC_HVM_CR_WRITE    1
    4.20 +#define DO_TRC_HVM_DR_READ     1
    4.21 +#define DO_TRC_HVM_DR_WRITE    1
    4.22 +#define DO_TRC_HVM_MSR_READ    1
    4.23 +#define DO_TRC_HVM_MSR_WRITE   1
    4.24 +#define DO_TRC_HVM_CPUID       1
    4.25 +#define DO_TRC_HVM_INTR        1
    4.26 +#define DO_TRC_HVM_NMI         1
    4.27 +#define DO_TRC_HVM_SMI         1
    4.28 +#define DO_TRC_HVM_VMMCALL     1
    4.29 +#define DO_TRC_HVM_HLT         1
    4.30 +#define DO_TRC_HVM_INVLPG      1
    4.31 +
    4.32 +#define HVMTRACE_4D(evt, vcpu, d1, d2, d3, d4)                      \
    4.33 +    do {                                                            \
    4.34 +        if (DO_TRC_HVM_ ## evt)                                     \
    4.35 +            TRACE_5D(                                               \
    4.36 +                TRC_HVM_ ## evt,                                    \
    4.37 +                ((vcpu)->domain->domain_id<<16) + (vcpu)->vcpu_id,  \
    4.38 +                d1, d2, d3, d4                                      \
    4.39 +            );                                                      \
    4.40 +    } while(0)
    4.41 +
    4.42 +#define HVMTRACE_3D(evt, vcpu, d1, d2, d3)       HVMTRACE_4D(evt, vcpu, d1, d2, d3,  0)
    4.43 +#define HVMTRACE_2D(evt, vcpu, d1, d2)           HVMTRACE_4D(evt, vcpu, d1, d2,  0,  0)
    4.44 +#define HVMTRACE_1D(evt, vcpu, d1)               HVMTRACE_4D(evt, vcpu, d1,  0,  0,  0)
    4.45 +#define HVMTRACE_0D(evt, vcpu)                   HVMTRACE_4D(evt, vcpu,  0,  0,  0,  0)
    4.46 +
    4.47 +#endif //__ASM_X86_HVM_TRACE_H__