aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/lttng/lttng-modules/0004-Fix-Revert-KVM-MMU-show-mmu_valid_gen.-v5.1.patch
diff options
context:
space:
mode:
authorNaveen Saini <naveen.kumar.saini@intel.com>2019-05-19 21:38:09 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2019-05-22 10:39:07 +0800
commit1bbd18500c93d3c6ee9f43ded29b1be1baba8e75 (patch)
tree6f271cfa8ca57389db24d3ccaffd97b14c49d7ce /recipes-kernel/lttng/lttng-modules/0004-Fix-Revert-KVM-MMU-show-mmu_valid_gen.-v5.1.patch
parent2c011359d36c6b903ccbc72133ceabd26de34771 (diff)
downloadmeta-intel-1bbd18500c93d3c6ee9f43ded29b1be1baba8e75.tar.gz
meta-intel-1bbd18500c93d3c6ee9f43ded29b1be1baba8e75.tar.bz2
meta-intel-1bbd18500c93d3c6ee9f43ded29b1be1baba8e75.zip
lttng-modules: add bbappend11.0-warrior-2.7
Backport patches from upstream to fix build errors when building with kernel v5.1. These patches are backported from stable branch. The code v5.1 is protected by ifdefs so v4.19 works as well. Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-kernel/lttng/lttng-modules/0004-Fix-Revert-KVM-MMU-show-mmu_valid_gen.-v5.1.patch')
-rw-r--r--recipes-kernel/lttng/lttng-modules/0004-Fix-Revert-KVM-MMU-show-mmu_valid_gen.-v5.1.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/recipes-kernel/lttng/lttng-modules/0004-Fix-Revert-KVM-MMU-show-mmu_valid_gen.-v5.1.patch b/recipes-kernel/lttng/lttng-modules/0004-Fix-Revert-KVM-MMU-show-mmu_valid_gen.-v5.1.patch
new file mode 100644
index 00000000..0e0ab765
--- /dev/null
+++ b/recipes-kernel/lttng/lttng-modules/0004-Fix-Revert-KVM-MMU-show-mmu_valid_gen.-v5.1.patch
@@ -0,0 +1,52 @@
+From f65f074de41fcc2c176397d54947f5ae2104671b Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Mon, 18 Mar 2019 16:20:35 -0400
+Subject: [PATCH 4/5] Fix: Revert "KVM: MMU: show mmu_valid_gen..." (v5.1)
+
+See upstream commit :
+
+ commit b59c4830ca185ba0e9f9e046fb1cd10a4a92627a
+ Author: Sean Christopherson <sean.j.christopherson@intel.com>
+ Date: Tue Feb 5 13:01:30 2019 -0800
+
+ Revert "KVM: MMU: show mmu_valid_gen in shadow page related tracepoints"
+
+ ...as part of removing x86 KVM's fast invalidate mechanism, i.e. this
+ is one part of a revert all patches from the series that introduced the
+ mechanism[1].
+
+ This reverts commit 2248b023219251908aedda0621251cffc548f258.
+
+Upstream-Status: Backport [http://git.lttng.org/?p=lttng-modules.git;a=commit;h=8a88382fb09bbeda443044ee8cdb8f92040636bc]
+
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
+---
+ .../events/lttng-module/arch/x86/kvm/mmutrace.h | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
+index e3f7abd..71e8b34 100644
+--- a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
++++ b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
+@@ -13,7 +13,15 @@
+ #undef TRACE_SYSTEM
+ #define TRACE_SYSTEM kvm_mmu
+
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0))
++
++#define LTTNG_KVM_MMU_PAGE_FIELDS \
++ ctf_integer(__u64, gfn, (sp)->gfn) \
++ ctf_integer(__u32, role, (sp)->role.word) \
++ ctf_integer(__u32, root_count, (sp)->root_count) \
++ ctf_integer(bool, unsync, (sp)->unsync)
++
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+
+ #define LTTNG_KVM_MMU_PAGE_FIELDS \
+ ctf_integer(unsigned long, mmu_valid_gen, (sp)->mmu_valid_gen) \
+--
+2.17.0
+