public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: William Cohen <wcohen@redhat.com>
Cc: SystemTAP <systemtap@sources.redhat.com>
Subject: Re: Best way getting guest_rip from newer versions of kernel.trace("kvm_exit")?
Date: Fri, 23 Sep 2011 19:17:00 -0000	[thread overview]
Message-ID: <y0m4o03t6el.fsf@fche.csb> (raw)
In-Reply-To: <4E7CAD85.3080902@redhat.com> (William Cohen's message of "Fri, 23 Sep 2011 12:02:13 -0400")

William Cohen <wcohen@redhat.com> writes:

> [...]
> In Fedora-15 kernel:
> kernel.trace("kvm_exit") $exit_reason:unsigned int $vcpu:struct kvm_vcpu* $isa:u32
> [...]

We almost certainly wouldn't want to call kvm_rip_read(), even if we could.
How about ...

probe kvm.exit = kernel.trace("kvm_exit") {
  if (@defined($guest_rip)) guest_rip = $guest_rip
  else if (@defined($vcpu)) guest_rip = $vcpu->arch.regs[%{VCPU_REGS_RIP%}]
  ...
}

- FChE

      reply	other threads:[~2011-09-23 19:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-23 16:02 William Cohen
2011-09-23 19:17 ` Frank Ch. Eigler [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=y0m4o03t6el.fsf@fche.csb \
    --to=fche@redhat.com \
    --cc=systemtap@sources.redhat.com \
    --cc=wcohen@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).