xen/arm64: Implement branch predictor hardening for affected Cortex-A CPUs
authorJulien Grall <julien.grall@linaro.org>
Tue, 16 Jan 2018 14:23:37 +0000 (14:23 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 17 Jan 2018 21:45:54 +0000 (13:45 -0800)
commite730f8e41e8537f1db9770b9464f9523c28857b9
tree148058c7827db6042ae5c4fc683f4913676ee434
parent4c4fddc166cf528aca49540bcc9ee4f196b01dac
xen/arm64: Implement branch predictor hardening for affected Cortex-A CPUs

Cortex-A57, A72, A73 and A75 are susceptible to branch predictor
aliasing and can theoritically be attacked by malicious code.

This patch implements a PSCI-based mitigation for these CPUs when
available. The call into firmware will invalidate the branch predictor
state, preventing any malicious entries from affection other victim
contexts.

Ported from Linux git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
branch kpti.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
This is part of XSA-254.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm64/bpi.S
xen/arch/arm/cpuerrata.c