[PATCH 0/2] KVM: arm64: nv: Expose shadow page tables in debugfs
From: Wei-Lin Chang
Date: Sun Mar 08 2026 - 18:58:12 EST
Hi,
This series exposes shadow page tables in debugfs to improve the
debugability and testability of NV. First we teach the KVM ptdump code
to handle different s2 mmus, then shadow page tables are exposed. This
is gated also behind CONFIG_PTDUMP_STAGE2_DEBUGFS, like the canonical
stage-2 page table.
The file names for the shadow page tables are formatted
0x<vttbr>-0x<vtcr>-s2-{en,dis}abled, which is the most intuitive way of
identifying the s2 mmus but not terribly clear. For now I don't think of
other options that are meaningfully better, any suggestion welcome.
I realized I tend to write long variable and function names, happy to
change if anyone finds it too verbose.
Thanks!
Wei-Lin Chang (2):
KVM: arm64: nv: Expose shadow page tables in debugfs
basic L2 selftest
arch/arm64/include/asm/kvm_host.h | 7 +
arch/arm64/include/asm/kvm_mmu.h | 4 +
arch/arm64/kvm/nested.c | 6 +-
arch/arm64/kvm/ptdump.c | 27 ++
tools/testing/selftests/kvm/Makefile.kvm | 1 +
.../selftests/kvm/arm64/nested_reverse_map.c | 236 ++++++++++++++++++
.../selftests/kvm/include/arm64/processor.h | 28 +++
.../selftests/kvm/lib/arm64/processor.c | 2 +
tools/testing/selftests/kvm/lib/kvm_util.c | 13 +
9 files changed, 323 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/kvm/arm64/nested_reverse_map.c
--
2.43.0