Skip to content

Commit b2c6cf7

Browse files
yonghuahwenlingz
authored andcommitted
hv: refine retpoline speculation barriers
Per Section 4.4 Speculation Barriers, in "Retpoline: A Branch Target Inject Mitigation" white paper, "LFENCE instruction limits the speculative execution that a processor implementation can perform around the LFENCE, possibly impacting processor performance,but also creating a tool with which to mitigate speculative-execution side-channel attacks." Tracked-On: #4424 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
1 parent da3d181 commit b2c6cf7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hypervisor/arch/x86/lib/retpoline-thunk.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ __x86_indirect_thunk_\reg:
1212
call 22f
1313
11:
1414
pause
15+
lfence
1516
jmp 11b
1617
22:
1718
mov %\reg, (%rsp)

0 commit comments

Comments
 (0)