函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:spectre_v2_user_select_mitigation

函数原型:static void __init spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)

返回类型:void

参数:

类型参数名称
enum spectre_v2_mitigation_cmdv2_cmd
605  mode等于SPECTRE_V2_USER_NONE
606  smt_possible等于IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SMP)
609  如果非boot_cpu_has(Indirect Branch Prediction Barrier )且非boot_cpu_has(Single Thread Indirect Branch Predictors )则返回
612  如果cpu_smt_control恒等于CPU_SMT_FORCE_DISABLEDcpu_smt_control恒等于CPU_SMT_NOT_SUPPORTEDsmt_possible = false
616  cmd等于spectre_v2_parse_user_cmdline(v2_cmd)
618  :cmd恒等于SPECTRE_V2_USER_CMD_NONE
619  转到:set_mode
620  :cmd恒等于SPECTRE_V2_USER_CMD_FORCE
621  mode等于SPECTRE_V2_USER_STRICT
622  退出
623  :cmd恒等于SPECTRE_V2_USER_CMD_PRCTL
624  :cmd恒等于SPECTRE_V2_USER_CMD_PRCTL_IBPB
625  mode等于SPECTRE_V2_USER_PRCTL
626  退出
627  :cmd恒等于SPECTRE_V2_USER_CMD_AUTO
628  :cmd恒等于SPECTRE_V2_USER_CMD_SECCOMP
629  :cmd恒等于SPECTRE_V2_USER_CMD_SECCOMP_IBPB
630  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SECCOMP)则mode等于SPECTRE_V2_USER_SECCOMP
632  否则mode等于SPECTRE_V2_USER_PRCTL
634  退出
642  如果mode不等于SPECTRE_V2_USER_STRICTboot_cpu_has("" Single Thread Indirect Branch Predictors always-on preferred )则mode等于SPECTRE_V2_USER_STRICT_PREFERRED
647  如果boot_cpu_has(Indirect Branch Prediction Barrier )则
648  setup_force_cpu_cap("" Indirect Branch Prediction Barrier enabled )
651  :cmd恒等于SPECTRE_V2_USER_CMD_FORCE
652  :cmd恒等于SPECTRE_V2_USER_CMD_PRCTL_IBPB
655  退出
656  :cmd恒等于SPECTRE_V2_USER_CMD_PRCTL
657  :cmd恒等于SPECTRE_V2_USER_CMD_AUTO
660  退出
661  默认
662  退出
665  打印信息("mitigation: Enabling %s Indirect Branch Prediction Barrier\n", static_key_enabled( & Control unconditional IBPB in switch_mm() ) ? "always-on" : "conditional")
671  如果spectre_v2_enabled恒等于SPECTRE_V2_IBRS_ENHANCED则返回
678  如果非smt_possible或非boot_cpu_has(Single Thread Indirect Branch Predictors )则mode等于SPECTRE_V2_USER_NONE
680  set_mode :
681  spectre_v2_user等于mode
683  如果smt_possible打印信息("%s\n", spectre_v2_user_strings[mode])
调用者
名称描述
spectre_v2_select_mitigation