[patch 3/3] kvm-kmod: dummy event trace hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



And don't stop if kvm_trace.c is gone.

Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

Index: kvm-kmod/external-module-compat-comm.h
===================================================================
--- kvm-kmod.orig/external-module-compat-comm.h
+++ kvm-kmod/external-module-compat-comm.h
@@ -762,6 +762,18 @@ static inline bool zalloc_cpumask_var(cp
 
 #endif
 
+/* event traces added in 2.6.31 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+
+#define TP_PROTO(args...) args
+
+#define TRACE_EVENT(name, proto, args, entry, fa, printk)               \
+	static inline void trace_##name(proto) { }
+
+static inline void tracepoint_synchronize_unregister(void) { }
+
+#endif
+
 
 /* Macro introduced only on newer kernels: */
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
Index: kvm-kmod/sync
===================================================================
--- kvm-kmod.orig/sync
+++ kvm-kmod/sync
@@ -171,6 +171,10 @@ def header_sync(arch):
                % { 'T': T, 'name': os.path.basename(file) })
         cp(file, out)
         unifdef(out)
+    for file in glob('%(linux)s/include/trace/events/kvm.h' % { 'linux': linux }):
+        out = ('%(T)s/include/trace/events/%(name)s'
+                % { 'T': T, 'name': os.path.basename(file) })
+        cp(file, out)
     arch_headers = (
         [x
          for dir in ['%(linux)s/arch/%(arch)s/include/asm/./kvm*.h',
@@ -207,7 +211,13 @@ def source_sync(arch):
         unifdef(i)
 
     for i in hack_files[arch]:
-        hack(T, arch, i)
+        try:
+            os.stat(T + "/" + i )
+        except OSError:
+              if i != "kvm_trace.c":
+                  raise
+        else:
+              hack(T, arch, i)
 
     copy_if_changed(T, arch)
     rmtree(T)
Index: kvm-kmod/include-compat/trace/define_trace.h
===================================================================
--- /dev/null
+++ kvm-kmod/include-compat/trace/define_trace.h
@@ -0,0 +1 @@
+/* Dummy file */

-- 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux