android_kernel_xiaomi_sm8350/arch/arm64/kvm/hyp
James Morse 194240faf6 UPSTREAM: arm64: Use the clearbhb instruction in mitigations
commit 228a26b912287934789023b4132ba76065d9491c upstream.

Future CPUs may implement a clearbhb instruction that is sufficient
to mitigate SpectreBHB. CPUs that implement this instruction, but
not CSV2.3 must be affected by Spectre-BHB.

Add support to use this instruction as the BHB mitigation on CPUs
that support it. The instruction is in the hint space, so it will
be treated by a NOP as older CPUs.

Bug: 215557547
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[ modified for stable: Use a KVM vector template instead of alternatives,
  removed bitmap of mitigations ]
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic48741d6d4e7ad14bcf802ab58b082128c5f5a01
2022-03-17 18:06:46 +01:00
..
debug-sr.c KVM: arm64: nvhe: Save the SPE context early 2021-03-20 10:39:46 +01:00
entry.S
fpsimd.S
hyp-entry.S UPSTREAM: arm64: Use the clearbhb instruction in mitigations 2022-03-17 18:06:46 +01:00
Makefile
switch.c UPSTREAM: arm64: Add percpu vectors for EL1 2022-03-17 18:06:30 +01:00
sysreg-sr.c
tlb.c
vgic-v2-cpuif-proxy.c