arm64: entry: Add vectors that have the bhb mitigation sequences
authorJames Morse <james.morse@arm.com>
Thu, 18 Nov 2021 13:59:46 +0000 (13:59 +0000)
committerJames Morse <james.morse@arm.com>
Wed, 16 Feb 2022 13:16:08 +0000 (13:16 +0000)
commitba2689234be92024e5635d30fe744f4853ad97db
treea036f6b212587807ad27974073aacc854bfd05c8
parentaff65393fa1401e034656e349abd655cfe272de0
arm64: entry: Add vectors that have the bhb mitigation sequences

Some CPUs affected by Spectre-BHB need a sequence of branches, or a
firmware call to be run before any indirect branch. This needs to go
in the vectors. No CPU needs both.

While this can be patched in, it would run on all CPUs as there is a
single set of vectors. If only one part of a big/little combination is
affected, the unaffected CPUs have to run the mitigation too.

Create extra vectors that include the sequence. Subsequent patches will
allow affected CPUs to select this set of vectors. Later patches will
modify the loop count to match what the CPU requires.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
arch/arm64/include/asm/assembler.h
arch/arm64/include/asm/vectors.h [new file with mode: 0644]
arch/arm64/kernel/entry.S
arch/arm64/kernel/proton-pack.c
include/linux/arm-smccc.h