Skip to content

Commit 7678a53

Browse files
WangYuliKAGA-KOKO
authored andcommitted
x86/cpu: Clarify the error message when BIOS does not support SGX
When SGX is not supported by the BIOS, the kernel log contains the error 'SGX disabled by BIOS', which can be confusing since there might not be an SGX-related option in the BIOS settings. For the kernel it's difficult to distinguish between the BIOS not supporting SGX and the BIOS supporting SGX but having it disabled. Therefore, update the error message to 'SGX disabled or unsupported by BIOS' to make it easier for those reading kernel logs to understand what's happening. Reported-by: Bo Wu <[email protected]> Co-developed-by: Zelong Xiang <[email protected]> Signed-off-by: Zelong Xiang <[email protected]> Signed-off-by: WangYuli <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Kai Huang <[email protected]> Link: https://lore.kernel.org/all/[email protected] Closes: linuxdeepin/developer-center#10032
1 parent ea49cdb commit 7678a53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/cpu/feat_ctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void init_ia32_feat_ctl(struct cpuinfo_x86 *c)
188188
update_sgx:
189189
if (!(msr & FEAT_CTL_SGX_ENABLED)) {
190190
if (enable_sgx_kvm || enable_sgx_driver)
191-
pr_err_once("SGX disabled by BIOS.\n");
191+
pr_err_once("SGX disabled or unsupported by BIOS.\n");
192192
clear_cpu_cap(c, X86_FEATURE_SGX);
193193
return;
194194
}

0 commit comments

Comments
 (0)