1 #if !defined(_TRACE_KVMS390_H) || defined(TRACE_HEADER_MULTI_READ)
2 #define _TRACE_KVMS390_H
4 #include <linux/tracepoint.h>
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),
20 __field(unsigned long, 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),
40 __field(unsigned int, id)
41 __field(struct kvm_vcpu *, vcpu)
42 __field(struct kvm_s390_sie_block *, sie_block)
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),
60 __field(unsigned int, id)
67 TP_printk("destroy cpu %d", __entry->id)
71 * Trace point for start and stop of vpcus.
73 TRACE_EVENT(kvm_s390_vcpu_start_stop,
74 TP_PROTO(unsigned int id, int state),
78 __field(unsigned int, id)
84 __entry->state = state;
87 TP_printk("%s cpu %d", __entry->state ? "starting" : "stopping",
92 * Trace points for injection of interrupts, either per machine or
96 #define kvm_s390_int_type \
97 {KVM_S390_SIGP_STOP, "sigp stop"}, \
98 {KVM_S390_PROGRAM_INT, "program interrupt"}, \
99 {KVM_S390_SIGP_SET_PREFIX, "sigp set prefix"}, \
100 {KVM_S390_RESTART, "sigp restart"}, \
101 {KVM_S390_INT_VIRTIO, "virtio interrupt"}, \
102 {KVM_S390_INT_SERVICE, "sclp interrupt"}, \
103 {KVM_S390_INT_EMERGENCY, "sigp emergency"}, \
104 {KVM_S390_INT_EXTERNAL_CALL, "sigp ext call"}
106 TRACE_EVENT(kvm_s390_inject_vm,
107 TP_PROTO(__u64 type, __u32 parm, __u64 parm64, int who),
108 TP_ARGS(type, parm, parm64, who),
111 __field(__u32, inttype)
113 __field(__u64, parm64)
118 __entry->inttype = type & 0x00000000ffffffff;
119 __entry->parm = parm;
120 __entry->parm64 = parm64;
124 TP_printk("inject%s: type:%x (%s) parm:%x parm64:%llx",
125 (__entry->who == 1) ? " (from kernel)" :
126 (__entry->who == 2) ? " (from user)" : "",
128 __print_symbolic(__entry->inttype, kvm_s390_int_type),
129 __entry->parm, __entry->parm64)
132 TRACE_EVENT(kvm_s390_inject_vcpu,
133 TP_PROTO(unsigned int id, __u64 type, __u32 parm, __u64 parm64, \
135 TP_ARGS(id, type, parm, parm64, who),
139 __field(__u32, inttype)
141 __field(__u64, parm64)
147 __entry->inttype = type & 0x00000000ffffffff;
148 __entry->parm = parm;
149 __entry->parm64 = parm64;
153 TP_printk("inject%s (vcpu %d): type:%x (%s) parm:%x parm64:%llx",
154 (__entry->who == 1) ? " (from kernel)" :
155 (__entry->who == 2) ? " (from user)" : "",
156 __entry->id, __entry->inttype,
157 __print_symbolic(__entry->inttype, kvm_s390_int_type),
158 __entry->parm, __entry->parm64)
162 * Trace point for the actual delivery of interrupts.
164 TRACE_EVENT(kvm_s390_deliver_interrupt,
165 TP_PROTO(unsigned int id, __u64 type, __u64 data0, __u64 data1),
166 TP_ARGS(id, type, data0, data1),
170 __field(__u32, inttype)
171 __field(__u64, data0)
172 __field(__u64, data1)
177 __entry->inttype = type & 0x00000000ffffffff;
178 __entry->data0 = data0;
179 __entry->data1 = data1;
182 TP_printk("deliver interrupt (vcpu %d): type:%x (%s) " \
183 "data:%08llx %016llx",
184 __entry->id, __entry->inttype,
185 __print_symbolic(__entry->inttype, kvm_s390_int_type),
186 __entry->data0, __entry->data1)
190 * Trace point for resets that may be requested from userspace.
192 TRACE_EVENT(kvm_s390_request_resets,
193 TP_PROTO(__u64 resets),
197 __field(__u64, resets)
201 __entry->resets = resets;
204 TP_printk("requesting userspace resets %llx",
209 * Trace point for a vcpu's stop requests.
211 TRACE_EVENT(kvm_s390_stop_request,
212 TP_PROTO(unsigned int action_bits),
213 TP_ARGS(action_bits),
216 __field(unsigned int, action_bits)
220 __entry->action_bits = action_bits;
223 TP_printk("stop request, action_bits = %08x",
224 __entry->action_bits)
229 * Trace point for enabling channel I/O instruction support.
231 TRACE_EVENT(kvm_s390_enable_css,
243 TP_printk("enabling channel I/O support (kvm @ %p)\n",
248 #endif /* _TRACE_KVMS390_H */
250 /* This part must be outside protection */
251 #include <trace/define_trace.h>