Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / powerpc / kvm / trace.h
blob491b0f715d6bc2c345850645f2dbcd4700f6f182
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
3 #define _TRACE_KVM_H
5 #include <linux/tracepoint.h>
7 #undef TRACE_SYSTEM
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),
19 TP_STRUCT__entry(
20 __field( unsigned int, inst )
21 __field( unsigned long, pc )
22 __field( unsigned int, emulate )
25 TP_fast_assign(
26 __entry->inst = inst;
27 __entry->pc = _pc;
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),
37 TP_ARGS(stlb_index),
39 TP_STRUCT__entry(
40 __field( unsigned int, stlb_index )
43 TP_fast_assign(
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),
55 TP_STRUCT__entry(
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 )
63 TP_fast_assign(
64 __entry->victim = victim;
65 __entry->tid = tid;
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),
81 TP_STRUCT__entry(
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 )
89 TP_fast_assign(
90 __entry->gtlb_index = gtlb_index;
91 __entry->tid = tid;
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),
104 TP_ARGS(vcpu),
106 TP_STRUCT__entry(
107 __field( __u32, cpu_nr )
108 __field( __u32, requests )
111 TP_fast_assign(
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>