NetBSD/src YOfxeou — sys/arch/amd64/amd64 locore.S amd64_trap.S, sys/arch/amd64/include frameasm.h
Two changes in the CPU mitigations:
* Micro-optimize: put every mitigation in the same branch. This removes
two branches in each exc/int return path, and removes all branches in
the syscall return path.
* Modify the SpectreV2 mitigation to be compatible with SpectreV4. I
recently realized that both couldn't be enabled at the same time on
Intel. This is because initially, when there was just SpectreV2, we
could reset the whole IA32_SPEC_CTRL MSR. But then Intel added another
bit in it for SpectreV4, so it isn't right to reset it entirely
anymore. SSBD needs to stay.
UnifiedSplitRaw