Commit 096d4582 authored by Will Deacon's avatar Will Deacon Committed by Will Deacon
Browse files

UPSTREAM: KVM: arm64: Initialise hypervisor copies of host symbols unconditionally



[ Upstream commit 6c165223 ]

The nVHE object at EL2 maintains its own copies of some host variables
so that, when pKVM is enabled, the host cannot directly modify the
hypervisor state. When running in normal nVHE mode, however, these
variables are still mirrored at EL2 but are not initialised.

Initialise the hypervisor symbols from the host copies regardless of
pKVM, ensuring that any reference to this data at EL2 with normal nVHE
will return a sensibly initialised value.

Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: default avatarVincent Donnefort <vdonnefort@google.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221110190259.26861-16-will@kernel.org


Stable-dep-of: e8162521 ("KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV2/3 to protected VMs")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit 361b02e6)
Signed-off-by: default avatarWill Deacon <willdeacon@google.com>
Bug: 278750296
Change-Id: Ifbc0888f5769ddfe4f1028f5b29a2a066f027591
parent aefa5470
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment