Commit | Line | Data |
---|---|---|
b7cdc182 | 1 | /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) |
9f36eaed | 2 | * |
b3c40230 MG |
3 | * probes/lttng-probe-kvm.c |
4 | * | |
5 | * LTTng kvm probes. | |
6 | * | |
7 | * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
b3c40230 MG |
8 | */ |
9 | ||
10 | #include <linux/module.h> | |
11 | #include <linux/kvm_host.h> | |
156a3977 MD |
12 | #include <lttng-tracer.h> |
13 | #include <lttng-kernel-version.h> | |
1de8b2e4 | 14 | |
a51d5d47 MD |
15 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) |
16 | /* TODO: check for header availability in Makefile */ | |
17 | #include <../../arch/x86/kvm/kvm_emulate.h> | |
18 | #endif | |
19 | ||
1de8b2e4 MD |
20 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) |
21 | #include <kvm/iodev.h> | |
22 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */ | |
23 | #include <../../virt/kvm/iodev.h> | |
24 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */ | |
b3c40230 MG |
25 | |
26 | /* | |
27 | * Create the tracepoint static inlines from the kernel to validate that our | |
28 | * trace event macros match the kernel we run on. | |
29 | */ | |
30 | #include <trace/events/kvm.h> | |
31 | ||
0d260d3d | 32 | #include "lttng-tracepoint.h" |
b3c40230 MG |
33 | |
34 | /* | |
35 | * Create LTTng tracepoint probes. | |
36 | */ | |
37 | #define LTTNG_PACKAGE_BUILD | |
38 | #define CREATE_TRACE_POINTS | |
39 | ||
156a3977 MD |
40 | #define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86/kvm |
41 | #include <instrumentation/events/lttng-module/arch/x86/kvm/trace.h> | |
b3c40230 MG |
42 | |
43 | MODULE_LICENSE("GPL and additional rights"); | |
44 | MODULE_AUTHOR("Mathieu Desnoyers <mathieu.desnoyers@efficios.com>"); | |
45 | MODULE_DESCRIPTION("LTTng kvm probes"); | |
13ab8b0a MD |
46 | MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." |
47 | __stringify(LTTNG_MODULES_MINOR_VERSION) "." | |
48 | __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) | |
49 | LTTNG_MODULES_EXTRAVERSION); |