1 #if !defined(_TRACE_KVM_MAIN_H) || defined(TRACE_HEADER_MULTI_READ)
2 #define _TRACE_KVM_MAIN_H
7 #define TRACE_SYSTEM kvm
9 #define ERSN(x) { KVM_EXIT_##x, "KVM_EXIT_" #x }
11 #define kvm_trace_exit_reason \
12 ERSN(UNKNOWN), ERSN(EXCEPTION), ERSN(IO), ERSN(HYPERCALL), \
13 ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN), \
14 ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR), \
15 ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
16 ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL), \
40 #if defined(__KVM_HAVE_IRQ_LINE)
43 TP_ARGS(gsi, level, irq_source_id),
54 __entry->irq_source_id = irq_source_id;
62 #if defined(__KVM_HAVE_IOAPIC)
63 #define kvm_deliver_mode \
89 TP_printk(
"pin %u dst %x vec=%u (%s|%s|%s%s)%s",
92 (
__entry->e & (1<<11)) ?
"logical" :
"physical",
93 (
__entry->e & (1<<15)) ?
"level" :
"edge",
94 (
__entry->e & (1<<16)) ?
"|masked" :
"",
95 __entry->coalesced ?
" (coalesced)" :
"")
115 (
__entry->address & (1<<2)) ?
"logical" :
"physical",
116 (
__entry->data & (1<<15)) ?
"level" :
"edge",
117 (
__entry->address & (1<<3)) ?
"|rh" :
"")
120 #define kvm_irqchips \
121 {KVM_IRQCHIP_PIC_MASTER, "PIC master"}, \
122 {KVM_IRQCHIP_PIC_SLAVE, "PIC slave"}, \
123 {KVM_IRQCHIP_IOAPIC, "IOAPIC"}
126 TP_PROTO(
unsigned int irqchip,
unsigned int pin),
130 __field(
unsigned int, irqchip )
148 #define KVM_TRACE_MMIO_READ_UNSATISFIED 0
149 #define KVM_TRACE_MMIO_READ 1
150 #define KVM_TRACE_MMIO_WRITE 2
152 #define kvm_trace_symbol_mmio \
153 { KVM_TRACE_MMIO_READ_UNSATISFIED, "unsatisfied-read" }, \
154 { KVM_TRACE_MMIO_READ, "read" }, \
155 { KVM_TRACE_MMIO_WRITE, "write" }
175 TP_printk(
"mmio %s len %u gpa 0x%llx val 0x%llx",
180 #define kvm_fpu_load_symbol \
218 __entry->referenced ?
"YOUNG" :
"OLD")
221 #ifdef CONFIG_KVM_ASYNC_PF
241 DEFINE_EVENT(kvm_async_get_page_class, kvm_try_async_get_page,
248 DEFINE_EVENT(kvm_async_get_page_class, kvm_async_pf_doublefault,
275 DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_not_present,
282 DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_ready,
290 kvm_async_pf_completed,
295 __field(
unsigned long, address)