systemtap probe points for Xen hypervisor
How do we probe the Xen hypervisor, while running as the dom0 (which
is the GUI frontend for us, and running as guest)? Since the entry
to hypervisor is controlled, I supposed it will need a patch before
systemtap can be used to probe the Xen hypervisor, right? Or is it
not a logical thing to do?
My target of interest will be to trace/analyze the behavior of the Xen hypervisor, and the domX guest as well.
Thank you for your answer.
Signature · 2 lines
Regards, Peter Teoh
Quoted 1 line · Peter Teoh
How do we probe the Xen hypervisor [...]
I don't know to what extent that's possible. One can already probe the dom0/domU instances, but not the hypervisor per se, AFAIK.
- FChE
Quoted 9 lines · Peter Teoh
How do we probe the Xen hypervisor, while running as the dom0 (which
is the GUI frontend for us, and running as guest)? Since the entry
to hypervisor is controlled, I supposed it will need a patch before
systemtap can be used to probe the Xen hypervisor, right? Or is it
not a logical thing to do?My target of interest will be to trace/analyze the behavior of the Xen hypervisor, and the domX guest as well.
Ooops....I just saw this in Usenix 2007 paper: Xenprobes: userspace
probing framework. So far, no download yet. but I don't see
much of a difference in feature from systemtap, or perhaps I am totally wrong?
Signature · 2 lines
Regards, Peter Teoh
Quoted 6 lines · Peter Teoh
Quoted 2 lines
My target of interest will be to trace/analyze the behavior of the Xen hypervisor, and the domX guest as well.
Ooops....I just saw this in Usenix 2007 paper: Xenprobes: userspace probing framework. So far, no download yet. but I don't see much of a difference in feature from systemtap [...]
The xenprobes paper doesn't cite systemtap, only kprobes, which sounds appropriate. Xenprobes does not appear to probe the hypervisor per se either. It simply uses hypervisor-provided shortcuts to permit dom0 to probe domU siblings/subordinates, using algorithms and API styles right out of k*probes.
- FChE
Xenprobes is a low-level mechanism for debugging guest kernels from a specialized user-space debugging application running on dom0. This is the same in its essential character to the normal procedure of debugging one normal user process from another user process (i.e. a debugger). A guest kernel is equivalent to a user process, and a Xenprobes-based debugger equivalent to a process debugger based on kernel facilities for controlling another process. For non-hypervisor virtualization systems such as Linux's KVM, the same mapping applies even more directly, as there guest kernels are actual user processes and the debugger controls them via the host kernel directly (as a process debugger uses the kernel directly) without the separate steps through the hypervisor layer.
Xenprobes is thus directly analogous to a facility developed for Linux kernels called "uprobes", which does the same "kprobes-style" breakpoint insertion techniques for user processes. (kprobes, uprobes, and xenprobes share an essential machine-specific implementation technique, but they apply it in three disparate contexts.)
Systemtap is a high level tool that uses uprobes among many other low-level building blocks in its (still developing) support for instrumentation of user processes. As other debugging tools are developed they will build on the same low-level facilities that Systemtap uses. Once such things get to be well-developed, it will be straightforward to adapt them to similar low-level facilities that operate in different contexts. i.e. things like xenprobes. It is up those developing Xen and those developing things like Xenprobes, to integrate the hooks for such facilities, and then support the facilities and them make available.
Separately, Systemtap supports (now) self-instrumentation by Linux kernels, using kprobes. You can do that on a dom0 or domU Linux kernel just like with any other. But that is self-instrumentation, while Xenprobes is purely about instrumentation from the outside (which is just like instrumentation of user processes).
Thanks,
Roland