lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* [lttng-dev] Unexport of kvm_x86_ops vs tracer modules
@ 2022-04-08 15:36 Mathieu Desnoyers via lttng-dev
  2022-04-08 16:24 ` Paolo Bonzini via lttng-dev
  0 siblings, 1 reply; 9+ messages in thread
From: Mathieu Desnoyers via lttng-dev @ 2022-04-08 15:36 UTC (permalink / raw)
  To: Paolo Bonzini, Sean Christopherson; +Cc: lttng-dev, rostedt, kvm

Hi Sean, Hi Paolo,

I have a question regarding a unexport of kvm_x86_ops that made its
way into 5.18-rc (commit dfc4e6ca04 ("KVM: x86: Unexport kvm_x86_ops").
This is in the context of tracing. Especially, LTTng implements probes
for x86 kvm events, e.g. x86 kvm_exit. It receives a struct kvm_vcpu *
as parameter, and uses kvm_x86_ops.get_exit_info() to translate this
into meaningful fields.

LTTng is an out of tree kernel module, which currently relies on the export.
Indeed, arch/x86/kvm/x86.c exports a set of tracepoints to kernel modules, e.g.:

EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_entry)

But any probe implementation hooking on that tracepoint would need kvm_x86_ops
to translate the struct kvm_vcpu * into meaningful tracing data.

I could work-around this on my side in ugly ways, but I would like to discuss
how kernel module tracers are expected to implement kvm events probes without
the kvm_x86_ops symbol ? Perhaps there is an alternative way to convert the
fields in this structure to meaningful information without using the
kvm_x86_ops callbacks that I am not aware of ?

The LTTng kernel tracer uses get_exit_info() and get_segment_base() callbacks
from kvm_x86_ops.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-26  6:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08 15:36 [lttng-dev] Unexport of kvm_x86_ops vs tracer modules Mathieu Desnoyers via lttng-dev
2022-04-08 16:24 ` Paolo Bonzini via lttng-dev
2022-04-08 18:06   ` Mathieu Desnoyers via lttng-dev
2022-04-25 13:00     ` Mathieu Desnoyers via lttng-dev
2022-04-25 13:28       ` Paolo Bonzini via lttng-dev
2022-04-25 14:04     ` Steven Rostedt via lttng-dev
2022-04-25 16:02       ` Mathieu Desnoyers via lttng-dev
2022-04-25 19:13         ` Steven Rostedt via lttng-dev
2022-04-26  6:36         ` Paolo Bonzini via lttng-dev

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 NNTP newsgroup(s).