Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86/virt/tdx: Print TDX module basic information
Currently the kernel doesn't print any information regarding the TDX module itself, e.g. module version. Printing such information is not mandatory for initializing the TDX module, but in practice such information is useful, especially to the developers. For instance, there are couple of use cases for dumping module basic information: 1) When something goes wrong around using TDX, the information like TDX module version, supported features etc could be helpful [1][2]. 2) For Linux, when the user wants to update the TDX module, one needs to replace the old module in a specific location in the EFI partition with the new one so that after reboot the BIOS can load it. However, after kernel boots, currently the user has no way to verify it is indeed the new module that gets loaded and initialized (e.g., error could happen when replacing the old module). With the module version dumped the user can verify this easily. So dump the basic TDX module information: - TDX module type: Debug or Production. - TDX_FEATURES0: Supported TDX features. - TDX module version, and the build date. And dump the information right after reading global metadata, so that this information is printed no matter whether module initialization fails or not. The actual dmesg will look like: virt/tdx: Production module. virt/tdx: TDX_FEATURES0: 0xfbf virt/tdx: Module version: 1.5.00.00.0481, build_date: 20230323 Link: https://lore.kernel.org/lkml/[email protected]/T/#m352829aedf6680d4628c7e40dc40b332eda93355 [1] Link: https://lore.kernel.org/lkml/[email protected]/T/#m351ebcbc006d2e5bc3e7650206a087cb2708d451 [2] Signed-off-by: Kai Huang <[email protected]>
- Loading branch information