* [PATCH v4] x86/cpu: Adjust the error message when BIOS does not support SGX
@ 2024-08-25 10:46 WangYuli
2024-08-25 12:46 ` [tip: x86/cleanups] x86/cpu: Clarify " tip-bot2 for WangYuli
0 siblings, 1 reply; 2+ messages in thread
From: WangYuli @ 2024-08-25 10:46 UTC (permalink / raw)
To: tglx, mingo, bp, dave.hansen, hpa, wangyuli, seanjc, xiangzelong
Cc: x86, linux-kernel, wubo, guanwentao, linux-sgx, jarkko,
haitao.huang, sean.j.christopherson, kai.huang, bp
When SGX is not supported by the BIOS, the kernel log still output
the error 'SGX disabled by BIOS', which can be confusing since
there might not be an SGX-related option in the BIOS settings.
As a kernel, it's difficult to distinguish between the BIOS not
supporting SGX and the BIOS supporting SGX but it's 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 <wubo@uniontech.com>
Closes: https://github.com/linuxdeepin/developer-center/issues/10032
Acked-by: Kai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/all/a30f7700c7817b3e7e2f2bdb37d5c10a318b2c3b.camel@intel.com/
Co-developed-by: Zelong Xiang <xiangzelong@uniontech.com>
Signed-off-by: Zelong Xiang <xiangzelong@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
---
arch/x86/kernel/cpu/feat_ctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/feat_ctl.c b/arch/x86/kernel/cpu/feat_ctl.c
index 1640ae76548f..4a4118784c13 100644
--- a/arch/x86/kernel/cpu/feat_ctl.c
+++ b/arch/x86/kernel/cpu/feat_ctl.c
@@ -188,7 +188,7 @@ void init_ia32_feat_ctl(struct cpuinfo_x86 *c)
update_sgx:
if (!(msr & FEAT_CTL_SGX_ENABLED)) {
if (enable_sgx_kvm || enable_sgx_driver)
- pr_err_once("SGX disabled by BIOS.\n");
+ pr_err_once("SGX disabled or unsupported by BIOS.\n");
clear_cpu_cap(c, X86_FEATURE_SGX);
return;
}
--
2.43.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip: x86/cleanups] x86/cpu: Clarify the error message when BIOS does not support SGX
2024-08-25 10:46 [PATCH v4] x86/cpu: Adjust the error message when BIOS does not support SGX WangYuli
@ 2024-08-25 12:46 ` tip-bot2 for WangYuli
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for WangYuli @ 2024-08-25 12:46 UTC (permalink / raw)
To: linux-tip-commits
Cc: Bo Wu, Zelong Xiang, WangYuli, Thomas Gleixner, Kai Huang, x86,
linux-kernel
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 7678a53a1688e3d03337ca884b284c6e7b060ec5
Gitweb: https://git.kernel.org/tip/7678a53a1688e3d03337ca884b284c6e7b060ec5
Author: WangYuli <wangyuli@uniontech.com>
AuthorDate: Sun, 25 Aug 2024 18:46:53 +08:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sun, 25 Aug 2024 14:41:19 +02:00
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 <wubo@uniontech.com>
Co-developed-by: Zelong Xiang <xiangzelong@uniontech.com>
Signed-off-by: Zelong Xiang <xiangzelong@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Kai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/all/F8D977CB368423F3+20240825104653.1294624-1-wangyuli@uniontech.com
Closes: https://github.com/linuxdeepin/developer-center/issues/10032
---
arch/x86/kernel/cpu/feat_ctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/feat_ctl.c b/arch/x86/kernel/cpu/feat_ctl.c
index 1640ae7..4a41187 100644
--- a/arch/x86/kernel/cpu/feat_ctl.c
+++ b/arch/x86/kernel/cpu/feat_ctl.c
@@ -188,7 +188,7 @@ update_caps:
update_sgx:
if (!(msr & FEAT_CTL_SGX_ENABLED)) {
if (enable_sgx_kvm || enable_sgx_driver)
- pr_err_once("SGX disabled by BIOS.\n");
+ pr_err_once("SGX disabled or unsupported by BIOS.\n");
clear_cpu_cap(c, X86_FEATURE_SGX);
return;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-25 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-25 10:46 [PATCH v4] x86/cpu: Adjust the error message when BIOS does not support SGX WangYuli
2024-08-25 12:46 ` [tip: x86/cleanups] x86/cpu: Clarify " tip-bot2 for WangYuli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®