summaryrefslogtreecommitdiff
path: root/scripts/Makefile.vmlinux_o
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2024-05-28 13:06:31 +0300
committerMarc Zyngier <maz@kernel.org>2024-05-30 19:36:22 +0300
commit41011e2de3480f9adb6420b35b67628b2d903355 (patch)
tree4b26fc2e9f1f5dc5673d23009dbfea7651a75ab0 /scripts/Makefile.vmlinux_o
parentc92e8b9eacebb4060634ebd9395bba1b29aadc68 (diff)
downloadlinux-41011e2de3480f9adb6420b35b67628b2d903355.tar.xz
KVM: arm64: nv: Fix relative priorities of exceptions generated by ERETAx
ERETAx can fail in multiple ways: (1) ELR_EL2 points lalaland (2) we get a PAC failure (3) SPSR_EL2 has the wrong mode (1) is easy, as we just let the CPU do its thing and deliver an Instruction Abort. However, (2) and (3) are interesting, because the PAC failure priority is way below that of the Illegal Execution State exception. Which means that if we have detected a PAC failure (and that we have FPACCOMBINE), we must be careful to give priority to the Illegal Execution State exception, should one be pending. Solving this involves hoisting the SPSR calculation earlier and testing for the IL bit before injecting the FPAC exception. In the extreme case of a ERETAx returning to an invalid mode *and* failing its PAC check, we end up with an Instruction Abort (due to the new PC being mangled by the failed Auth) *and* PSTATE.IL being set. Which matches the requirements of the architecture. Whilst we're at it, remove a stale comment that states the obvious and only confuses the reader. Fixes: 213b3d1ea161 ("KVM: arm64: nv: Handle ERETA[AB] instructions") Reviewed-by: Joey Gouly <joey.gouly@arm.com> Reviewed-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20240528100632.1831995-2-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'scripts/Makefile.vmlinux_o')
0 files changed, 0 insertions, 0 deletions