x86/xen: resume timer irqs early
[linux/fpc-iii.git] / arch / arm / kvm / trace.h
blobb1d640f78623971337ad08072efdcc981c124c0f
1 #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
2 #define _TRACE_KVM_H
4 #include <linux/tracepoint.h>
6 #undef TRACE_SYSTEM
7 #define TRACE_SYSTEM kvm
9 /*
10 * Tracepoints for entry/exit to guest
12 TRACE_EVENT(kvm_entry,
13 TP_PROTO(unsigned long vcpu_pc),
14 TP_ARGS(vcpu_pc),
16 TP_STRUCT__entry(
17 __field( unsigned long, vcpu_pc )
20 TP_fast_assign(
21 __entry->vcpu_pc = vcpu_pc;
24 TP_printk("PC: 0x%08lx", __entry->vcpu_pc)
27 TRACE_EVENT(kvm_exit,
28 TP_PROTO(unsigned long vcpu_pc),
29 TP_ARGS(vcpu_pc),
31 TP_STRUCT__entry(
32 __field( unsigned long, vcpu_pc )
35 TP_fast_assign(
36 __entry->vcpu_pc = vcpu_pc;
39 TP_printk("PC: 0x%08lx", __entry->vcpu_pc)
42 TRACE_EVENT(kvm_guest_fault,
43 TP_PROTO(unsigned long vcpu_pc, unsigned long hsr,
44 unsigned long hxfar,
45 unsigned long long ipa),
46 TP_ARGS(vcpu_pc, hsr, hxfar, ipa),
48 TP_STRUCT__entry(
49 __field( unsigned long, vcpu_pc )
50 __field( unsigned long, hsr )
51 __field( unsigned long, hxfar )
52 __field( unsigned long long, ipa )
55 TP_fast_assign(
56 __entry->vcpu_pc = vcpu_pc;
57 __entry->hsr = hsr;
58 __entry->hxfar = hxfar;
59 __entry->ipa = ipa;
62 TP_printk("ipa %#llx, hsr %#08lx, hxfar %#08lx, pc %#08lx",
63 __entry->ipa, __entry->hsr,
64 __entry->hxfar, __entry->vcpu_pc)
67 TRACE_EVENT(kvm_irq_line,
68 TP_PROTO(unsigned int type, int vcpu_idx, int irq_num, int level),
69 TP_ARGS(type, vcpu_idx, irq_num, level),
71 TP_STRUCT__entry(
72 __field( unsigned int, type )
73 __field( int, vcpu_idx )
74 __field( int, irq_num )
75 __field( int, level )
78 TP_fast_assign(
79 __entry->type = type;
80 __entry->vcpu_idx = vcpu_idx;
81 __entry->irq_num = irq_num;
82 __entry->level = level;
85 TP_printk("Inject %s interrupt (%d), vcpu->idx: %d, num: %d, level: %d",
86 (__entry->type == KVM_ARM_IRQ_TYPE_CPU) ? "CPU" :
87 (__entry->type == KVM_ARM_IRQ_TYPE_PPI) ? "VGIC PPI" :
88 (__entry->type == KVM_ARM_IRQ_TYPE_SPI) ? "VGIC SPI" : "UNKNOWN",
89 __entry->type, __entry->vcpu_idx, __entry->irq_num, __entry->level)
92 TRACE_EVENT(kvm_mmio_emulate,
93 TP_PROTO(unsigned long vcpu_pc, unsigned long instr,
94 unsigned long cpsr),
95 TP_ARGS(vcpu_pc, instr, cpsr),
97 TP_STRUCT__entry(
98 __field( unsigned long, vcpu_pc )
99 __field( unsigned long, instr )
100 __field( unsigned long, cpsr )
103 TP_fast_assign(
104 __entry->vcpu_pc = vcpu_pc;
105 __entry->instr = instr;
106 __entry->cpsr = cpsr;
109 TP_printk("Emulate MMIO at: 0x%08lx (instr: %08lx, cpsr: %08lx)",
110 __entry->vcpu_pc, __entry->instr, __entry->cpsr)
113 /* Architecturally implementation defined CP15 register access */
114 TRACE_EVENT(kvm_emulate_cp15_imp,
115 TP_PROTO(unsigned long Op1, unsigned long Rt1, unsigned long CRn,
116 unsigned long CRm, unsigned long Op2, bool is_write),
117 TP_ARGS(Op1, Rt1, CRn, CRm, Op2, is_write),
119 TP_STRUCT__entry(
120 __field( unsigned int, Op1 )
121 __field( unsigned int, Rt1 )
122 __field( unsigned int, CRn )
123 __field( unsigned int, CRm )
124 __field( unsigned int, Op2 )
125 __field( bool, is_write )
128 TP_fast_assign(
129 __entry->is_write = is_write;
130 __entry->Op1 = Op1;
131 __entry->Rt1 = Rt1;
132 __entry->CRn = CRn;
133 __entry->CRm = CRm;
134 __entry->Op2 = Op2;
137 TP_printk("Implementation defined CP15: %s\tp15, %u, r%u, c%u, c%u, %u",
138 (__entry->is_write) ? "mcr" : "mrc",
139 __entry->Op1, __entry->Rt1, __entry->CRn,
140 __entry->CRm, __entry->Op2)
143 TRACE_EVENT(kvm_wfi,
144 TP_PROTO(unsigned long vcpu_pc),
145 TP_ARGS(vcpu_pc),
147 TP_STRUCT__entry(
148 __field( unsigned long, vcpu_pc )
151 TP_fast_assign(
152 __entry->vcpu_pc = vcpu_pc;
155 TP_printk("guest executed wfi at: 0x%08lx", __entry->vcpu_pc)
158 TRACE_EVENT(kvm_unmap_hva,
159 TP_PROTO(unsigned long hva),
160 TP_ARGS(hva),
162 TP_STRUCT__entry(
163 __field( unsigned long, hva )
166 TP_fast_assign(
167 __entry->hva = hva;
170 TP_printk("mmu notifier unmap hva: %#08lx", __entry->hva)
173 TRACE_EVENT(kvm_unmap_hva_range,
174 TP_PROTO(unsigned long start, unsigned long end),
175 TP_ARGS(start, end),
177 TP_STRUCT__entry(
178 __field( unsigned long, start )
179 __field( unsigned long, end )
182 TP_fast_assign(
183 __entry->start = start;
184 __entry->end = end;
187 TP_printk("mmu notifier unmap range: %#08lx -- %#08lx",
188 __entry->start, __entry->end)
191 TRACE_EVENT(kvm_set_spte_hva,
192 TP_PROTO(unsigned long hva),
193 TP_ARGS(hva),
195 TP_STRUCT__entry(
196 __field( unsigned long, hva )
199 TP_fast_assign(
200 __entry->hva = hva;
203 TP_printk("mmu notifier set pte hva: %#08lx", __entry->hva)
206 TRACE_EVENT(kvm_hvc,
207 TP_PROTO(unsigned long vcpu_pc, unsigned long r0, unsigned long imm),
208 TP_ARGS(vcpu_pc, r0, imm),
210 TP_STRUCT__entry(
211 __field( unsigned long, vcpu_pc )
212 __field( unsigned long, r0 )
213 __field( unsigned long, imm )
216 TP_fast_assign(
217 __entry->vcpu_pc = vcpu_pc;
218 __entry->r0 = r0;
219 __entry->imm = imm;
222 TP_printk("HVC at 0x%08lx (r0: 0x%08lx, imm: 0x%lx",
223 __entry->vcpu_pc, __entry->r0, __entry->imm)
226 #endif /* _TRACE_KVM_H */
228 #undef TRACE_INCLUDE_PATH
229 #define TRACE_INCLUDE_PATH arch/arm/kvm
230 #undef TRACE_INCLUDE_FILE
231 #define TRACE_INCLUDE_FILE trace
233 /* This part must be outside protection */
234 #include <trace/define_trace.h>