blob: 035232dc84e034d855c419c18924b4eb42511fa9 [file] [log] [blame]
Marcelo Tosatti229456f2009-06-17 09:22:14 -03001#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,
Avi Kivityae8c1c42009-07-01 12:09:41 +030012 TP_PROTO(unsigned int gsi, int level, int irq_source_id),
13 TP_ARGS(gsi, level, irq_source_id),
Marcelo Tosatti229456f2009-06-17 09:22:14 -030014
15 TP_STRUCT__entry(
16 __field( unsigned int, gsi )
Avi Kivityae8c1c42009-07-01 12:09:41 +030017 __field( int, level )
18 __field( int, irq_source_id )
Marcelo Tosatti229456f2009-06-17 09:22:14 -030019 ),
20
21 TP_fast_assign(
22 __entry->gsi = gsi;
Avi Kivityae8c1c42009-07-01 12:09:41 +030023 __entry->level = level;
24 __entry->irq_source_id = irq_source_id;
Marcelo Tosatti229456f2009-06-17 09:22:14 -030025 ),
26
Avi Kivityae8c1c42009-07-01 12:09:41 +030027 TP_printk("gsi %u level %d source %d",
28 __entry->gsi, __entry->level, __entry->irq_source_id)
Marcelo Tosatti229456f2009-06-17 09:22:14 -030029);
30
31
32#define kvm_irqchips \
33 {KVM_IRQCHIP_PIC_MASTER, "PIC master"}, \
34 {KVM_IRQCHIP_PIC_SLAVE, "PIC slave"}, \
35 {KVM_IRQCHIP_IOAPIC, "IOAPIC"}
36
37TRACE_EVENT(kvm_ack_irq,
38 TP_PROTO(unsigned int irqchip, unsigned int pin),
39 TP_ARGS(irqchip, pin),
40
41 TP_STRUCT__entry(
42 __field( unsigned int, irqchip )
43 __field( unsigned int, pin )
44 ),
45
46 TP_fast_assign(
47 __entry->irqchip = irqchip;
48 __entry->pin = pin;
49 ),
50
51 TP_printk("irqchip %s pin %u",
52 __print_symbolic(__entry->irqchip, kvm_irqchips),
53 __entry->pin)
54);
55
56
57
58#endif /* defined(__KVM_HAVE_IOAPIC) */
59#endif /* _TRACE_KVM_MAIN_H */
60
61/* This part must be outside protection */
62#include <trace/define_trace.h>