[PATCH RESEND 0/2] KVM: arm64: nv: Expose shadow page tables in debugfs

From: Wei-Lin Chang

Date: Sun Mar 08 2026 - 19:19:34 EST


[sorry for the resend, I generated the cover letter with the wrong
commits previously, I should automate this :P]

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: ptdump: Make KVM ptdump code s2 mmu aware
KVM: arm64: nv: Expose shadow page tables in debugfs

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 | 60 ++++++++++++++++++++++---------
4 files changed, 60 insertions(+), 17 deletions(-)

--
2.43.0