From 45acd1f8016f828cab288ccf77d88e3a9d6ab5e3 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 27 Apr 2015 17:20:28 -0400 Subject: [PATCH] Fix: build x86 kvm probes on kernels >= 4.1-rc1 iodev.h has moved to include/kvm/. Signed-off-by: Mathieu Desnoyers --- probes/Makefile | 2 +- probes/lttng-probe-kvm-x86-mmu.c | 7 +++++++ probes/lttng-probe-kvm-x86.c | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) 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 -- 2.34.1