Commit 4585a359 authored by Fuad Tabba's avatar Fuad Tabba
Browse files

BACKPORT: FROMGIT: KVM: arm64: Handle AIDR_EL1 and REVIDR_EL1 in host for protected VMs

A guest kernel running as a protected VM will fail to boot because it
attempts to access the AIDR_EL1 register. Since commit 17efc1ac
("arm64: Expose AIDR_EL1 via sysfs"), upstream kernels read this
register during early boot.

Similar to MIDR_EL1, which is handled by the host for protected VMs, let
the host handle AIDR_EL1 as well as REVIDR_EL1. However, unlike
MIDR_EL1, AIDR_EL1 and REVIDR_EL1 are trapped by HCR_EL2.TID1.
Therefore, we need to explicitly mark them as handled by the host in hyp
for protected VMs, since pKVM always sets TID1, because it still need to
trap access to SMIDR_EL1.

Bug: 435160610
Bug: 278749606
(cherry picked from commit eaa43934
 https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git

 fixes)
Signed-off-by: default avatarFuad Tabba <tabba@google.com>
[tabba@ changed SYS_REVIDR_EL1 to HOST_HANDLED)
Change-Id: If162571e53ea4f0d68376e887436e2acbe7c3d25
parent a4934614
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment