]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Add PKVM_DISABLE_STAGE2_ON_PANIC
authorVincent Donnefort <vdonnefort@google.com>
Mon, 9 Mar 2026 16:25:05 +0000 (16:25 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 11 Mar 2026 08:51:16 +0000 (08:51 +0000)
commit9019e82c7e46c03c37e8b108473d02b543222d9f
treede392428634637f7b8ccf2d2e8c32dd72b37cac0
parenta717943d8ecc0e533c581bf04473b50f6f17f2cb
KVM: arm64: Add PKVM_DISABLE_STAGE2_ON_PANIC

On NVHE_EL2_DEBUG, when using pKVM, the host stage-2 is relaxed to grant
the kernel access to the stacktrace, hypervisor bug table and text to
symbolize addresses. This is unsafe for production. In preparation for
adding more debug options to NVHE_EL2_DEBUG, decouple the stage-2
relaxation into a separate option.

While at it, rename PROTECTED_NVHE_STACKTRACE into PKVM_STACKTRACE,
following the same naming scheme as PKVM_DISABLE_STAGE2_ON_PANIC.

Reviewed-by: Kalesh Singh <kaleshsingh@google.com>
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Link: https://patch.msgid.link/20260309162516.2623589-20-vdonnefort@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/Kconfig
arch/arm64/kvm/handle_exit.c
arch/arm64/kvm/hyp/nvhe/host.S
arch/arm64/kvm/hyp/nvhe/stacktrace.c
arch/arm64/kvm/stacktrace.c