Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\bugs.c Create Date:2022-07-28 07:56:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:taa_select_mitigation

Proto:static void __init taa_select_mitigation(void)

Type:void

Parameter:Nothing

304  If Not boot_cpu_has_bug(CPU is affected by TSX Async Abort(TAA) ) Then
305  Default mitigation for TAA-affected CPUs = TAA_MITIGATION_OFF
306  Return
310  If Not boot_cpu_has(Restricted Transactional Memory ) Then
311  Default mitigation for TAA-affected CPUs = TAA_MITIGATION_TSX_DISABLED
312  Go to out
315  If cpu_mitigations_off() Then
316  Default mitigation for TAA-affected CPUs = TAA_MITIGATION_OFF
317  Return
324  If Default mitigation for TAA-affected CPUs == TAA_MITIGATION_OFF && Default mitigation for MDS-affected CPUs == MDS_MITIGATION_OFF Then Go to out
328  If boot_cpu_has(VERW clears CPU buffers ) Then Default mitigation for TAA-affected CPUs = TAA_MITIGATION_VERW
330  Else Default mitigation for TAA-affected CPUs = TAA_MITIGATION_UCODE_NEEDED
342  ia32_cap = x86_read_arch_cap_msr()
343  If ia32_cap & Not susceptible to* Microarchitectural Data* Sampling (MDS) vulnerabilities. && Not (ia32_cap & MSR for TSX control is available. ) Then Default mitigation for TAA-affected CPUs = TAA_MITIGATION_UCODE_NEEDED
354  Normal usage; boolean enable/disable.( & Control MDS CPU buffer clear before returning to user space )
356  If taa_nosmt || cpu_mitigations_auto_nosmt() Then cpu_smt_disable(false)
363  If Default mitigation for MDS-affected CPUs == MDS_MITIGATION_OFF && boot_cpu_has_bug(CPU is affected by Microarchitectural data sampling ) Then
365  Default mitigation for MDS-affected CPUs = MDS_MITIGATION_FULL
366  mds_select_mitigation()
368  out :
369  pr_info("%s\n", taa_strings[Default mitigation for TAA-affected CPUs ])
Caller
NameDescribe
check_bugs