This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Best way getting guest_rip from newer versions of kernel.trace("kvm_exit")?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]