[PATCH v1] KVM: arm64: Disable stage-2 ptdump of pKVM
Vincent Donnefort
vdonnefort at google.com
Thu Sep 17 01:15:10 PDT 2026
With pKVM enabled, guest stage-2 page tables are owned and managed by
the hypervisor. The host's pgt is uninitialised.
Skip registering stage-2 ptdump debugfs files when protected KVM is
enabled.
Fixes: 7c4f73548ed1 ("KVM: arm64: Register ptdump with debugfs on guest creation")
Signed-off-by: Vincent Donnefort <vdonnefort at google.com>
---
arch/arm64/kvm/ptdump.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/kvm/ptdump.c b/arch/arm64/kvm/ptdump.c
index 69899797dbad..87e5e7a4e612 100644
--- a/arch/arm64/kvm/ptdump.c
+++ b/arch/arm64/kvm/ptdump.c
@@ -300,6 +300,10 @@ void kvm_nested_s2_ptdump_remove_debugfs(struct kvm_s2_mmu *mmu)
void kvm_s2_ptdump_create_debugfs(struct kvm *kvm)
{
+ /* pKVM handles the page-tables in the hypervisor */
+ if (is_protected_kvm_enabled())
+ return;
+
debugfs_create_file("stage2_page_tables", 0400, kvm->debugfs_dentry,
&kvm->arch.mmu, &kvm_ptdump_guest_fops);
debugfs_create_file("ipa_range", 0400, kvm->debugfs_dentry,
base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
--
2.55.0.1082.g2b9226bbc0-goog
More information about the linux-arm-kernel
mailing list