diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-05-06 14:33:01 (GMT) |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-07-11 07:14:03 (GMT) |
commit | 17052f16a51af6d8f4b7eee0631af675ac204f65 (patch) | |
tree | f2fa2f60c38e38ed175897b419ddb7b2df7901b2 /arch/x86/kvm/trace.h | |
parent | 9506d57de3bc8277a4e306e0d439976862f68c6d (diff) | |
download | linux-17052f16a51af6d8f4b7eee0631af675ac204f65.tar.xz |
KVM: emulate: put pointers in the fetch_cache
This simplifies the code a bit, especially the overflow checks.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/trace.h')
-rw-r--r-- | arch/x86/kvm/trace.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h index 33574c9..e850a7d 100644 --- a/arch/x86/kvm/trace.h +++ b/arch/x86/kvm/trace.h @@ -721,10 +721,10 @@ TRACE_EVENT(kvm_emulate_insn, ), TP_fast_assign( - __entry->rip = vcpu->arch.emulate_ctxt.fetch.start; __entry->csbase = kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS); - __entry->len = vcpu->arch.emulate_ctxt._eip - - vcpu->arch.emulate_ctxt.fetch.start; + __entry->len = vcpu->arch.emulate_ctxt.fetch.ptr + - vcpu->arch.emulate_ctxt.fetch.data; + __entry->rip = vcpu->arch.emulate_ctxt._eip - __entry->len; memcpy(__entry->insn, vcpu->arch.emulate_ctxt.fetch.data, 15); |