Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux/fpc-iii.git] / arch / s390 / kvm / trace-s390.h
blob13f30f58a2df7d94ba8f91d8113f49c8d7938d27
1 #if !defined(_TRACE_KVMS390_H) || defined(TRACE_HEADER_MULTI_READ)
2 #define _TRACE_KVMS390_H
4 #include <linux/tracepoint.h>
6 #undef TRACE_SYSTEM
7 #define TRACE_SYSTEM kvm-s390
8 #define TRACE_INCLUDE_PATH .
9 #undef TRACE_INCLUDE_FILE
10 #define TRACE_INCLUDE_FILE trace-s390
13 * Trace point for the creation of the kvm instance.
15 TRACE_EVENT(kvm_s390_create_vm,
16 TP_PROTO(unsigned long type),
17 TP_ARGS(type),
19 TP_STRUCT__entry(
20 __field(unsigned long, type)
23 TP_fast_assign(
24 __entry->type = type;
27 TP_printk("create vm%s",
28 __entry->type & KVM_VM_S390_UCONTROL ? " (UCONTROL)" : "")
32 * Trace points for creation and destruction of vpcus.
34 TRACE_EVENT(kvm_s390_create_vcpu,
35 TP_PROTO(unsigned int id, struct kvm_vcpu *vcpu,
36 struct kvm_s390_sie_block *sie_block),
37 TP_ARGS(id, vcpu, sie_block),
39 TP_STRUCT__entry(
40 __field(unsigned int, id)
41 __field(struct kvm_vcpu *, vcpu)
42 __field(struct kvm_s390_sie_block *, sie_block)
45 TP_fast_assign(
46 __entry->id = id;
47 __entry->vcpu = vcpu;
48 __entry->sie_block = sie_block;
51 TP_printk("create cpu %d at %p, sie block at %p", __entry->id,
52 __entry->vcpu, __entry->sie_block)
55 TRACE_EVENT(kvm_s390_destroy_vcpu,
56 TP_PROTO(unsigned int id),
57 TP_ARGS(id),
59 TP_STRUCT__entry(
60 __field(unsigned int, id)
63 TP_fast_assign(
64 __entry->id = id;
67 TP_printk("destroy cpu %d", __entry->id)
71 * Trace points for injection of interrupts, either per machine or
72 * per vcpu.
75 #define kvm_s390_int_type \
76 {KVM_S390_SIGP_STOP, "sigp stop"}, \
77 {KVM_S390_PROGRAM_INT, "program interrupt"}, \
78 {KVM_S390_SIGP_SET_PREFIX, "sigp set prefix"}, \
79 {KVM_S390_RESTART, "sigp restart"}, \
80 {KVM_S390_INT_VIRTIO, "virtio interrupt"}, \
81 {KVM_S390_INT_SERVICE, "sclp interrupt"}, \
82 {KVM_S390_INT_EMERGENCY, "sigp emergency"}, \
83 {KVM_S390_INT_EXTERNAL_CALL, "sigp ext call"}
85 TRACE_EVENT(kvm_s390_inject_vm,
86 TP_PROTO(__u64 type, __u32 parm, __u64 parm64, int who),
87 TP_ARGS(type, parm, parm64, who),
89 TP_STRUCT__entry(
90 __field(__u32, inttype)
91 __field(__u32, parm)
92 __field(__u64, parm64)
93 __field(int, who)
96 TP_fast_assign(
97 __entry->inttype = type & 0x00000000ffffffff;
98 __entry->parm = parm;
99 __entry->parm64 = parm64;
100 __entry->who = who;
103 TP_printk("inject%s: type:%x (%s) parm:%x parm64:%llx",
104 (__entry->who == 1) ? " (from kernel)" :
105 (__entry->who == 2) ? " (from user)" : "",
106 __entry->inttype,
107 __print_symbolic(__entry->inttype, kvm_s390_int_type),
108 __entry->parm, __entry->parm64)
111 TRACE_EVENT(kvm_s390_inject_vcpu,
112 TP_PROTO(unsigned int id, __u64 type, __u32 parm, __u64 parm64, \
113 int who),
114 TP_ARGS(id, type, parm, parm64, who),
116 TP_STRUCT__entry(
117 __field(int, id)
118 __field(__u32, inttype)
119 __field(__u32, parm)
120 __field(__u64, parm64)
121 __field(int, who)
124 TP_fast_assign(
125 __entry->id = id;
126 __entry->inttype = type & 0x00000000ffffffff;
127 __entry->parm = parm;
128 __entry->parm64 = parm64;
129 __entry->who = who;
132 TP_printk("inject%s (vcpu %d): type:%x (%s) parm:%x parm64:%llx",
133 (__entry->who == 1) ? " (from kernel)" :
134 (__entry->who == 2) ? " (from user)" : "",
135 __entry->id, __entry->inttype,
136 __print_symbolic(__entry->inttype, kvm_s390_int_type),
137 __entry->parm, __entry->parm64)
141 * Trace point for the actual delivery of interrupts.
143 TRACE_EVENT(kvm_s390_deliver_interrupt,
144 TP_PROTO(unsigned int id, __u64 type, __u64 data0, __u64 data1),
145 TP_ARGS(id, type, data0, data1),
147 TP_STRUCT__entry(
148 __field(int, id)
149 __field(__u32, inttype)
150 __field(__u64, data0)
151 __field(__u64, data1)
154 TP_fast_assign(
155 __entry->id = id;
156 __entry->inttype = type & 0x00000000ffffffff;
157 __entry->data0 = data0;
158 __entry->data1 = data1;
161 TP_printk("deliver interrupt (vcpu %d): type:%x (%s) " \
162 "data:%08llx %016llx",
163 __entry->id, __entry->inttype,
164 __print_symbolic(__entry->inttype, kvm_s390_int_type),
165 __entry->data0, __entry->data1)
169 * Trace point for resets that may be requested from userspace.
171 TRACE_EVENT(kvm_s390_request_resets,
172 TP_PROTO(__u64 resets),
173 TP_ARGS(resets),
175 TP_STRUCT__entry(
176 __field(__u64, resets)
179 TP_fast_assign(
180 __entry->resets = resets;
183 TP_printk("requesting userspace resets %llx",
184 __entry->resets)
188 * Trace point for a vcpu's stop requests.
190 TRACE_EVENT(kvm_s390_stop_request,
191 TP_PROTO(unsigned int action_bits),
192 TP_ARGS(action_bits),
194 TP_STRUCT__entry(
195 __field(unsigned int, action_bits)
198 TP_fast_assign(
199 __entry->action_bits = action_bits;
202 TP_printk("stop request, action_bits = %08x",
203 __entry->action_bits)
208 * Trace point for enabling channel I/O instruction support.
210 TRACE_EVENT(kvm_s390_enable_css,
211 TP_PROTO(void *kvm),
212 TP_ARGS(kvm),
214 TP_STRUCT__entry(
215 __field(void *, kvm)
218 TP_fast_assign(
219 __entry->kvm = kvm;
222 TP_printk("enabling channel I/O support (kvm @ %p)\n",
223 __entry->kvm)
227 #endif /* _TRACE_KVMS390_H */
229 /* This part must be outside protection */
230 #include <trace/define_trace.h>