From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76B703368AD for ; Sun, 8 Mar 2026 23:19:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773011967; cv=none; b=CjFxg1UImcK/y+iUftTBivd4qJ0I2UgLymp2g8h872VSgnxoXwo5pOUubqPZwB/bSytXgoLSrCOaA5uM+ZD3YFQOqDIBedwzvDqxQIDtCHriV6cgzOyZMF9vh1IeR4EjI3xlEHTG3CKkgSprELKPRRFdav6YHeLPReHyBzh9k9g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773011967; c=relaxed/simple; bh=YIn7dplVfHKPPksfmYcZc0WWNVrlXPZL31yKW3CaSiY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gABZ1XFmum/Mn9hw0F9fB1b0qEwf1LpSpl/Xye9T5ZibVA9waImYo75nDdZZixlODXmTA3HoU1U26PbWQuXMz8G3PBj3G+uEc6AAMGIofQYO2YaZ2c+LKytROblpmojy5QsALxCpX0DFAMSWLlqcJfxTFErS5mqmu+cr/kcWGx0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 84B9D1D13; Sun, 8 Mar 2026 16:19:19 -0700 (PDT) Received: from workstation-e142269.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 211A13F5CA; Sun, 8 Mar 2026 16:19:24 -0700 (PDT) From: Wei-Lin Chang To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Marc Zyngier , Oliver Upton , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon Subject: [PATCH RESEND 0/2] KVM: arm64: nv: Expose shadow page tables in debugfs Date: Sun, 8 Mar 2026 23:18:27 +0000 Message-ID: <20260308231829.864983-1-weilin.chang@arm.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit [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-0x-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