Spectre v2 — CVE-2017-5715
For Spectre v2, the common mitigation is to use retpolines.
Linux has an implementation since at least January 2018 and so did Microsoft’s Windows, so they were able to mitigate this vector on day one.
This technique is also used in OpenBSD on i386/amd64 since April 2018, and landed in OpenBSD 6.4 in October 2018.
For ARM, OpenBSD already invalidated the branch predictor cache on every context switch, so it was simply a matter of invalidating it on page-fault in kernel address space on supported firmware too in January 2018,