linux/arch/arm64/kvm/hyp
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 # 53960faf2b: 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
..
include KVM: arm64: Workaround Cortex-A510's single-step and PAC trap errata 2022-02-03 09:22:30 +00:00
nvhe RISCV: 2022-01-16 16:15:14 +02:00
vhe KVM/arm64 updates for Linux 5.16 2022-01-07 10:42:19 -05:00
aarch32.c KVM: arm64: Move kvm_vcpu_trap_il_is32bit into kvm_skip_instr32() 2020-11-10 08:34:24 +00:00
entry.S KVM: arm64: Save/restore MTE registers 2021-06-22 14:08:05 +01:00
exception.c KVM: arm64: Use shadow SPSR_EL1 when injecting exceptions on !VHE 2022-01-24 09:39:03 +00:00
fpsimd.S KVM: arm64: Remove unused __sve_save_state 2021-11-22 16:01:39 +00:00
hyp-constants.c KVM: arm64: Generate hyp_constants.h for the host 2021-12-06 08:37:03 +00:00
hyp-entry.S KVM: arm64: Extract ESR_ELx.EC only 2021-11-08 10:41:12 +00:00
Makefile KVM: arm64: Move host EL1 code out of hyp/ directory 2021-12-06 08:37:03 +00:00
pgtable.c KVM: arm64: pkvm: Use the mm_ops indirection for cache maintenance 2022-01-14 14:12:23 +00:00
vgic-v2-cpuif-proxy.c KVM: arm64: Remove hyp_symbol_addr 2021-01-23 14:01:00 +00:00
vgic-v3-sr.c KVM: arm64: vgic-v3: Restrict SEIS workaround to known broken systems 2022-01-22 11:38:16 +00:00