1 #if !defined(_TRACE_KVM_BOOKE_H) || defined(TRACE_HEADER_MULTI_READ)
2 #define _TRACE_KVM_BOOKE_H
4 #include <linux/tracepoint.h>
7 #define TRACE_SYSTEM kvm_booke
8 #define TRACE_INCLUDE_PATH .
9 #define TRACE_INCLUDE_FILE trace_booke
11 #define kvm_trace_symbol_exit \
13 {1, "MACHINE_CHECK"}, \
14 {2, "DATA_STORAGE"}, \
15 {3, "INST_STORAGE"}, \
22 {10, "DECREMENTER"}, \
28 {32, "SPE_UNAVAIL"}, \
29 {33, "SPE_FP_DATA"}, \
30 {34, "SPE_FP_ROUND"}, \
31 {35, "PERFORMANCE_MONITOR"}, \
33 {37, "DOORBELL_CRITICAL"}, \
34 {38, "GUEST_DBELL"}, \
35 {39, "GUEST_DBELL_CRIT"}, \
40 TP_PROTO(unsigned int exit_nr
, struct kvm_vcpu
*vcpu
),
41 TP_ARGS(exit_nr
, vcpu
),
44 __field( unsigned int, exit_nr
)
45 __field( unsigned long, pc
)
46 __field( unsigned long, msr
)
47 __field( unsigned long, dar
)
48 __field( unsigned long, last_inst
)
52 __entry
->exit_nr
= exit_nr
;
53 __entry
->pc
= kvmppc_get_pc(vcpu
);
54 __entry
->dar
= kvmppc_get_fault_dar(vcpu
);
55 __entry
->msr
= vcpu
->arch
.shared
->msr
;
56 __entry
->last_inst
= vcpu
->arch
.last_inst
;
65 __print_symbolic(__entry
->exit_nr
, kvm_trace_symbol_exit
),
73 TRACE_EVENT(kvm_unmap_hva
,
74 TP_PROTO(unsigned long hva
),
78 __field( unsigned long, hva
)
85 TP_printk("unmap hva 0x%lx\n", __entry
->hva
)
88 TRACE_EVENT(kvm_booke206_stlb_write
,
89 TP_PROTO(__u32 mas0
, __u32 mas8
, __u32 mas1
, __u64 mas2
, __u64 mas7_3
),
90 TP_ARGS(mas0
, mas8
, mas1
, mas2
, mas7_3
),
93 __field( __u32
, mas0
)
94 __field( __u32
, mas8
)
95 __field( __u32
, mas1
)
96 __field( __u64
, mas2
)
97 __field( __u64
, mas7_3
)
101 __entry
->mas0
= mas0
;
102 __entry
->mas8
= mas8
;
103 __entry
->mas1
= mas1
;
104 __entry
->mas2
= mas2
;
105 __entry
->mas7_3
= mas7_3
;
108 TP_printk("mas0=%x mas8=%x mas1=%x mas2=%llx mas7_3=%llx",
109 __entry
->mas0
, __entry
->mas8
, __entry
->mas1
,
110 __entry
->mas2
, __entry
->mas7_3
)
113 TRACE_EVENT(kvm_booke206_gtlb_write
,
114 TP_PROTO(__u32 mas0
, __u32 mas1
, __u64 mas2
, __u64 mas7_3
),
115 TP_ARGS(mas0
, mas1
, mas2
, mas7_3
),
118 __field( __u32
, mas0
)
119 __field( __u32
, mas1
)
120 __field( __u64
, mas2
)
121 __field( __u64
, mas7_3
)
125 __entry
->mas0
= mas0
;
126 __entry
->mas1
= mas1
;
127 __entry
->mas2
= mas2
;
128 __entry
->mas7_3
= mas7_3
;
131 TP_printk("mas0=%x mas1=%x mas2=%llx mas7_3=%llx",
132 __entry
->mas0
, __entry
->mas1
,
133 __entry
->mas2
, __entry
->mas7_3
)
136 TRACE_EVENT(kvm_booke206_ref_release
,
137 TP_PROTO(__u64 pfn
, __u32 flags
),
141 __field( __u64
, pfn
)
142 __field( __u32
, flags
)
147 __entry
->flags
= flags
;
150 TP_printk("pfn=%llx flags=%x",
151 __entry
->pfn
, __entry
->flags
)
154 #ifdef CONFIG_SPE_POSSIBLE
155 #define kvm_trace_symbol_irqprio_spe \
156 {BOOKE_IRQPRIO_SPE_UNAVAIL, "SPE_UNAVAIL"}, \
157 {BOOKE_IRQPRIO_SPE_FP_DATA, "SPE_FP_DATA"}, \
158 {BOOKE_IRQPRIO_SPE_FP_ROUND, "SPE_FP_ROUND"},
160 #define kvm_trace_symbol_irqprio_spe
163 #ifdef CONFIG_PPC_E500MC
164 #define kvm_trace_symbol_irqprio_e500mc \
165 {BOOKE_IRQPRIO_ALTIVEC_UNAVAIL, "ALTIVEC_UNAVAIL"}, \
166 {BOOKE_IRQPRIO_ALTIVEC_ASSIST, "ALTIVEC_ASSIST"},
168 #define kvm_trace_symbol_irqprio_e500mc
171 #define kvm_trace_symbol_irqprio \
172 kvm_trace_symbol_irqprio_spe \
173 kvm_trace_symbol_irqprio_e500mc \
174 {BOOKE_IRQPRIO_DATA_STORAGE, "DATA_STORAGE"}, \
175 {BOOKE_IRQPRIO_INST_STORAGE, "INST_STORAGE"}, \
176 {BOOKE_IRQPRIO_ALIGNMENT, "ALIGNMENT"}, \
177 {BOOKE_IRQPRIO_PROGRAM, "PROGRAM"}, \
178 {BOOKE_IRQPRIO_FP_UNAVAIL, "FP_UNAVAIL"}, \
179 {BOOKE_IRQPRIO_SYSCALL, "SYSCALL"}, \
180 {BOOKE_IRQPRIO_AP_UNAVAIL, "AP_UNAVAIL"}, \
181 {BOOKE_IRQPRIO_DTLB_MISS, "DTLB_MISS"}, \
182 {BOOKE_IRQPRIO_ITLB_MISS, "ITLB_MISS"}, \
183 {BOOKE_IRQPRIO_MACHINE_CHECK, "MACHINE_CHECK"}, \
184 {BOOKE_IRQPRIO_DEBUG, "DEBUG"}, \
185 {BOOKE_IRQPRIO_CRITICAL, "CRITICAL"}, \
186 {BOOKE_IRQPRIO_WATCHDOG, "WATCHDOG"}, \
187 {BOOKE_IRQPRIO_EXTERNAL, "EXTERNAL"}, \
188 {BOOKE_IRQPRIO_FIT, "FIT"}, \
189 {BOOKE_IRQPRIO_DECREMENTER, "DECREMENTER"}, \
190 {BOOKE_IRQPRIO_PERFORMANCE_MONITOR, "PERFORMANCE_MONITOR"}, \
191 {BOOKE_IRQPRIO_EXTERNAL_LEVEL, "EXTERNAL_LEVEL"}, \
192 {BOOKE_IRQPRIO_DBELL, "DBELL"}, \
193 {BOOKE_IRQPRIO_DBELL_CRIT, "DBELL_CRIT"} \
195 TRACE_EVENT(kvm_booke_queue_irqprio,
196 TP_PROTO(struct kvm_vcpu
*vcpu
, unsigned int priority
),
197 TP_ARGS(vcpu
, priority
),
200 __field( __u32
, cpu_nr
)
201 __field( __u32
, priority
)
202 __field( unsigned long, pending
)
206 __entry
->cpu_nr
= vcpu
->vcpu_id
;
207 __entry
->priority
= priority
;
208 __entry
->pending
= vcpu
->arch
.pending_exceptions
;
211 TP_printk("vcpu=%x prio=%s pending=%lx",
213 __print_symbolic(__entry
->priority
, kvm_trace_symbol_irqprio
),
219 /* This part must be outside protection */
220 #include <trace/define_trace.h>