Skip to contentSkip to conversation

kvm: external module: support building against Windriver 2.0 (kernel 2.6.21)

PATCH In review Bernhard Kohl 4 participants 5 messages Mar 12, 2009 – Mar 16, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: external module: support building against Windriver 2.0 (kernel 2.6.21)

This is needed to compile kvm in a Windriver 2.0 distribution (kernel 2.6.21). This kernel has an include file marker.h, but trace_mark is not defined there. So the compat code in kernel/include-compat/linux/marker.h is not included.

---
 kernel/external-module-compat-comm.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/kernel/external-module-compat-comm.h
index a14cea2..e40501e 100644

kernel/external-module-compat-comm.h +4 -0
@@ -25,6 +25,10 @@
 #  undef CONFIG_KVM_TRACE
 #endif
 
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,21)
+#define trace_mark(args...) ((void)0)
+#endif
+
 /*
  * 2.6.16 does not have GFP_NOWAIT
  */
Signature · 1 line
1.6.0.6
#1 lore raw
Quoted 4 lines · Bernhard Kohl

This is needed to compile kvm in a Windriver 2.0 distribution (kernel 2.6.21). This kernel has an include file marker.h, but trace_mark is not defined there. So the compat code in kernel/include-compat/linux/marker.h is not included.

I bet this is because Wind River patched some variant of LTTng into their kernel.

However, I'm unsure if supporting significantly modified distribution kernels is in the scope of this compat layer. If it is ok for the maintainers, you should try to make the test more Wind River specific (did you check that there is no side-effect for normal <= 2.6.21 kernels?) and maybe add a comment.

Jan

Quoted 22 lines
---
 kernel/external-module-compat-comm.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
kernel/external-module-compat-comm.h +4 -0
index a14cea2..e40501e 100644
@@ -25,6 +25,10 @@
 #  undef CONFIG_KVM_TRACE
 #endif
 
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,21)
+#define trace_mark(args...) ((void)0)
+#endif
+
 /*
  * 2.6.16 does not have GFP_NOWAIT
  */
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
#2 lore raw
Quoted 9 lines · Jan Kiszka <jan.kiszka <at> siemens.com> writes:

I bet this is because Wind River patched some variant of LTTng into their kernel.

However, I'm unsure if supporting significantly modified distribution kernels is in the scope of this compat layer. If it is ok for the maintainers, you should try to make the test more Wind River specific (did you check that there is no side-effect for normal <= 2.6.21 kernels?) and maybe add a comment.

No I didn't check this with other <= 2.6.21 kernels.

Bernhard

#3 lore raw
In reply to Jan Kiszka
Quoted 8 lines · Jan Kiszka
Quoted 5 lines · Bernhard Kohl

This is needed to compile kvm in a Windriver 2.0 distribution (kernel 2.6.21). This kernel has an include file marker.h, but trace_mark is not defined there. So the compat code in kernel/include-compat/linux/marker.h is not included.

Quoted 5 lines

I bet this is because Wind River patched some variant of LTTng into their kernel.

However, I'm unsure if supporting significantly modified distribution kernels is in the scope of this compat layer.

Yes, for example we support the RHEL 5 series, which significantly deviates from plain 2.6.18.

Quoted 5 lines

If it is ok for the
maintainers, you should try to make the test more Wind River specific (did you check that there is no side-effect for normal <= 2.6.21 kernels?) and maybe add a comment.

Best would be to check for a Wind River kernel as this is likely to break on mainline Linux.

Signature · 1 line
error compiling committee.c: too many arguments to function
#4 lore raw
Quoted 4 lines · Avi Kivity <avi <at> redhat.com> writes:

Best would be to check for a Wind River kernel as this is likely to break on mainline Linux.

OK, I see, that's more complicated. We are currently thinking about to upgrade our systems to an up-to-date kernel version. Then this patch is no longer required.