summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2020-12-14 10:09:23 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-18 22:52:24 +0000
commit7dc526230f7c520ec1d2afaa681f56a7fc49c0ba (patch)
tree7589956dd83576f6e9e5adf4c58025c5cc185a9d /meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch
parentf55fbbc7971207690d0f8dcab72b826c1a7070f5 (diff)
downloadpoky-7dc526230f7c520ec1d2afaa681f56a7fc49c0ba.tar.gz
lttng-modules: fix build against v5.10+
lttng-modules doesn't currently build against the lastest 5.10-rc versions. Upstream lttng does have fixes for the issues, but hasn't done a release that contains them yet. There are other patches on the 2.12.x branch, but I've skipped them for now as they aren't necessary for 5.10 builds, and can be picked up with the next full update. We also bump the dev-upstream hash to make them easier to pickup for those building from git. (From OE-Core rev: 47201e98bb293d59c5d41986d066fd7614b914fa) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch')
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch82
1 files changed, 82 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch b/meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch
new file mode 100644
index 0000000000..8651bded99
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch
@@ -0,0 +1,82 @@
1From e30866f96b3ab02639f429e4bd34e59b3a336579 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 14:28:35 -0400
4Subject: [PATCH 12/19] fix: kvm: x86/mmu: Add TDP MMU PF handler (v5.10)
5
6See upstream commit :
7
8 commit bb18842e21111a979e2e0e1c5d85c09646f18d51
9 Author: Ben Gardon <bgardon@google.com>
10 Date: Wed Oct 14 11:26:50 2020 -0700
11
12 kvm: x86/mmu: Add TDP MMU PF handler
13
14 Add functions to handle page faults in the TDP MMU. These page faults
15 are currently handled in much the same way as the x86 shadow paging
16 based MMU, however the ordering of some operations is slightly
17 different. Future patches will add eager NX splitting, a fast page fault
18 handler, and parallel page faults.
19
20 Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell
21 machine. This series introduced no new failures.
22
23Upstream-Status: Backport
24
25Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
26Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
27Change-Id: Ie56959cb6c77913d2f1188b0ca15da9114623a4e
28---
29 .../lttng-module/arch/x86/kvm/mmutrace.h | 20 ++++++++++++++++++-
30 probes/lttng-probe-kvm-x86-mmu.c | 5 +++++
31 2 files changed, 24 insertions(+), 1 deletion(-)
32
33diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
34index e5470400..86717835 100644
35--- a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
36+++ b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
37@@ -163,7 +163,25 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kvm_mmu_page_class, kvm_mmu_prepare_zap_page,
38 TP_ARGS(sp)
39 )
40
41-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
42+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
43+
44+LTTNG_TRACEPOINT_EVENT_MAP(
45+ mark_mmio_spte,
46+
47+ kvm_mmu_mark_mmio_spte,
48+
49+ TP_PROTO(u64 *sptep, gfn_t gfn, u64 spte),
50+ TP_ARGS(sptep, gfn, spte),
51+
52+ TP_FIELDS(
53+ ctf_integer_hex(void *, sptep, sptep)
54+ ctf_integer(gfn_t, gfn, gfn)
55+ ctf_integer(unsigned, access, spte & ACC_ALL)
56+ ctf_integer(unsigned int, gen, get_mmio_spte_generation(spte))
57+ )
58+)
59+
60+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
61
62 LTTNG_TRACEPOINT_EVENT_MAP(
63 mark_mmio_spte,
64diff --git a/probes/lttng-probe-kvm-x86-mmu.c b/probes/lttng-probe-kvm-x86-mmu.c
65index 8f981865..5043c776 100644
66--- a/probes/lttng-probe-kvm-x86-mmu.c
67+++ b/probes/lttng-probe-kvm-x86-mmu.c
68@@ -31,6 +31,11 @@
69 #include <../../arch/x86/kvm/mmutrace.h>
70 #endif
71
72+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
73+#include <../arch/x86/kvm/mmu.h>
74+#include <../arch/x86/kvm/mmu/spte.h>
75+#endif
76+
77 #undef TRACE_INCLUDE_PATH
78 #undef TRACE_INCLUDE_FILE
79
80--
812.19.1
82