X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Farch%2Fx86%2Fkvm%2Ftrace.h;fp=instrumentation%2Fevents%2Flttng-module%2Farch%2Fx86%2Fkvm%2Ftrace.h;h=db7bfe1950b32ef040fbc56c5765a2ac94db6bb1;hb=623d019720d708350ed55bce2b79b04e49604b23;hp=8e71a7f51f5562db7e3727788b9321e01b2c95d7;hpb=1d8abf2fe67af7ade5193fec5f38e7cccbc5441e;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h index 8e71a7f5..db7bfe19 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 #include #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) #include +#endif #include #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) ), @@ -761,6 +773,7 @@ TRACE_EVENT( __entry->gpa_match ? "GPA" : "GVA") ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) #ifdef CONFIG_X86_64 #define host_clocks \ @@ -821,6 +834,7 @@ TRACE_EVENT(kvm_track_tsc, ) #endif /* CONFIG_X86_64 */ +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) */ #endif /* _TRACE_KVM_H */