mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: arm64: nv: Expose shadow page tables in debugfs
@ 2026-03-08 22:56 Wei-Lin Chang
  2026-03-08 22:57 ` [PATCH 1/2] KVM: arm64: ptdump: Make KVM ptdump code s2 mmu aware Wei-Lin Chang
  2026-03-08 22:57 ` [PATCH 2/2] KVM: arm64: nv: Expose shadow page tables in debugfs Wei-Lin Chang
  0 siblings, 2 replies; 3+ messages in thread
From: Wei-Lin Chang @ 2026-03-08 22:56 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm, linux-kernel
  Cc: Marc Zyngier, Oliver Upton, Joey Gouly, Suzuki K Poulose,
	Zenghui Yu, Catalin Marinas, Will Deacon

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-08 22:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-08 22:56 [PATCH 0/2] KVM: arm64: nv: Expose shadow page tables in debugfs Wei-Lin Chang
2026-03-08 22:57 ` [PATCH 1/2] KVM: arm64: ptdump: Make KVM ptdump code s2 mmu aware Wei-Lin Chang
2026-03-08 22:57 ` [PATCH 2/2] KVM: arm64: nv: Expose shadow page tables in debugfs Wei-Lin Chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®