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
9 #define TRACE_INCLUDE_PATH .
10 #define TRACE_INCLUDE_FILE trace
13 * Tracepoint for guest mode entry.
15 TRACE_EVENT(kvm_ppc_instr
,
16 TP_PROTO(unsigned int inst
, unsigned long _pc
, unsigned int emulate
),
17 TP_ARGS(inst
, _pc
, emulate
),
20 __field( unsigned int, inst
)
21 __field( unsigned long, pc
)
22 __field( unsigned int, emulate
)
28 __entry
->emulate
= emulate
;
31 TP_printk("inst %u pc 0x%lx emulate %u\n",
32 __entry
->inst
, __entry
->pc
, __entry
->emulate
)
35 TRACE_EVENT(kvm_stlb_inval
,
36 TP_PROTO(unsigned int stlb_index
),
40 __field( unsigned int, stlb_index
)
44 __entry
->stlb_index
= stlb_index
;
47 TP_printk("stlb_index %u", __entry
->stlb_index
)
50 TRACE_EVENT(kvm_stlb_write
,
51 TP_PROTO(unsigned int victim
, unsigned int tid
, unsigned int word0
,
52 unsigned int word1
, unsigned int word2
),
53 TP_ARGS(victim
, tid
, word0
, word1
, word2
),
56 __field( unsigned int, victim
)
57 __field( unsigned int, tid
)
58 __field( unsigned int, word0
)
59 __field( unsigned int, word1
)
60 __field( unsigned int, word2
)
64 __entry
->victim
= victim
;
66 __entry
->word0
= word0
;
67 __entry
->word1
= word1
;
68 __entry
->word2
= word2
;
71 TP_printk("victim %u tid %u w0 %u w1 %u w2 %u",
72 __entry
->victim
, __entry
->tid
, __entry
->word0
,
73 __entry
->word1
, __entry
->word2
)
76 TRACE_EVENT(kvm_gtlb_write
,
77 TP_PROTO(unsigned int gtlb_index
, unsigned int tid
, unsigned int word0
,
78 unsigned int word1
, unsigned int word2
),
79 TP_ARGS(gtlb_index
, tid
, word0
, word1
, word2
),
82 __field( unsigned int, gtlb_index
)
83 __field( unsigned int, tid
)
84 __field( unsigned int, word0
)
85 __field( unsigned int, word1
)
86 __field( unsigned int, word2
)
90 __entry
->gtlb_index
= gtlb_index
;
92 __entry
->word0
= word0
;
93 __entry
->word1
= word1
;
94 __entry
->word2
= word2
;
97 TP_printk("gtlb_index %u tid %u w0 %u w1 %u w2 %u",
98 __entry
->gtlb_index
, __entry
->tid
, __entry
->word0
,
99 __entry
->word1
, __entry
->word2
)
102 TRACE_EVENT(kvm_check_requests
,
103 TP_PROTO(struct kvm_vcpu
*vcpu
),
107 __field( __u32
, cpu_nr
)
108 __field( __u32
, requests
)
112 __entry
->cpu_nr
= vcpu
->vcpu_id
;
113 __entry
->requests
= vcpu
->requests
;
116 TP_printk("vcpu=%x requests=%x",
117 __entry
->cpu_nr
, __entry
->requests
)
120 #endif /* _TRACE_KVM_H */
122 /* This part must be outside protection */
123 #include <trace/define_trace.h>