ia64/xen-unstable

view xen/include/asm-x86/hvm/trace.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents b44e244d7bb9
children
line source
1 #ifndef __ASM_X86_HVM_TRACE_H__
2 #define __ASM_X86_HVM_TRACE_H__
4 #include <xen/trace.h>
6 #define DEFAULT_HVM_TRACE_ON 1
7 #define DEFAULT_HVM_TRACE_OFF 0
9 #define DEFAULT_HVM_VMSWITCH DEFAULT_HVM_TRACE_ON
10 #define DEFAULT_HVM_PF DEFAULT_HVM_TRACE_ON
11 #define DEFAULT_HVM_INJECT DEFAULT_HVM_TRACE_ON
12 #define DEFAULT_HVM_IO DEFAULT_HVM_TRACE_ON
13 #define DEFAULT_HVM_REGACCESS DEFAULT_HVM_TRACE_ON
14 #define DEFAULT_HVM_MISC DEFAULT_HVM_TRACE_ON
15 #define DEFAULT_HVM_INTR DEFAULT_HVM_TRACE_ON
17 #define DO_TRC_HVM_VMENTRY DEFAULT_HVM_VMSWITCH
18 #define DO_TRC_HVM_VMEXIT DEFAULT_HVM_VMSWITCH
19 #define DO_TRC_HVM_VMEXIT64 DEFAULT_HVM_VMSWITCH
20 #define DO_TRC_HVM_PF_XEN DEFAULT_HVM_PF
21 #define DO_TRC_HVM_PF_XEN64 DEFAULT_HVM_PF
22 #define DO_TRC_HVM_PF_INJECT DEFAULT_HVM_PF
23 #define DO_TRC_HVM_PF_INJECT64 DEFAULT_HVM_PF
24 #define DO_TRC_HVM_INJ_EXC DEFAULT_HVM_INJECT
25 #define DO_TRC_HVM_INJ_VIRQ DEFAULT_HVM_INJECT
26 #define DO_TRC_HVM_REINJ_VIRQ DEFAULT_HVM_INJECT
27 #define DO_TRC_HVM_INTR_WINDOW DEFAULT_HVM_INJECT
28 #define DO_TRC_HVM_IO_READ DEFAULT_HVM_IO
29 #define DO_TRC_HVM_IO_WRITE DEFAULT_HVM_IO
30 #define DO_TRC_HVM_CR_READ DEFAULT_HVM_REGACCESS
31 #define DO_TRC_HVM_CR_READ64 DEFAULT_HVM_REGACCESS
32 #define DO_TRC_HVM_CR_WRITE DEFAULT_HVM_REGACCESS
33 #define DO_TRC_HVM_CR_WRITE64 DEFAULT_HVM_REGACCESS
34 #define DO_TRC_HVM_DR_READ DEFAULT_HVM_REGACCESS
35 #define DO_TRC_HVM_DR_WRITE DEFAULT_HVM_REGACCESS
36 #define DO_TRC_HVM_MSR_READ DEFAULT_HVM_REGACCESS
37 #define DO_TRC_HVM_MSR_WRITE DEFAULT_HVM_REGACCESS
38 #define DO_TRC_HVM_CPUID DEFAULT_HVM_MISC
39 #define DO_TRC_HVM_INTR DEFAULT_HVM_INTR
40 #define DO_TRC_HVM_NMI DEFAULT_HVM_INTR
41 #define DO_TRC_HVM_MCE DEFAULT_HVM_INTR
42 #define DO_TRC_HVM_SMI DEFAULT_HVM_INTR
43 #define DO_TRC_HVM_VMMCALL DEFAULT_HVM_MISC
44 #define DO_TRC_HVM_HLT DEFAULT_HVM_MISC
45 #define DO_TRC_HVM_INVLPG DEFAULT_HVM_MISC
46 #define DO_TRC_HVM_INVLPG64 DEFAULT_HVM_MISC
47 #define DO_TRC_HVM_IO_ASSIST DEFAULT_HVM_MISC
48 #define DO_TRC_HVM_MMIO_ASSIST DEFAULT_HVM_MISC
49 #define DO_TRC_HVM_CLTS DEFAULT_HVM_MISC
50 #define DO_TRC_HVM_LMSW DEFAULT_HVM_MISC
51 #define DO_TRC_HVM_LMSW64 DEFAULT_HVM_MISC
54 #ifdef __x86_64__
55 #define TRC_PAR_LONG(par) ((par)&0xFFFFFFFF),((par)>>32)
56 #else
57 #define TRC_PAR_LONG(par) (par)
58 #endif
60 #define HVMTRACE_ND(evt, cycles, count, d1, d2, d3, d4, d5, d6) \
61 do { \
62 if ( unlikely(tb_init_done) && DO_TRC_HVM_ ## evt ) \
63 { \
64 struct { \
65 u32 d[6]; \
66 } _d; \
67 _d.d[0]=(d1); \
68 _d.d[1]=(d2); \
69 _d.d[2]=(d3); \
70 _d.d[3]=(d4); \
71 _d.d[4]=(d5); \
72 _d.d[5]=(d6); \
73 __trace_var(TRC_HVM_ ## evt, cycles, \
74 sizeof(u32)*count+1, (unsigned char *)&_d); \
75 } \
76 } while(0)
78 #define HVMTRACE_6D(evt, d1, d2, d3, d4, d5, d6) \
79 HVMTRACE_ND(evt, 0, 6, d1, d2, d3, d4, d5, d6)
80 #define HVMTRACE_5D(evt, d1, d2, d3, d4, d5) \
81 HVMTRACE_ND(evt, 0, 5, d1, d2, d3, d4, d5, 0)
82 #define HVMTRACE_4D(evt, d1, d2, d3, d4) \
83 HVMTRACE_ND(evt, 0, 4, d1, d2, d3, d4, 0, 0)
84 #define HVMTRACE_3D(evt, d1, d2, d3) \
85 HVMTRACE_ND(evt, 0, 3, d1, d2, d3, 0, 0, 0)
86 #define HVMTRACE_2D(evt, d1, d2) \
87 HVMTRACE_ND(evt, 0, 2, d1, d2, 0, 0, 0, 0)
88 #define HVMTRACE_1D(evt, d1) \
89 HVMTRACE_ND(evt, 0, 1, d1, 0, 0, 0, 0, 0)
90 #define HVMTRACE_0D(evt) \
91 HVMTRACE_ND(evt, 0, 0, 0, 0, 0, 0, 0, 0)
95 #ifdef __x86_64__
96 #define HVMTRACE_LONG_1D(evt, d1) \
97 HVMTRACE_2D(evt ## 64, (d1) & 0xFFFFFFFF, (d1) >> 32)
98 #define HVMTRACE_LONG_2D(evt, d1, d2, ...) \
99 HVMTRACE_3D(evt ## 64, d1, d2)
100 #define HVMTRACE_LONG_3D(evt, d1, d2, d3, ...) \
101 HVMTRACE_4D(evt ## 64, d1, d2, d3)
102 #define HVMTRACE_LONG_4D(evt, d1, d2, d3, d4, ...) \
103 HVMTRACE_5D(evt ## 64, d1, d2, d3, d4)
104 #else
105 #define HVMTRACE_LONG_1D HVMTRACE_1D
106 #define HVMTRACE_LONG_2D HVMTRACE_2D
107 #define HVMTRACE_LONG_3D HVMTRACE_3D
108 #define HVMTRACE_LONG_4D HVMTRACE_4D
109 #endif
111 #endif /* __ASM_X86_HVM_TRACE_H__ */
113 /*
114 * Local variables:
115 * mode: C
116 * c-set-style: "BSD"
117 * c-basic-offset: 4
118 * tab-width: 4
119 * indent-tabs-mode: nil
120 * End:
121 */