Commit 2336876d authored by Oliver Upton's avatar Oliver Upton Committed by Will Deacon
Browse files

UPSTREAM: KVM: arm64: Wire up CP15 feature registers to their AArch64 equivalents



KVM currently does not trap ID register accesses from an AArch32 EL1.
This is painful for a couple of reasons. Certain unimplemented features
are visible to AArch32 EL1, as we limit PMU to version 3 and the debug
architecture to v8.0. Additionally, we attempt to paper over
heterogeneous systems by using register values that are safe
system-wide. All this hard work is completely sidestepped because KVM
does not set TID3 for AArch32 guests.

Fix up handling of CP15 feature registers by simply rerouting to their
AArch64 aliases. Punt setting HCR_EL2.TID3 to a later change, as we need
to fix up the oddball CP10 feature registers still.

Signed-off-by: default avatarOliver Upton <oupton@google.com>
Reviewed-by: default avatarReiji Watanabe <reijiw@google.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220503060205.2823727-4-oupton@google.com


(cherry picked from commit e6519766)
Signed-off-by: default avatarWill Deacon <willdeacon@google.com>
Bug: 233587962
Bug: 233588291
Change-Id: Ifbf403ab93fa8307262720c5e881b70f9bb55492
parent 0e563f47
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment