Skip to contentSkip to conversation

Update: kvm instrumentation for fedora 4.14.13-300

PATCH New Michael Jeanson 2 participants 3 messages Feb 20, 2018 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 2/2 Update: kvm instrumentation for fedora 4.14.13-300

Starting from 4.14.13-300 the fedora kernel backport a kvm instrumentation change introduced in 4.15 which affects the prototype of the kvm_mmio event.

---
 instrumentation/events/lttng-module/kvm.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
instrumentation/events/lttng-module/kvm.h +2 -1
index 9bbf95f..76eaa69 100644
@@ -91,7 +91,8 @@ LTTNG_TRACEPOINT_EVENT(kvm_ack_irq,
 	|| LTTNG_KERNEL_RANGE(4,4,112, 4,5,0) \
 	|| LTTNG_KERNEL_RANGE(3,16,52, 3,17,0) \
 	|| LTTNG_KERNEL_RANGE(3,2,97, 3,3,0) \
-	|| LTTNG_DEBIAN_KERNEL_RANGE(4,9,65,0,3,0, 4,10,0,0,0,0))
+	|| LTTNG_DEBIAN_KERNEL_RANGE(4,9,65,0,3,0, 4,10,0,0,0,0) \
+	|| LTTNG_FEDORA_KERNEL_RANGE(4,14,13,300, 4,15,0,0))
 
 LTTNG_TRACEPOINT_EVENT(kvm_mmio,
 	TP_PROTO(int type, int len, u64 gpa, void *val),
Signature · 6 lines
2.7.4

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
#2 lore raw

Re: [PATCH lttng-modules 1/2] Fix: Add Fedora version macros

In reply to a message not in the archive

Merged into master, 2.10, 2.9, thanks!

Mathieu

Quoted 91 lines · ----- On Feb 20, 2018, at 12:10 PM, Michael Jeanson [email protected] wrote:

From: Loïc Gelle <[email protected]>

---

Kbuild.common          |  6 ++++++
abi-fedora-version.sh  | 21 +++++++++++++++++++++
lttng-kernel-version.h | 19 +++++++++++++++++++
3 files changed, 46 insertions(+)

create mode 100755 abi-fedora-version.sh

Kbuild.common +0 -0
index 16c62ab..c0d5409 100644
@@ -22,6 +22,12 @@ ifneq ($(SLE_API_VERSION), 0)
  ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION)

endif

+FEDORA_REVISION_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-fedora-version.sh $(CURDIR))

Kbuild.common +5 -0
+
+ifneq ($(FEDORA_REVISION_VERSION), 0)
+  ccflags-y += -DFEDORA_REVISION_VERSION=$(FEDORA_REVISION_VERSION)
+endif
+

RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh $(CURDIR))

ifneq ($(RT_PATCH_VERSION), 0)

abi-fedora-version.sh new file +12 -0
new file mode 100755
index 0000000..52dd044
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# First argument is the path to the kernel headers.
+KPATH="$1"
+
+if [ ! -f "${KPATH}/include/generated/utsrelease.h" ]; then
+	echo 0
+	exit 0
+fi
+
+# Assuming KPATH is the target kernel headers directory
+UTS_RELEASE=$(sed -rn 's/^#define UTS_RELEASE "(.*)"/\1/p'

"${KPATH}/include/generated/utsrelease.h")

abi-fedora-version.sh new file +8 -0
+FEDORA_VERSION=$(echo "${UTS_RELEASE}" | sed -n 's/.*\.fc\([0-9]*\)\..*/\1/p')
+
+if [ "x${FEDORA_VERSION}" = "x" ]; then
+        echo 0
+        exit 0
+fi
+
+FEDORA_REVISION_VERSION=$(echo "${UTS_RELEASE}" | sed -n

's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\-\([0-9]*\).*/\4/p')

abi-fedora-version.sh new file +1 -0
+echo "${FEDORA_REVISION_VERSION}"
lttng-kernel-version.h +19 -1
index 387aa0a..2b63a5d 100644
@@ -115,6 +115,25 @@
 		LTTNG_SLE_VERSION_CODE < \
 		LTTNG_SLE_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_high))
 
+/* Fedora */
+
+#define LTTNG_FEDORA_KERNEL_VERSION(a, b, c, d) \
+        (((((a) << 16) + ((b) << 8) + (c)) * 10000ULL) + (d))
+
+#ifdef FEDORA_REVISION_VERSION
+#define LTTNG_FEDORA_VERSION_CODE \
+        ((LINUX_VERSION_CODE * 10000ULL) + FEDORA_REVISION_VERSION)
+#else
+#define LTTNG_FEDORA_VERSION_CODE         0
+#endif
+
+#define LTTNG_FEDORA_KERNEL_RANGE(a_low, b_low, c_low, d_low, \
+                a_high, b_high, c_high, d_high) \
+        (LTTNG_FEDORA_VERSION_CODE >= \
+                LTTNG_FEDORA_KERNEL_VERSION(a_low, b_low, c_low, d_low) && \
+                LTTNG_FEDORA_VERSION_CODE < \
+                LTTNG_FEDORA_KERNEL_VERSION(a_high, b_high, c_high, d_high))
+
 /* RT patch */
 
 #define LTTNG_RT_KERNEL_VERSION(a, b, c, d) \
--

2.7.4

Signature · 7 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Merged into master, 2.10, 2.9, thanks!

Mathieu

Quoted 25 lines · ----- On Feb 20, 2018, at 12:10 PM, Michael Jeanson [email protected] wrote:

Starting from 4.14.13-300 the fedora kernel backport a kvm instrumentation change introduced in 4.15 which affects the prototype of the kvm_mmio event.

---
instrumentation/events/lttng-module/kvm.h | 3 ++-

1 file changed, 2 insertions(+), 1 deletion(-)
instrumentation/events/lttng-module/kvm.h +2 -2
index 9bbf95f..76eaa69 100644
@@ -91,7 +91,8 @@ LTTNG_TRACEPOINT_EVENT(kvm_ack_irq,
 	|| LTTNG_KERNEL_RANGE(4,4,112, 4,5,0) \
 	|| LTTNG_KERNEL_RANGE(3,16,52, 3,17,0) \
 	|| LTTNG_KERNEL_RANGE(3,2,97, 3,3,0) \
-	|| LTTNG_DEBIAN_KERNEL_RANGE(4,9,65,0,3,0, 4,10,0,0,0,0))
+	|| LTTNG_DEBIAN_KERNEL_RANGE(4,9,65,0,3,0, 4,10,0,0,0,0) \
+	|| LTTNG_FEDORA_KERNEL_RANGE(4,14,13,300, 4,15,0,0))
 
 LTTNG_TRACEPOINT_EVENT(kvm_mmio,
 	TP_PROTO(int type, int len, u64 gpa, void *val),
--

2.7.4

Signature · 7 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev