Fix: build x86 kvm probes on kernels >= 4.1-rc1
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Apr 2015 21:20:28 +0000 (17:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Apr 2015 21:21:31 +0000 (17:21 -0400)
iodev.h has moved to include/kvm/.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/Makefile
probes/lttng-probe-kvm-x86-mmu.c
probes/lttng-probe-kvm-x86.c

index b2dd3af4378383b27ddbd9bd6f1d9a4c9f98f44b..d4baaeb204ab3cdfb65ebca56555c6e6c3910c1b 100644 (file)
@@ -24,7 +24,7 @@ obj-m += lttng-probe-statedump.o
 ifneq ($(CONFIG_KVM),)
 obj-m += lttng-probe-kvm.o
 ifneq ($(CONFIG_X86),)
-kvm_dep = $(srctree)/virt/kvm/iodev.h
+kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h
 ifneq ($(wildcard $(kvm_dep)),)
 CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm
 CFLAGS_lttng-probe-kvm-x86-mmu.o += -I$(srctree)/virt/kvm
index ab30b2aa9bab87d791fb81e6c6c772056240db07..1710cfc4c28c23cb2f0a91ec14cbc4d9ca92a38a 100644 (file)
 #include <linux/module.h>
 #include <linux/kvm_host.h>
 #include "../lttng-tracer.h"
+#include "../lttng-kernel-version.h"
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
+#include <kvm/iodev.h>
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
+#include <../../virt/kvm/iodev.h>
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index a15a4e958250119675fe5eb426fd24071ab916b6..9b2054d806e088487caccb7ec6449a4f51c10675 100644 (file)
 #include <linux/module.h>
 #include <linux/kvm_host.h>
 #include "../lttng-tracer.h"
+#include "../lttng-kernel-version.h"
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
+#include <kvm/iodev.h>
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
+#include <../../virt/kvm/iodev.h>
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
This page took 0.026551 seconds and 4 git commands to generate.