Set the HCR_API and HCR_APK bits in the HCR_EL2 when CPUs boot in EL2.
authorkettenis <kettenis@openbsd.org>
Sat, 16 Mar 2024 20:46:28 +0000 (20:46 +0000)
committerkettenis <kettenis@openbsd.org>
Sat, 16 Mar 2024 20:46:28 +0000 (20:46 +0000)
commit32b03391502ca53007d47df3bd83460d36c6cc99
tree246623ab8a20118c82352cc68ecfde20ca6f5202
parent091f637a5964825bc94bebd06624b0aea21eb127
Set the HCR_API and HCR_APK bits in the HCR_EL2 when CPUs boot in EL2.
Otherwise using PAC instructions in EL1 will trigger a trap into EL2
that we don't handle.

ok jsg@, deraadt@
sys/arch/arm64/arm64/locore.S
sys/arch/arm64/include/hypervisor.h