]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: nv: Expose shadow page tables in debugfs
authorWei-Lin Chang <weilin.chang@arm.com>
Tue, 17 Mar 2026 18:26:38 +0000 (18:26 +0000)
committerMarc Zyngier <maz@kernel.org>
Mon, 23 Mar 2026 10:06:50 +0000 (10:06 +0000)
commit19e15dc73f0fc74eaf63ad9b3a50648450269b4d
tree316aea5d34278676fc4ca79c0a3c705e86586f34
parent204f7c018d76c2488a90fc6681519b8eb6eebb1d
KVM: arm64: nv: Expose shadow page tables in debugfs

Exposing shadow page tables in debugfs improves the debugability and
testability of NV. With this patch a new directory "nested" is created
for each VM created if the host is NV capable. Within the directory each
valid s2 mmu will have its shadow page table exposed as a readable file
with the file name formatted as 0x<vttbr>-0x<vtcr>-s2-{en,dis}abled. The
creation and removal of the files happen at the points when an s2 mmu
becomes valid, or the context it represents change. In the future the
"nested" directory can also hold other NV related information.

This is gated behind CONFIG_PTDUMP_STAGE2_DEBUGFS.

Suggested-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Sebastian Ene <sebastianene@google.com>
Signed-off-by: Wei-Lin Chang <weilin.chang@arm.com>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Link: https://patch.msgid.link/20260317182638.1592507-3-weilin.chang@arm.com
[maz: minor refactor, full 16 chars addresses]
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kvm/nested.c
arch/arm64/kvm/ptdump.c