fs/reiserfs/journal.c: change return type of dirty_one_transaction
[linux/fpc-iii.git] / arch / s390 / kvm / trace-s390.h
blob6f0209d45164f0a6793288a883742f6b52f037d2
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(_TRACE_KVMS390_H) || defined(TRACE_HEADER_MULTI_READ)
3 #define _TRACE_KVMS390_H
5 #include <linux/tracepoint.h>
7 #undef TRACE_SYSTEM
8 #define TRACE_SYSTEM kvm-s390
9 #define TRACE_INCLUDE_PATH .
10 #undef TRACE_INCLUDE_FILE
11 #define TRACE_INCLUDE_FILE trace-s390
14 * The TRACE_SYSTEM_VAR defaults to TRACE_SYSTEM, but must be a
15 * legitimate C variable. It is not exported to user space.
17 #undef TRACE_SYSTEM_VAR
18 #define TRACE_SYSTEM_VAR kvm_s390
21 * Trace point for the creation of the kvm instance.
23 TRACE_EVENT(kvm_s390_create_vm,
24 TP_PROTO(unsigned long type),
25 TP_ARGS(type),
27 TP_STRUCT__entry(
28 __field(unsigned long, type)
31 TP_fast_assign(
32 __entry->type = type;
35 TP_printk("create vm%s",
36 __entry->type & KVM_VM_S390_UCONTROL ? " (UCONTROL)" : "")
40 * Trace points for creation and destruction of vpcus.
42 TRACE_EVENT(kvm_s390_create_vcpu,
43 TP_PROTO(unsigned int id, struct kvm_vcpu *vcpu,
44 struct kvm_s390_sie_block *sie_block),
45 TP_ARGS(id, vcpu, sie_block),
47 TP_STRUCT__entry(
48 __field(unsigned int, id)
49 __field(struct kvm_vcpu *, vcpu)
50 __field(struct kvm_s390_sie_block *, sie_block)
53 TP_fast_assign(
54 __entry->id = id;
55 __entry->vcpu = vcpu;
56 __entry->sie_block = sie_block;
59 TP_printk("create cpu %d at 0x%pK, sie block at 0x%pK",
60 __entry->id, __entry->vcpu, __entry->sie_block)
63 TRACE_EVENT(kvm_s390_destroy_vcpu,
64 TP_PROTO(unsigned int id),
65 TP_ARGS(id),
67 TP_STRUCT__entry(
68 __field(unsigned int, id)
71 TP_fast_assign(
72 __entry->id = id;
75 TP_printk("destroy cpu %d", __entry->id)
79 * Trace point for start and stop of vpcus.
81 TRACE_EVENT(kvm_s390_vcpu_start_stop,
82 TP_PROTO(unsigned int id, int state),
83 TP_ARGS(id, state),
85 TP_STRUCT__entry(
86 __field(unsigned int, id)
87 __field(int, state)
90 TP_fast_assign(
91 __entry->id = id;
92 __entry->state = state;
95 TP_printk("%s cpu %d", __entry->state ? "starting" : "stopping",
96 __entry->id)
100 * Trace points for injection of interrupts, either per machine or
101 * per vcpu.
104 #define kvm_s390_int_type \
105 {KVM_S390_SIGP_STOP, "sigp stop"}, \
106 {KVM_S390_PROGRAM_INT, "program interrupt"}, \
107 {KVM_S390_SIGP_SET_PREFIX, "sigp set prefix"}, \
108 {KVM_S390_RESTART, "sigp restart"}, \
109 {KVM_S390_INT_PFAULT_INIT, "pfault init"}, \
110 {KVM_S390_INT_PFAULT_DONE, "pfault done"}, \
111 {KVM_S390_MCHK, "machine check"}, \
112 {KVM_S390_INT_CLOCK_COMP, "clock comparator"}, \
113 {KVM_S390_INT_CPU_TIMER, "cpu timer"}, \
114 {KVM_S390_INT_VIRTIO, "virtio interrupt"}, \
115 {KVM_S390_INT_SERVICE, "sclp interrupt"}, \
116 {KVM_S390_INT_EMERGENCY, "sigp emergency"}, \
117 {KVM_S390_INT_EXTERNAL_CALL, "sigp ext call"}
119 #define get_irq_name(__type) \
120 (__type > KVM_S390_INT_IO_MAX ? \
121 __print_symbolic(__type, kvm_s390_int_type) : \
122 (__type & KVM_S390_INT_IO_AI_MASK ? \
123 "adapter I/O interrupt" : "subchannel I/O interrupt"))
125 TRACE_EVENT(kvm_s390_inject_vm,
126 TP_PROTO(__u64 type, __u32 parm, __u64 parm64, int who),
127 TP_ARGS(type, parm, parm64, who),
129 TP_STRUCT__entry(
130 __field(__u32, inttype)
131 __field(__u32, parm)
132 __field(__u64, parm64)
133 __field(int, who)
136 TP_fast_assign(
137 __entry->inttype = type & 0x00000000ffffffff;
138 __entry->parm = parm;
139 __entry->parm64 = parm64;
140 __entry->who = who;
143 TP_printk("inject%s: type:%x (%s) parm:%x parm64:%llx",
144 (__entry->who == 1) ? " (from kernel)" :
145 (__entry->who == 2) ? " (from user)" : "",
146 __entry->inttype, get_irq_name(__entry->inttype),
147 __entry->parm, __entry->parm64)
150 TRACE_EVENT(kvm_s390_inject_vcpu,
151 TP_PROTO(unsigned int id, __u64 type, __u32 parm, __u64 parm64),
152 TP_ARGS(id, type, parm, parm64),
154 TP_STRUCT__entry(
155 __field(int, id)
156 __field(__u32, inttype)
157 __field(__u32, parm)
158 __field(__u64, parm64)
161 TP_fast_assign(
162 __entry->id = id;
163 __entry->inttype = type & 0x00000000ffffffff;
164 __entry->parm = parm;
165 __entry->parm64 = parm64;
168 TP_printk("inject (vcpu %d): type:%x (%s) parm:%x parm64:%llx",
169 __entry->id, __entry->inttype,
170 get_irq_name(__entry->inttype), __entry->parm,
171 __entry->parm64)
175 * Trace point for the actual delivery of interrupts.
177 TRACE_EVENT(kvm_s390_deliver_interrupt,
178 TP_PROTO(unsigned int id, __u64 type, __u64 data0, __u64 data1),
179 TP_ARGS(id, type, data0, data1),
181 TP_STRUCT__entry(
182 __field(int, id)
183 __field(__u32, inttype)
184 __field(__u64, data0)
185 __field(__u64, data1)
188 TP_fast_assign(
189 __entry->id = id;
190 __entry->inttype = type & 0x00000000ffffffff;
191 __entry->data0 = data0;
192 __entry->data1 = data1;
195 TP_printk("deliver interrupt (vcpu %d): type:%x (%s) " \
196 "data:%08llx %016llx",
197 __entry->id, __entry->inttype,
198 get_irq_name(__entry->inttype), __entry->data0,
199 __entry->data1)
203 * Trace point for resets that may be requested from userspace.
205 TRACE_EVENT(kvm_s390_request_resets,
206 TP_PROTO(__u64 resets),
207 TP_ARGS(resets),
209 TP_STRUCT__entry(
210 __field(__u64, resets)
213 TP_fast_assign(
214 __entry->resets = resets;
217 TP_printk("requesting userspace resets %llx",
218 __entry->resets)
222 * Trace point for a vcpu's stop requests.
224 TRACE_EVENT(kvm_s390_stop_request,
225 TP_PROTO(unsigned char stop_irq, unsigned char flags),
226 TP_ARGS(stop_irq, flags),
228 TP_STRUCT__entry(
229 __field(unsigned char, stop_irq)
230 __field(unsigned char, flags)
233 TP_fast_assign(
234 __entry->stop_irq = stop_irq;
235 __entry->flags = flags;
238 TP_printk("stop request, stop irq = %u, flags = %08x",
239 __entry->stop_irq, __entry->flags)
244 * Trace point for enabling channel I/O instruction support.
246 TRACE_EVENT(kvm_s390_enable_css,
247 TP_PROTO(void *kvm),
248 TP_ARGS(kvm),
250 TP_STRUCT__entry(
251 __field(void *, kvm)
254 TP_fast_assign(
255 __entry->kvm = kvm;
258 TP_printk("enabling channel I/O support (kvm @ %pK)\n",
259 __entry->kvm)
263 * Trace point for enabling and disabling interlocking-and-broadcasting
264 * suppression.
266 TRACE_EVENT(kvm_s390_enable_disable_ibs,
267 TP_PROTO(unsigned int id, int state),
268 TP_ARGS(id, state),
270 TP_STRUCT__entry(
271 __field(unsigned int, id)
272 __field(int, state)
275 TP_fast_assign(
276 __entry->id = id;
277 __entry->state = state;
280 TP_printk("%s ibs on cpu %d",
281 __entry->state ? "enabling" : "disabling", __entry->id)
285 * Trace point for modifying ais mode for a given isc.
287 TRACE_EVENT(kvm_s390_modify_ais_mode,
288 TP_PROTO(__u8 isc, __u16 from, __u16 to),
289 TP_ARGS(isc, from, to),
291 TP_STRUCT__entry(
292 __field(__u8, isc)
293 __field(__u16, from)
294 __field(__u16, to)
297 TP_fast_assign(
298 __entry->isc = isc;
299 __entry->from = from;
300 __entry->to = to;
303 TP_printk("for isc %x, modifying interruption mode from %s to %s",
304 __entry->isc,
305 (__entry->from == KVM_S390_AIS_MODE_ALL) ?
306 "ALL-Interruptions Mode" :
307 (__entry->from == KVM_S390_AIS_MODE_SINGLE) ?
308 "Single-Interruption Mode" : "No-Interruptions Mode",
309 (__entry->to == KVM_S390_AIS_MODE_ALL) ?
310 "ALL-Interruptions Mode" :
311 (__entry->to == KVM_S390_AIS_MODE_SINGLE) ?
312 "Single-Interruption Mode" : "No-Interruptions Mode")
316 * Trace point for suppressed adapter I/O interrupt.
318 TRACE_EVENT(kvm_s390_airq_suppressed,
319 TP_PROTO(__u32 id, __u8 isc),
320 TP_ARGS(id, isc),
322 TP_STRUCT__entry(
323 __field(__u32, id)
324 __field(__u8, isc)
327 TP_fast_assign(
328 __entry->id = id;
329 __entry->isc = isc;
332 TP_printk("adapter I/O interrupt suppressed (id:%x isc:%x)",
333 __entry->id, __entry->isc)
337 #endif /* _TRACE_KVMS390_H */
339 /* This part must be outside protection */
340 #include <trace/define_trace.h>