[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <orjok4cskwinwuuqkyovqu7tkfygdkiqlxc2sbdvi2jicpygi4@dgg76ojxkhak>
Date: Thu, 8 Jan 2026 10:50:21 +0000
From: Kiryl Shutsemau <kas@...nel.org>
To: Vishal Verma <vishal.l.verma@...el.com>
Cc: linux-kernel@...r.kernel.org, linux-coco@...ts.linux.dev,
kvm@...r.kernel.org, x86@...nel.org, Chao Gao <chao.gao@...el.com>,
Dan Williams <dan.j.williams@...el.com>, Kai Huang <kai.huang@...el.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>,
Rick Edgecombe <rick.p.edgecombe@...el.com>
Subject: Re: [PATCH 2/2] x86/virt/tdx: Print TDX module version during init
On Wed, Jan 07, 2026 at 05:31:29PM -0700, Vishal Verma wrote:
> It is useful to print the TDX module version in dmesg logs. This allows
> for a quick spot check for whether the correct/expected TDX module is
> being loaded, and also creates a record for any future problems being
> investigated. This was also requested in [1].
>
> Include the version in the log messages during init, e.g.:
>
> virt/tdx: TDX module version: 1.5.24
> virt/tdx: 1034220 KB allocated for PAMT
> virt/tdx: module initialized
>
> ..followed by remaining TDX initialization messages (or errors).
>
> Print the version early in init_tdx_module(), right after the global
> metadata is read, which makes it available even if there are subsequent
> initialization failures.
One thing to note that if metadata read fails, we will not get there.
The daisy chaining we use for metadata read makes it fragile. Some
metadata fields are version/feature dependant, like you can see in DPAMT
case.
It can be useful to dump version information, even if get_tdx_sys_info()
fails. Version info is likely to be valid on failure.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists