James Morse 1dd498e5e2 KVM: arm64: Workaround Cortex-A510's single-step and PAC trap errata
Cortex-A510's erratum #2077057 causes SPSR_EL2 to be corrupted when
single-stepping authenticated ERET instructions. A single step is
expected, but a pointer authentication trap is taken instead. The
erratum causes SPSR_EL1 to be copied to SPSR_EL2, which could allow
EL1 to cause a return to EL2 with a guest controlled ELR_EL2.

Because the conditions require an ERET into active-not-pending state,
this is only a problem for the EL2 when EL2 is stepping EL1. In this case
the previous SPSR_EL2 value is preserved in struct kvm_vcpu, and can be
restored.

Cc: stable@vger.kernel.org # 53960faf2b73: arm64: Add Cortex-A510 CPU part definition
Cc: stable@vger.kernel.org
Signed-off-by: James Morse <james.morse@arm.com>
[maz: fixup cpucaps ordering]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220127122052.1584324-5-james.morse@arm.com
2022-02-03 09:22:30 +00:00
..
2021-10-01 13:31:00 +01:00
2021-08-04 16:54:36 +00:00
2021-12-01 00:06:44 +01:00
2021-12-06 16:27:51 +00:00
2022-01-16 16:15:14 +02:00
2020-09-07 15:00:52 +01:00
2021-03-24 20:19:30 +00:00
2021-02-04 13:59:49 +00:00
2021-10-07 09:30:24 +01:00
2022-01-12 16:26:58 -08:00
2021-09-01 15:04:29 -07:00
2021-12-01 00:06:44 +01:00
2021-04-16 16:10:36 -07:00
2021-11-02 22:22:13 -07:00
2021-12-01 00:06:44 +01:00