aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/trace.h')
-rw-r--r--arch/x86/kvm/trace.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h
index bca63f04dccb..1d6526856080 100644
--- a/arch/x86/kvm/trace.h
+++ b/arch/x86/kvm/trace.h
@@ -4,6 +4,7 @@
4#include <linux/tracepoint.h> 4#include <linux/tracepoint.h>
5#include <asm/vmx.h> 5#include <asm/vmx.h>
6#include <asm/svm.h> 6#include <asm/svm.h>
7#include <asm/clocksource.h>
7 8
8#undef TRACE_SYSTEM 9#undef TRACE_SYSTEM
9#define TRACE_SYSTEM kvm 10#define TRACE_SYSTEM kvm
@@ -754,6 +755,35 @@ TRACE_EVENT(
754 __entry->write ? "Write" : "Read", 755 __entry->write ? "Write" : "Read",
755 __entry->gpa_match ? "GPA" : "GVA") 756 __entry->gpa_match ? "GPA" : "GVA")
756); 757);
758
759#ifdef CONFIG_X86_64
760
761#define host_clocks \
762 {VCLOCK_NONE, "none"}, \
763 {VCLOCK_TSC, "tsc"}, \
764 {VCLOCK_HPET, "hpet"} \
765
766TRACE_EVENT(kvm_update_master_clock,
767 TP_PROTO(bool use_master_clock, unsigned int host_clock),
768 TP_ARGS(use_master_clock, host_clock),
769
770 TP_STRUCT__entry(
771 __field( bool, use_master_clock )
772 __field( unsigned int, host_clock )
773 ),
774
775 TP_fast_assign(
776 __entry->use_master_clock = use_master_clock;
777 __entry->host_clock = host_clock;
778 ),
779
780 TP_printk("masterclock %d hostclock %s",
781 __entry->use_master_clock,
782 __print_symbolic(__entry->host_clock, host_clocks))
783);
784
785#endif /* CONFIG_X86_64 */
786
757#endif /* _TRACE_KVM_H */ 787#endif /* _TRACE_KVM_H */
758 788
759#undef TRACE_INCLUDE_PATH 789#undef TRACE_INCLUDE_PATH