On 13/01/2018 11:27, Woodhouse, David wrote: >> + * FIXME: this is only needed until SPEC_CTRL is supported >> + * by upstream Linux in cpufeatures, then it can be replaced >> + * with static_cpu_has. > And I already shouted at Peter yesterday about static_cpu_has(). I > refer you to my previous rant on that :) I saw that rent and I agree---but your rant was about lfence, here I'm not proposing to remove any lfences once KVM uses static_cpu_has: + /* + * Speculative execution past the above wrmsrl might encounter + * an indirect branch and use guest-controlled contents of the + * indirect branch predictor; block it. + */ + asm("lfence"); No mention of static_cpu_has here. :) Paolo