aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/trace.h')
-rw-r--r--arch/x86/kvm/trace.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h
index 45903a926372..6ad30a29f044 100644
--- a/arch/x86/kvm/trace.h
+++ b/arch/x86/kvm/trace.h
@@ -246,28 +246,33 @@ TRACE_EVENT(kvm_page_fault,
246 * Tracepoint for guest MSR access. 246 * Tracepoint for guest MSR access.
247 */ 247 */
248TRACE_EVENT(kvm_msr, 248TRACE_EVENT(kvm_msr,
249 TP_PROTO(unsigned write, u32 ecx, u64 data), 249 TP_PROTO(unsigned write, u32 ecx, u64 data, bool exception),
250 TP_ARGS(write, ecx, data), 250 TP_ARGS(write, ecx, data, exception),
251 251
252 TP_STRUCT__entry( 252 TP_STRUCT__entry(
253 __field( unsigned, write ) 253 __field( unsigned, write )
254 __field( u32, ecx ) 254 __field( u32, ecx )
255 __field( u64, data ) 255 __field( u64, data )
256 __field( u8, exception )
256 ), 257 ),
257 258
258 TP_fast_assign( 259 TP_fast_assign(
259 __entry->write = write; 260 __entry->write = write;
260 __entry->ecx = ecx; 261 __entry->ecx = ecx;
261 __entry->data = data; 262 __entry->data = data;
263 __entry->exception = exception;
262 ), 264 ),
263 265
264 TP_printk("msr_%s %x = 0x%llx", 266 TP_printk("msr_%s %x = 0x%llx%s",
265 __entry->write ? "write" : "read", 267 __entry->write ? "write" : "read",
266 __entry->ecx, __entry->data) 268 __entry->ecx, __entry->data,
269 __entry->exception ? " (#GP)" : "")
267); 270);
268 271
269#define trace_kvm_msr_read(ecx, data) trace_kvm_msr(0, ecx, data) 272#define trace_kvm_msr_read(ecx, data) trace_kvm_msr(0, ecx, data, false)
270#define trace_kvm_msr_write(ecx, data) trace_kvm_msr(1, ecx, data) 273#define trace_kvm_msr_write(ecx, data) trace_kvm_msr(1, ecx, data, false)
274#define trace_kvm_msr_read_ex(ecx) trace_kvm_msr(0, ecx, 0, true)
275#define trace_kvm_msr_write_ex(ecx, data) trace_kvm_msr(1, ecx, data, true)
271 276
272/* 277/*
273 * Tracepoint for guest CR access. 278 * Tracepoint for guest CR access.