This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Best way getting guest_rip from newer versions of kernel.trace("kvm_exit")?
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: William Cohen <wcohen at redhat dot com>
- Cc: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Fri, 23 Sep 2011 15:17:38 -0400
- Subject: Re: Best way getting guest_rip from newer versions of kernel.trace("kvm_exit")?
- References: <4E7CAD85.3080902@redhat.com>
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