mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for WangYuli" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Bo Wu <wubo@uniontech.com>,
	Zelong Xiang <xiangzelong@uniontech.com>,
	WangYuli <wangyuli@uniontech.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Kai Huang <kai.huang@intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cleanups] x86/cpu: Clarify the error message when BIOS does not support SGX
Date: Sun, 25 Aug 2024 12:46:04 -0000	[thread overview]
Message-ID: <172458996487.2215.5672971101697733211.tip-bot2@tip-bot2> (raw)
In-Reply-To: <F8D977CB368423F3+20240825104653.1294624-1-wangyuli@uniontech.com>

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;
 	}

      reply	other threads:[~2024-08-25 12:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-25 10:46 [PATCH v4] x86/cpu: Adjust " WangYuli
2024-08-25 12:46 ` tip-bot2 for WangYuli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=172458996487.2215.5672971101697733211.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=kai.huang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wangyuli@uniontech.com \
    --cc=wubo@uniontech.com \
    --cc=x86@kernel.org \
    --cc=xiangzelong@uniontech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®