summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-07-01 16:01:02 +0300
committerAvi Kivity <avi@redhat.com>2009-09-10 08:33:07 +0300
commitaec51dc4f1584018d7e35269e04e3dde3d2033e6 (patch)
tree8423d4680a2db4417fd99ccfffc935f8650230e1 /include/trace
parentc323c0e5f06150cc000e09e8e3b22356099e7bde (diff)
KVM: Trace mmio
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/kvm.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index 035232dc84e..77022af4849 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -56,6 +56,39 @@ TRACE_EVENT(kvm_ack_irq,
#endif /* defined(__KVM_HAVE_IOAPIC) */
+
+#define KVM_TRACE_MMIO_READ_UNSATISFIED 0
+#define KVM_TRACE_MMIO_READ 1
+#define KVM_TRACE_MMIO_WRITE 2
+
+#define kvm_trace_symbol_mmio \
+ { KVM_TRACE_MMIO_READ_UNSATISFIED, "unsatisfied-read" }, \
+ { KVM_TRACE_MMIO_READ, "read" }, \
+ { KVM_TRACE_MMIO_WRITE, "write" }
+
+TRACE_EVENT(kvm_mmio,
+ TP_PROTO(int type, int len, u64 gpa, u64 val),
+ TP_ARGS(type, len, gpa, val),
+
+ TP_STRUCT__entry(
+ __field( u32, type )
+ __field( u32, len )
+ __field( u64, gpa )
+ __field( u64, val )
+ ),
+
+ TP_fast_assign(
+ __entry->type = type;
+ __entry->len = len;
+ __entry->gpa = gpa;
+ __entry->val = val;
+ ),
+
+ TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx",
+ __print_symbolic(__entry->type, kvm_trace_symbol_mmio),
+ __entry->len, __entry->gpa, __entry->val)
+);
+
#endif /* _TRACE_KVM_MAIN_H */
/* This part must be outside protection */