From: Jun Miao <jun.miao@intel.com>
To: kirill.shutemov@linux.intel.com, dave.hansen@linux.intel.com
Cc: linux-coco@lists.linux.dev, Jun Miao <jun.miao@intel.com>
Subject: [PATCH] x86/virt/tdx: accurately distinguishes TDX module loading situations
Date: Sun, 23 Jun 2024 01:50:37 +0800 [thread overview]
Message-ID: <20240622175037.2051612-1-jun.miao@intel.com> (raw)
The first SEAMCALL is important to response the state of TDX Module/BIOS.
In actual incorrect BIOS setup or deployment, the sysinit_ret will be
-EOPNOTSUPP. But the message "module not loaded" isn`t enough to describe
the accurate loading situation when module loaded but SEAMCALL failed
for some BIOS wrong setting. So add the error return operation code number.
Signed-off-by: Jun Miao <jun.miao@intel.com>
---
arch/x86/virt/vmx/tdx/tdx.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c
index 4e2b2e2ac9f9..787dfaf44036 100644
--- a/arch/x86/virt/vmx/tdx/tdx.c
+++ b/arch/x86/virt/vmx/tdx/tdx.c
@@ -122,10 +122,14 @@ static int try_init_module_global(void)
/*
* The first SEAMCALL also detects the TDX module, thus
* it can fail due to the TDX module is not loaded.
- * Dump message to let the user know.
+ * Dump more detailed message to let the user know.
*/
if (sysinit_ret == -ENODEV)
pr_err("module not loaded\n");
+ else if (sysinit_ret)
+ pr_warn("module loaded error ret=%d\n",sysinit_ret);
+ else
+ pr_info("module loaded\n");
sysinit_done = true;
out:
--
2.32.0
next reply other threads:[~2024-06-22 17:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-22 17:50 Jun Miao [this message]
2024-06-24 11:26 ` [PATCH] x86/virt/tdx: accurately distinguishes TDX module loading situations Kirill A. Shutemov
2024-06-28 17:17 ` Jun Miao
2024-07-19 1:31 ` Huang, Kai
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=20240622175037.2051612-1-jun.miao@intel.com \
--to=jun.miao@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-coco@lists.linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).