As I am not a programmer I do not know how to do this (thanks for the heads-up rmarek) nor am I permitted to add to the repos.
MITIGATION G-2 Description: Set an MSR in the processor so that LFENCE is a dispatch serializing instruction and then use LFENCE in code streams to serialize dispatch (LFENCE is faster than RDTSCP which is also dispatch serializing).
This mode of LFENCE may be enabled by setting MSR C001_1029[1]=1.
This is important and covers a variety of boards such as the KGPE-D16, KCMA-D8 and G505s (all the last and best owner controlled x86_64 systems)