As a way for machines without the speculation MSR to thwart
the speculation engine (along with the stuffing of RSBs).
Orabug:
27344012
CVE:CVE-2017-5715
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
testl $SPEC_CTRL_IBRS_INUSE, use_ibrs
jz 7f
__ASM_ENABLE_IBRS
+ jmp 20f
7:
+ lfence
+20:
.endm
.macro ENABLE_IBRS_CLOBBER
testl $SPEC_CTRL_IBRS_INUSE, use_ibrs
jz 11f
__ASM_ENABLE_IBRS_CLOBBER
+ jmp 21f
11:
+ lfence
+21:
.endm
.macro ENABLE_IBRS_SAVE_AND_CLOBBER save_reg:req