aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/kvm.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
new file mode 100644
index 000000000000..d74b23d803f1
--- /dev/null
+++ b/include/trace/events/kvm.h
@@ -0,0 +1,57 @@
1#if !defined(_TRACE_KVM_MAIN_H) || defined(TRACE_HEADER_MULTI_READ)
2#define _TRACE_KVM_MAIN_H
3
4#include <linux/tracepoint.h>
5
6#undef TRACE_SYSTEM
7#define TRACE_SYSTEM kvm
8#define TRACE_INCLUDE_FILE kvm
9
10#if defined(__KVM_HAVE_IOAPIC)
11TRACE_EVENT(kvm_set_irq,
12 TP_PROTO(unsigned int gsi),
13 TP_ARGS(gsi),
14
15 TP_STRUCT__entry(
16 __field( unsigned int, gsi )
17 ),
18
19 TP_fast_assign(
20 __entry->gsi = gsi;
21 ),
22
23 TP_printk("gsi %u", __entry->gsi)
24);
25
26
27#define kvm_irqchips \
28 {KVM_IRQCHIP_PIC_MASTER, "PIC master"}, \
29 {KVM_IRQCHIP_PIC_SLAVE, "PIC slave"}, \
30 {KVM_IRQCHIP_IOAPIC, "IOAPIC"}
31
32TRACE_EVENT(kvm_ack_irq,
33 TP_PROTO(unsigned int irqchip, unsigned int pin),
34 TP_ARGS(irqchip, pin),
35
36 TP_STRUCT__entry(
37 __field( unsigned int, irqchip )
38 __field( unsigned int, pin )
39 ),
40
41 TP_fast_assign(
42 __entry->irqchip = irqchip;
43 __entry->pin = pin;
44 ),
45
46 TP_printk("irqchip %s pin %u",
47 __print_symbolic(__entry->irqchip, kvm_irqchips),
48 __entry->pin)
49);
50
51
52
53#endif /* defined(__KVM_HAVE_IOAPIC) */
54#endif /* _TRACE_KVM_MAIN_H */
55
56/* This part must be outside protection */
57#include <trace/define_trace.h>