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>
This commit is contained in:
Yonghua Huang 2020-02-24 20:59:37 +08:00 committed by wenlingz
parent da3d181f62
commit b2c6cf7753
1 changed files with 1 additions and 0 deletions

View File

@ -12,6 +12,7 @@ __x86_indirect_thunk_\reg:
call 22f
11:
pause
lfence
jmp 11b
22:
mov %\reg, (%rsp)