1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
5 #include <linux/tracepoint.h>
8 #define TRACE_SYSTEM kvm
11 * Tracepoint for guest mode entry.
13 TRACE_EVENT(kvm_ppc_instr,
14 TP_PROTO(unsigned int inst, unsigned long _pc, unsigned int emulate),
15 TP_ARGS(inst, _pc, emulate),
18 __field( unsigned int, inst )
19 __field( unsigned long, pc )
20 __field( unsigned int, emulate )
26 __entry->emulate = emulate;
29 TP_printk("inst %u pc 0x%lx emulate %u\n",
30 __entry->inst, __entry->pc, __entry->emulate)
33 TRACE_EVENT(kvm_stlb_inval,
34 TP_PROTO(unsigned int stlb_index),
38 __field( unsigned int, stlb_index )
42 __entry->stlb_index = stlb_index;
45 TP_printk("stlb_index %u", __entry->stlb_index)
48 TRACE_EVENT(kvm_stlb_write,
49 TP_PROTO(unsigned int victim, unsigned int tid, unsigned int word0,
50 unsigned int word1, unsigned int word2),
51 TP_ARGS(victim, tid, word0, word1, word2),
54 __field( unsigned int, victim )
55 __field( unsigned int, tid )
56 __field( unsigned int, word0 )
57 __field( unsigned int, word1 )
58 __field( unsigned int, word2 )
62 __entry->victim = victim;
64 __entry->word0 = word0;
65 __entry->word1 = word1;
66 __entry->word2 = word2;
69 TP_printk("victim %u tid %u w0 %u w1 %u w2 %u",
70 __entry->victim, __entry->tid, __entry->word0,
71 __entry->word1, __entry->word2)
74 TRACE_EVENT(kvm_gtlb_write,
75 TP_PROTO(unsigned int gtlb_index, unsigned int tid, unsigned int word0,
76 unsigned int word1, unsigned int word2),
77 TP_ARGS(gtlb_index, tid, word0, word1, word2),
80 __field( unsigned int, gtlb_index )
81 __field( unsigned int, tid )
82 __field( unsigned int, word0 )
83 __field( unsigned int, word1 )
84 __field( unsigned int, word2 )
88 __entry->gtlb_index = gtlb_index;
90 __entry->word0 = word0;
91 __entry->word1 = word1;
92 __entry->word2 = word2;
95 TP_printk("gtlb_index %u tid %u w0 %u w1 %u w2 %u",
96 __entry->gtlb_index, __entry->tid, __entry->word0,
97 __entry->word1, __entry->word2)
100 TRACE_EVENT(kvm_check_requests,
101 TP_PROTO(struct kvm_vcpu *vcpu),
105 __field( __u32, cpu_nr )
106 __field( __u32, requests )
110 __entry->cpu_nr = vcpu->vcpu_id;
111 __entry->requests = vcpu->requests;
114 TP_printk("vcpu=%x requests=%x",
115 __entry->cpu_nr, __entry->requests)
118 #endif /* _TRACE_KVM_H */
120 /* This part must be outside protection */
121 #undef TRACE_INCLUDE_PATH
122 #undef TRACE_INCLUDE_FILE
124 #define TRACE_INCLUDE_PATH .
125 #define TRACE_INCLUDE_FILE trace
127 #include <trace/define_trace.h>