[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <175093722839.181610.1798670653973681500.b4-ty@kernel.org>
Date: Thu, 26 Jun 2025 12:27:18 +0100
From: Marc Zyngier <maz@...nel.org>
To: Oliver Upton <oliver.upton@...ux.dev>,
Joey Gouly <joey.gouly@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Zenghui Yu <yuzenghui@...wei.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Quentin Perret <qperret@...gle.com>
Cc: Mostafa Saleh <smostafa@...gle.com>,
linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: arm64: Don't free hyp pages with pKVM on GICv2
On Thu, 26 Jun 2025 10:10:14 +0000, Quentin Perret wrote:
> Marc reported that enabling protected mode on a device with GICv2
> doesn't fail gracefully as one would expect, and leads to a host
> kernel crash.
>
> As it turns out, the first half of pKVM init happens before the vgic
> probe, and so by the time we find out we have a GICv2 we're already
> committed to keeping the pKVM vectors installed at EL2 -- pKVM rejects
> stub HVCs for obvious security reasons. However, the error path on KVM
> init leads to teardown_hyp_mode() which unconditionally frees hypervisor
> allocations (including the EL2 stacks and per-cpu pages) under the
> assumption that a previous cpu_hyp_uninit() execution has reset the
> vectors back to the stubs, which is false with pKVM.
>
> [...]
Applied to fixes, thanks!
[1/1] KVM: arm64: Don't free hyp pages with pKVM on GICv2
commit: 0e02219f9cf4f0c0aa3dbf3c820e6612bf3f0c8c
Cheers,
M.
--
Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists