arm64: entry: Make the kpti trampoline's kpti sequence optional

commit c47e4d04ba0f1ea17353d85d45f611277507e07a upstream.

Spectre-BHB needs to add sequences to the vectors. Having one global
set of vectors is a problem for big/little systems where the sequence
is costly on cpus that are not vulnerable.

Making the vectors per-cpu in the style of KVM's bh_harden_hyp_vecs
requires the vectors to be generated by macros.

Make the kpti remapping of the kernel optional so the macros can be
used without kpti.

Change-Id: I4dc98f5af303700bd3ae02eb80e17772f52fde36
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 9e056623dfc538909ed2a914f70a66d68ec71ec3
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
1 file changed