30a6cc0cc35c93afdfa66cca2d2ad5b0fcb6a684
[lttng-modules.git] / probes / lttng-probe-kvm-x86.c
1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2 *
3 * probes/lttng-probe-kvm.c
4 *
5 * LTTng kvm probes.
6 *
7 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 */
9
10 #include <linux/module.h>
11 #include <linux/kvm_host.h>
12 #include <lttng/tracer.h>
13 #include <lttng/kernel-version.h>
14
15 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
16 #include <kvm_emulate.h>
17 #endif
18
19 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
20 #include <kvm/iodev.h>
21 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
22 #include <../../virt/kvm/iodev.h>
23 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
24
25 /*
26 * Create the tracepoint static inlines from the kernel to validate that our
27 * trace event macros match the kernel we run on.
28 */
29 #include <trace/events/kvm.h>
30
31 #include <wrapper/tracepoint.h>
32
33 /*
34 * Create LTTng tracepoint probes.
35 */
36 #define LTTNG_PACKAGE_BUILD
37 #define CREATE_TRACE_POINTS
38
39 #define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86/kvm
40 #include <instrumentation/events/lttng-module/arch/x86/kvm/trace.h>
41
42 MODULE_LICENSE("GPL and additional rights");
43 MODULE_AUTHOR("Mathieu Desnoyers <mathieu.desnoyers@efficios.com>");
44 MODULE_DESCRIPTION("LTTng kvm probes");
45 MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "."
46 __stringify(LTTNG_MODULES_MINOR_VERSION) "."
47 __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION)
48 LTTNG_MODULES_EXTRAVERSION);
This page took 0.029797 seconds and 3 git commands to generate.