xen/arm32: Invalidate icache on guest exist for Cortex-A15
authorJulien Grall <julien.grall@linaro.org>
Fri, 2 Feb 2018 14:19:24 +0000 (14:19 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 2 Feb 2018 19:35:06 +0000 (11:35 -0800)
commit665c4b6aa79eb21b1aada9f7f98fb5cb7f03743a
tree4cd9a3edc2b871df06e0543022f937f554b0ca16
parent05e0690d03dc6177e614e060ae78001d4f2abde2
xen/arm32: Invalidate icache on guest exist for Cortex-A15

In order to avoid aliasing attacks against the branch predictor on
Cortex A-15, let's invalidate the BTB on guest exit, which can only be
done by invalidating the icache (with ACTLR[0] being set).

We use the same hack as for A12/A17 to perform the vector decoding.

This is based on Linux patch from the kpti branch in [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm32/entry.S
xen/arch/arm/cpuerrata.c