]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: Add tracing capability for the nVHE/pKVM hyp
authorVincent Donnefort <vdonnefort@google.com>
Mon, 9 Mar 2026 16:25:09 +0000 (16:25 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 11 Mar 2026 08:51:16 +0000 (08:51 +0000)
commit680a04c333fa29bf92007efe11431be005e8c4bb
treea6fa664e97f221c89b7cc3de0d4cfa31974ad974
parent4cdf8dec8c115d9531f80519db69846c32c580a5
KVM: arm64: Add tracing capability for the nVHE/pKVM hyp

There is currently no way to inspect or log what's happening at EL2
when the nVHE or pKVM hypervisor is used. With the growing set of
features for pKVM, the need for tooling is more pressing. And tracefs,
by its reliability, versatility and support for user-space is fit for
purpose.

Add support to write into a tracefs compatible ring-buffer. There's no
way the hypervisor could log events directly into the host tracefs
ring-buffers. So instead let's use our own, where the hypervisor is the
writer and the host the reader.

Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Link: https://patch.msgid.link/20260309162516.2623589-24-vdonnefort@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/kvm_hyptrace.h [new file with mode: 0644]
arch/arm64/kvm/Kconfig
arch/arm64/kvm/hyp/include/nvhe/trace.h [new file with mode: 0644]
arch/arm64/kvm/hyp/nvhe/Makefile
arch/arm64/kvm/hyp/nvhe/hyp-main.c
arch/arm64/kvm/hyp/nvhe/trace.c [new file with mode: 0644]