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:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:l1tf_select_mitigation

Proto:static void __init l1tf_select_mitigation(void)

Type:void

Parameter:Nothing

1339  If Not boot_cpu_has_bug(CPU is affected by L1 Terminal Fault ) Then Return
1342  If cpu_mitigations_off() Then Default mitigation for L1TF-affected CPUs = L1TF_MITIGATION_OFF
1344  Else if cpu_mitigations_auto_nosmt() Then Default mitigation for L1TF-affected CPUs = L1TF_MITIGATION_FLUSH_NOSMT
1347  These CPUs all support 44bits physical address space internally in the* cache but CPUID can report a smaller number of physical address bits.* The L1TF mitigation uses the top most address bit for the inversion of* non present PTEs
1350  Case Default mitigation for L1TF-affected CPUs == L1TF_MITIGATION_OFF
1351  Case Default mitigation for L1TF-affected CPUs == L1TF_MITIGATION_FLUSH_NOWARN
1352  Case Default mitigation for L1TF-affected CPUs == L1TF_MITIGATION_FLUSH
1353  Break
1354  Case Default mitigation for L1TF-affected CPUs == L1TF_MITIGATION_FLUSH_NOSMT
1355  Case Default mitigation for L1TF-affected CPUs == L1TF_MITIGATION_FULL
1356  cpu_smt_disable(false)
1357  Break
1358  Case Default mitigation for L1TF-affected CPUs == L1TF_MITIGATION_FULL_FORCE
1359  cpu_smt_disable(true)
1360  Break
1368  half_pa = l1tf_pfn_limit() << PAGE_SHIFT determines the page size
1369  If Default mitigation for L1TF-affected CPUs != L1TF_MITIGATION_OFF && e820__mapped_any(half_pa, ULLONG_MAX - half_pa, E820_TYPE_RAM) Then
1371  pr_warn("System has more than MAX_PA/2 memory. L1TF mitigation not effective.\n")
1372  pr_info("You may make it effective by booting the kernel with mem=%llu parameter.\n", half_pa)
1374  pr_info("However, doing so will make a part of your RAM unusable.\n")
1375  pr_info("Reading https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html might help you decide.\n")
1376  Return
1379  setup_force_cpu_cap("" L1TF workaround PTE inversion )
Caller
NameDescribe
check_bugs