]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to reflect the spec better
authorKai Huang <kai.huang@intel.com>
Sat, 14 Dec 2024 15:15:42 +0000 (04:15 +1300)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 18 Dec 2024 22:36:01 +0000 (14:36 -0800)
commite8aa393b0ada3b5ce1b3e8475b02e90e5dce6841
treec6d86ed98550e0755c885cf623e29721d3295499
parent564ea84c8c14b007d7838bfb1327295b873573be
x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to reflect the spec better

The TDX module provides a set of "Global Metadata Fields".  They report
things like TDX module version, supported features, and fields related
to create/run TDX guests and so on.

TDX organizes those metadata fields by "Classes" based on the meaning of
those fields.  E.g., for now the kernel only reads "TD Memory Region"
(TDMR) related fields for module initialization.  Those fields are
defined under class "TDMR Info".

Today the kernel reads some of the global metadata to initialize the TDX
module.  KVM will need to read additional metadata fields to run TDX
guests.  Move towards having the TDX host core-kernel provide a
centralized, canonical, and immutable structure for the global metadata
that comes out from the TDX module for all kernel components to use.

More specifically, prepare the code to end up with an organization like:

       struct tdx_sys_info {
       struct tdx_sys_info_classA a;
       struct tdx_sys_info_classB b;
       ...
       };

Currently the kernel organizes all fields under "TDMR Info" class in
'struct tdx_tdmr_sysinfo'.  Prepare for the above by renaming the
structure to 'struct tdx_sys_info_tdmr' to follow the class name better.

No functional change intended.

Signed-off-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/all/de165d09e0b571cfeb119a368f4be6e2888ebb93.1734188033.git.kai.huang%40intel.com
arch/x86/virt/vmx/tdx/tdx.c
arch/x86/virt/vmx/tdx/tdx.h