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]

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


I have been working on instrumenting kvm. The arguments for one of the tracepoints has changed.In RHEL-6 kernel:

kernel.trace("kvm_exit") $exit_reason:unsigned int $guest_rip:long unsigned int

In Fedora-15 kernel:

kernel.trace("kvm_exit") $exit_reason:unsigned int $vcpu:struct kvm_vcpu* $isa:u32


The $guest_rip is used in https://github.com/wcohen/qemu_systemtap/blob/master/guest_exits.stp to point out which instructions in the guests are causing vm_exits. I would like to make this script work on Fedora without resorting to guru mode. The following link shows kvm_rip_read(vcpu) being used get the value:

http://lxr.linux.no/#linux+v3.0.4/arch/x86/kvm/trace.h#L187

The kvm_rip_read() function is not in general include file; it is in arch/x86/kvm/kvm_cache_regs.h. Another complication is that   VCPU_REGS_RIP varies depending on CONFIG_X86_64:

http://lxr.linux.no/#linux+v3.0.4/arch/x86/include/asm/kvm_host.h#L120

Any suggestions on how to best handle this?

-Will


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