Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] [PATCH lttng-modules] correctly version kvm events to build against v3.0 kernel
Date: Fri, 21 Feb 2014 20:40:59 +0000 (UTC)	[thread overview]
Message-ID: <1293227095.28674.1393015259118.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <5307B458.6000007@suse.de>

Merged with a tiny whitespace fix, into both stable-2.3 and master.

Thanks!

Mathieu

----- Original Message -----
> From: "Tony Jones" <tonyj@suse.de>
> To: lttng-dev at lists.lttng.org
> Cc: "Mathieu Desnoyers" <mathieu.desnoyers at efficios.com>
> Sent: Friday, February 21, 2014 3:17:28 PM
> Subject: [PATCH lttng-modules] correctly version kvm events to build against v3.0 kernel
> 
> Cleanly build against v3.0 kernel.  I didn't add versioning for mainline
> commit 0d460ffc as it's build compatible.
> 
> Signed-off-by: Tony Jones <tonyj at suse.de>
> ---
> 
> diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
> b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
> index 5eec169..7fc1f9c 100644
> --- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
> +++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
> @@ -4,7 +4,9 @@
>  #include <linux/tracepoint.h>
>  #include <asm/vmx.h>
>  #include <asm/svm.h>
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
>  #include <asm/clocksource.h>
> +#endif
>  #include <linux/version.h>
>  #include <../arch/x86/kvm/lapic.h>
>  #include <../arch/x86/kvm/kvm_cache_regs.h>
> @@ -714,13 +716,23 @@ TRACE_EVENT(kvm_emulate_insn,
>  		),
>  
>  	TP_fast_assign(
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
> +		tp_assign(rip, vcpu->arch.emulate_ctxt.decode.fetch.start)
> +	  	tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
> +		tp_assign(len, vcpu->arch.emulate_ctxt.decode.eip
> +			       - vcpu->arch.emulate_ctxt.decode.fetch.start)
> +		tp_memcpy(insn,
> +		       vcpu->arch.emulate_ctxt.decode.fetch.data,
> +		       15)
> +#else
>  		tp_assign(rip, vcpu->arch.emulate_ctxt.fetch.start)
> -	  tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
> +	  	tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
>  		tp_assign(len, vcpu->arch.emulate_ctxt._eip
>  			       - vcpu->arch.emulate_ctxt.fetch.start)
>  		tp_memcpy(insn,
>  		       vcpu->arch.emulate_ctxt.fetch.data,
>  		       15)
> +#endif
>  		tp_assign(flags, kei_decode_mode(vcpu->arch.emulate_ctxt.mode))
>  		tp_assign(failed, failed)
>  		),
> @@ -784,6 +796,7 @@ TRACE_EVENT(kvm_write_tsc_offset,
>  )
>  #endif
>  
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
>  #ifdef CONFIG_X86_64
>  
>  #define host_clocks					\
> @@ -844,6 +857,7 @@ TRACE_EVENT(kvm_track_tsc,
>  )
>  
>  #endif /* CONFIG_X86_64 */
> +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) */
>  
>  #endif /* _TRACE_KVM_H */
>  
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



      reply	other threads:[~2014-02-21 20:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 20:17 Tony Jones
2014-02-21 20:40 ` Mathieu Desnoyers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1293227095.28674.1393015259118.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox