函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\bugs.c Create Date:2022-07-27 08:56:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:x86_virt_spec_ctrl

函数原型:void x86_virt_spec_ctrl(u64 guest_spec_ctrl, u64 guest_virt_spec_ctrl, bool setguest)

返回类型:void

参数:

类型参数名称
u64guest_spec_ctrl
u64guest_virt_spec_ctrl
boolsetguest
155  hostval等于The base value of the SPEC_CTRL MSR that always has to be preserved.
156  ti等于current_thread_info()
159  如果static_cpu_has("" MSR SPEC_CTRL is implemented )则
165  guestval等于hostval按位与The vendor and possibly platform specific bits which can be modified in* x86_spec_ctrl_base.的反
166  guestval或等于guest_spec_ctrl按位与The vendor and possibly platform specific bits which can be modified in* x86_spec_ctrl_base.
169  如果static_cpu_has("" Speculative Store Bypass Disable )或static_cpu_has("" Speculative Store Bypass Disable )则hostval或等于ssbd_tif_to_spec_ctrl(低级别标志)
174  如果static_branch_unlikely( & Control conditional STIBP in switch_to() )则hostval或等于stibp_tif_to_spec_ctrl(低级别标志)
177  如果hostval不等于guestval
178  msrval等于如果setguestguestval否则hostval
187  如果非static_cpu_has("" AMD SSBD implementation via LS_CFG MSR )且非static_cpu_has(Virtualized Speculative Store Bypass Disable )则返回
196  如果static_cpu_has("" Disable Speculative Store Bypass. )则hostval等于Speculative Store Bypass Disable
198  否则hostval等于ssbd_tif_to_spec_ctrl(低级别标志)
202  guestval等于guest_virt_spec_ctrl按位与Speculative Store Bypass Disable
204  如果hostval不等于guestval
207  tif等于如果setguestssbd_spec_ctrl_to_tif(guestval)否则ssbd_spec_ctrl_to_tif(hostval)
210  speculation_ctrl_update(tif)