From: Mathieu Desnoyers Date: Thu, 21 Aug 2014 15:15:50 +0000 (-0400) Subject: Update kvm instrumentation: compile on 3.17-rc1 X-Git-Tag: v2.6.0-rc1~58 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=458c2022e992c057bd21d02e4c77bcc7d4d6cd6c;p=lttng-modules.git Update kvm instrumentation: compile on 3.17-rc1 Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h index 23548840..3c299c58 100644 --- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h +++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h @@ -724,7 +724,7 @@ TRACE_EVENT(kvm_emulate_insn, tp_memcpy(insn, vcpu->arch.emulate_ctxt.decode.fetch.data, 15) -#else +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) tp_assign(rip, vcpu->arch.emulate_ctxt.fetch.start) tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS)) tp_assign(len, vcpu->arch.emulate_ctxt._eip @@ -732,6 +732,16 @@ TRACE_EVENT(kvm_emulate_insn, tp_memcpy(insn, vcpu->arch.emulate_ctxt.fetch.data, 15) +#else + tp_assign(rip, vcpu->arch.emulate_ctxt._eip - + (vcpu->arch.emulate_ctxt.fetch.ptr - + vcpu->arch.emulate_ctxt.fetch.data)) + tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS)) + tp_assign(len, vcpu->arch.emulate_ctxt.fetch.ptr - + vcpu->arch.emulate_ctxt.fetch.data) + 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)