Add "Mitigation G-2" per AMD's Whitepaper "Software Techniques for
authorbrynet <brynet@openbsd.org>
Mon, 23 Jul 2018 23:25:02 +0000 (23:25 +0000)
committerbrynet <brynet@openbsd.org>
Mon, 23 Jul 2018 23:25:02 +0000 (23:25 +0000)
commit53804715d8fde5e72865af861c39dcb67b54e672
tree89a894ac59981cfc82fda167faf6359a340ac827
parent5a04faeb71440b1f24533a07e5230c7d4655f7da
Add "Mitigation G-2" per AMD's Whitepaper "Software Techniques for
Managing Speculation on AMD Processors"

By setting MSR C001_1029[1]=1, LFENCE becomes a dispatch serializing
instruction.

Tested on AMD FX-4100 "Bulldozer", and Linux guest in SVM vmd(8)

ok deraadt@ mlarkin@
sys/arch/amd64/amd64/identcpu.c
sys/arch/amd64/include/specialreg.h