summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-06-25 15:00:08 +0300
committerAvi Kivity <avi@redhat.com>2009-06-25 15:00:08 +0300
commit76c21a6077c417135ec3945c1bf76d945db615de (patch)
tree422765569faee4c3f20636a3a9e33401be3e534a /arch
parent788dde68b8f72eae73c47ebe9d8a67ae02835eda (diff)
KVM: Define vendor-specific tracepoints in common code
Now that the vendor-specific tracepoints have been commonalized, we can define them in common code and export them to vendor modules. This fixes CONFIG_KVM_INTEL=y CONFIG_KVM_AMD=y builds. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/svm.c4
-rw-r--r--arch/x86/kvm/trace-arch.h15
-rw-r--r--arch/x86/kvm/trace.h2
-rw-r--r--arch/x86/kvm/vmx.c4
-rw-r--r--arch/x86/kvm/x86.c6
5 files changed, 12 insertions, 19 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index ef1577d2422e..fc14bdf60d39 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -25,12 +25,12 @@
#include <linux/vmalloc.h>
#include <linux/highmem.h>
#include <linux/sched.h>
+#include <linux/ftrace_event.h>
#include <asm/desc.h>
#include <asm/virtext.h>
-#define CREATE_TRACE_POINTS
-#include "trace-arch.h"
+#include "trace.h"
#define __ex(x) __kvm_handle_fault_on_reboot(x)
diff --git a/arch/x86/kvm/trace-arch.h b/arch/x86/kvm/trace-arch.h
index 4e3197abb48c..03a339484f92 100644
--- a/arch/x86/kvm/trace-arch.h
+++ b/arch/x86/kvm/trace-arch.h
@@ -1,13 +1,3 @@
-#if !defined(_TRACE_KVM_ARCH_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_KVM_ARCH_H
-
-#include <linux/tracepoint.h>
-
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM kvm
-#define TRACE_INCLUDE_PATH arch/x86/kvm
-#define TRACE_INCLUDE_FILE trace-arch
-
/*
* Tracepoint for kvm guest exit:
*/
@@ -123,8 +113,3 @@ TRACE_EVENT(kvm_cr,
#define trace_kvm_cr_read(cr, val) trace_kvm_cr(0, cr, val)
#define trace_kvm_cr_write(cr, val) trace_kvm_cr(1, cr, val)
-
-#endif /* _TRACE_KVM_ARCH_H */
-
-/* This part must be outside protection */
-#include <trace/define_trace.h>
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h
index 2b61329561df..da1a281366e8 100644
--- a/arch/x86/kvm/trace.h
+++ b/arch/x86/kvm/trace.h
@@ -138,6 +138,8 @@ TRACE_EVENT(kvm_apic,
#define trace_kvm_apic_read(reg, val) trace_kvm_apic(0, reg, val)
#define trace_kvm_apic_write(reg, val) trace_kvm_apic(1, reg, val)
+#include "trace-arch.h"
+
#endif /* _TRACE_KVM_H */
/* This part must be outside protection */
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index e56b817063e4..119fa470eded 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -25,6 +25,7 @@
#include <linux/highmem.h>
#include <linux/sched.h>
#include <linux/moduleparam.h>
+#include <linux/ftrace_event.h>
#include "kvm_cache_regs.h"
#include "x86.h"
@@ -34,8 +35,7 @@
#include <asm/virtext.h>
#include <asm/mce.h>
-#define CREATE_TRACE_POINTS
-#include "trace-arch.h"
+#include "trace.h"
#define __ex(x) __kvm_handle_fault_on_reboot(x)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1549d765d29c..af53f64376cb 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4883,3 +4883,9 @@ int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu)
{
return kvm_x86_ops->interrupt_allowed(vcpu);
}
+
+EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_exit);
+EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_inj_virq);
+EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_page_fault);
+EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_msr);
+EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_cr);