CVSROOT:        /cvs
Module name:    src
Changes by:     patr...@cvs.openbsd.org 2022/12/10 03:13:58

Modified files:
        sys/arch/arm64/arm64: cpu.c exception.S genassym.cf pmap.c 
                              trampoline.S 
        sys/arch/arm64/include: cpu.h 
        sys/dev/fdt    : psci.c pscivar.h 

Log message:
Mitigate Spectre-BHB by using core-specific trampoline vectors.  On some cores
Spectre-BHB can be mitigated by using a loop that branches a number of times.
For cores where this does not suffice, or where Spectre-V2 needs to be handled
as well, try and call into a new PSCI function that mitigates both Spectre-V2
and Spectre-BHB.  Some newer machines, which might not be in anyone's hands
yet, have an instruction (CLRBHB) that clears the BHB.  If ECBHB is set, the
BHB isn't vulnerable.  If we have CSV2_3/HCXT, it's not vulnerable at all.

No visible performance dropoff on a MacchiatoBin (4xA72) or Lenovo x13s (4xA78C+
4xX1C), but around 2-3% on a LX2K (16xA72) and RK3399 (4xA53+2xA72).

ok kettenis@

Reply via email to