From: Mathieu Desnoyers Date: Mon, 27 Apr 2015 21:20:28 +0000 (-0400) Subject: Fix: build x86 kvm probes on kernels >= 4.1-rc1 X-Git-Tag: v2.6.1~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=45acd1f8016f828cab288ccf77d88e3a9d6ab5e3;p=lttng-modules.git Fix: build x86 kvm probes on kernels >= 4.1-rc1 iodev.h has moved to include/kvm/. Signed-off-by: Mathieu Desnoyers --- diff --git a/probes/Makefile b/probes/Makefile index b2dd3af4..d4baaeb2 100644 --- a/probes/Makefile +++ b/probes/Makefile @@ -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 diff --git a/probes/lttng-probe-kvm-x86-mmu.c b/probes/lttng-probe-kvm-x86-mmu.c index ab30b2aa..1710cfc4 100644 --- a/probes/lttng-probe-kvm-x86-mmu.c +++ b/probes/lttng-probe-kvm-x86-mmu.c @@ -23,6 +23,13 @@ #include #include #include "../lttng-tracer.h" +#include "../lttng-kernel-version.h" + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) +#include +#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 diff --git a/probes/lttng-probe-kvm-x86.c b/probes/lttng-probe-kvm-x86.c index a15a4e95..9b2054d8 100644 --- a/probes/lttng-probe-kvm-x86.c +++ b/probes/lttng-probe-kvm-x86.c @@ -23,6 +23,13 @@ #include #include #include "../lttng-tracer.h" +#include "../lttng-kernel-version.h" + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) +#include +#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