iodev.h has moved to include/kvm/.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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
#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
#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