diff options
| author | Vincent Donnefort <vdonnefort@google.com> | 2026-10-01 15:30:00 +0100 |
|---|---|---|
| committer | Marc Zyngier <maz@kernel.org> | 2026-10-03 10:09:09 +0100 |
| commit | 92866564020c2fbede7f77f5957a75f11f931d53 (patch) | |
| tree | e3e8c312d6da97fa063ea06d76979c6ea72fe54d /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 604aaeb39521ef70f56c036dc065b133c85f06aa (diff) | |
KVM: arm64: Add hyp_printk event to nVHE/pKVM hyp
Create an event to allow developers to log pretty much anything into the
hypervisor tracing buffer with trace_hyp_printk(), just like the kernel
tracing has the function trace_printk().
#include <asm/kvm_hypevents.h>
trace_hyp_printk("foobar");
trace_hyp_printk("foo=%d", foo);
trace_hyp_printk("foo=%d bar=0x%016llx", foo, bar);
To ensure writing into the tracing buffer is fast, store the string
format into a kernel-accessible ELF section. The hypervisor only has to
write into the event the string ID, which is the delta between the
hyp_string_fmt and the start of the ELF section.
The string format is parsed by the kernel. It is therefore not possible
to dereference hypervisor pointers and the format specifier %s is not
supported. Also the %p specifiers will fail to find the hypervisor
function.
To not waste tracing buffer data, use a dynamic size. Each argument is 8
bytes.
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20261001143000.3371786-5-vdonnefort@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
