On Thu, 2018-01-25 at 18:11 -0800, Liran Alon wrote: > > P.S: > It seems to me that all these issues could be resolved completely at > hardware in future CPUs if BTB/BHB/RSB entries were tagged with > prediction-mode (or similar metadata). It will be nice if Intel/AMD > could share if that is the planned long-term solution instead of > IBRS-all-the-time. IBRS-all-the-time is tagging with the ring and VMX root/non-root mode, it seems. That much they could slip into the upcoming generation of CPUs. And it's supposed to be fast¹; none of the dirty hacks in microcode that they needed to implement the first-generation IBRS. But we still need to tag with ASID/VMID and do proper flushing for those, before we can completely ditch the need to do IBPB at the right times. Reading between the lines, I don't think they could add *that* without stopping the fabs for a year or so while they go back to the drawing board. But yes, I sincerely hope they *are* planning to do it, and expose a 'SPECTRE_NO' bit in IA32_ARCH_CAPABILITIES, as soon as is humanly possible. ¹ Fast enough that we'll want to use it and ALTERNATIVE out the    retpolines.