Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\process.c Create Date:2022-07-28 07:48:44
Last Modify:2020-03-16 17:03:44 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Update the MSRs managing speculation control, during context switch.

Proto:static __always_inline void __speculation_ctrl_update(unsigned long tifp, unsigned long tifn)

Type:void

Parameter:

TypeParameterName
unsigned longtifp Previous task's thread flags
unsigned longtifn Next task's thread flags
543  tif_diff = Previous task's thread flags ^ Next task's thread flags
544  msr = The Intel SPEC CTRL MSR base value cache
545  bool updmsr = false
547  lockdep_assert_irqs_disabled()
555  If tif_diff & _TIF_SSBD Then
563  updmsr = true
571  If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SMP) && static_branch_unlikely( & switch_to_cond_stibp) Then
573  updmsr |= Not Not (tif_diff & _TIF_SPEC_IB)
574  msr |= stibp_tif_to_spec_ctrl( Next task's thread flags)
577  If updmsr Then wrmsrl(Speculation Control , msr)
Caller
NameDescribe
speculation_ctrl_update
__switch_to_xtra