WSL2-Linux-Kernel/arch/x86/kvm
Stefan Hajnoczi 0d460ffc09 KVM: Use __print_symbolic() for vmexit tracepoints
The vmexit tracepoints format the exit_reason to make it human-readable.
Since the exit_reason depends on the instruction set (vmx or svm),
formatting is handled with ftrace_print_symbols_seq() by referring to
the appropriate exit reason table.

However, the ftrace_print_symbols_seq() function is not meant to be used
directly in tracepoints since it does not export the formatting table
which userspace tools like trace-cmd and perf use to format traces.

In practice perf dies when formatting vmexit-related events and
trace-cmd falls back to printing the numeric value (with extra
formatting code in the kvm plugin to paper over this limitation).  Other
userspace consumers of vmexit-related tracepoints would be in similar
trouble.

To avoid significant changes to the kvm_exit tracepoint, this patch
moves the vmx and svm exit reason tables into arch/x86/kvm/trace.h and
selects the right table with __print_symbolic() depending on the
instruction set.  Note that __print_symbolic() is designed for exporting
the formatting table to userspace and allows trace-cmd and perf to work.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 19:17:59 +03:00
..
Kconfig KVM: uses TASKSTATS, depends on NET 2011-08-16 19:00:41 +03:00
Makefile KVM: x86: Makefile clean up 2011-01-12 11:29:08 +02:00
emulate.c KVM: x86 emulator: fix Src2CL decode 2011-09-25 19:14:58 +03:00
i8254.c KVM: fix typo in copyright notice 2010-10-24 10:53:14 +02:00
i8254.h KVM: remove useless function declaration kvm_inject_pit_timer_irqs() 2011-05-11 07:57:09 -04:00
i8259.c KVM: remove isr_ack logic from PIC 2011-03-17 13:08:30 -03:00
irq.c KVM: fix typo in copyright notice 2010-10-24 10:53:14 +02:00
irq.h KVM: remove useless function declarations from file arch/x86/kvm/irq.h 2011-05-11 07:57:09 -04:00
kvm_cache_regs.h KVM: Fetch guest cr3 from hardware on demand 2011-01-12 11:31:16 +02:00
kvm_timer.h KVM: arch/x86/kvm/kvm_timer.h checkpatch cleanup 2010-05-17 12:14:42 +03:00
lapic.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
lapic.h KVM: x86: Remove useless regs_page pointer from kvm_lapic 2011-03-17 13:08:33 -03:00
mmu.c KVM: MMU: fix incorrect return of spte 2011-09-25 19:13:25 +03:00
mmu.h KVM: MMU: mmio page fault support 2011-07-24 11:50:40 +03:00
mmu_audit.c KVM: MMU: remove bypass_guest_pf 2011-07-24 11:50:33 +03:00
mmutrace.h KVM: MMU: trace mmio page fault 2011-07-24 11:50:41 +03:00
paging_tmpl.h KVM: MMU: mmio page fault support 2011-07-24 11:50:40 +03:00
svm.c KVM: Use __print_symbolic() for vmexit tracepoints 2011-09-25 19:17:59 +03:00
timer.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
trace.h KVM: Use __print_symbolic() for vmexit tracepoints 2011-09-25 19:17:59 +03:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: Use __print_symbolic() for vmexit tracepoints 2011-09-25 19:17:59 +03:00
x86.c KVM: Really fix HV_X64_MSR_APIC_ASSIST_PAGE 2011-09-25 19:17:58 +03:00
x86.h KVM: MMU: cache mmio info on page fault path 2011-07-24 11:50:26 +03:00