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 points for injection of interrupts, either per machine or
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
),
90 __field(__u32
, inttype
)
92 __field(__u64
, parm64
)
97 __entry
->inttype
= type
& 0x00000000ffffffff;
99 __entry
->parm64
= parm64
;
103 TP_printk("inject%s: type:%x (%s) parm:%x parm64:%llx",
104 (__entry
->who
== 1) ? " (from kernel)" :
105 (__entry
->who
== 2) ? " (from user)" : "",
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
, \
114 TP_ARGS(id
, type
, parm
, parm64
, who
),
118 __field(__u32
, inttype
)
120 __field(__u64
, parm64
)
126 __entry
->inttype
= type
& 0x00000000ffffffff;
127 __entry
->parm
= parm
;
128 __entry
->parm64
= parm64
;
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
),
149 __field(__u32
, inttype
)
150 __field(__u64
, data0
)
151 __field(__u64
, data1
)
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
),
176 __field(__u64
, resets
)
180 __entry
->resets
= resets
;
183 TP_printk("requesting userspace resets %llx",
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
),
195 __field(unsigned int, action_bits
)
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
,
222 TP_printk("enabling channel I/O support (kvm @ %p)\n",
227 #endif /* _TRACE_KVMS390_H */
229 /* This part must be outside protection */
230 #include <trace/define_trace.h>