[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2152e96c-eccc-4e96-b658-70cc59dfee68@intel.com>
Date: Wed, 28 Aug 2024 10:20:38 +1200
From: "Huang, Kai" <kai.huang@...el.com>
To: Adrian Hunter <adrian.hunter@...el.com>, <dave.hansen@...el.com>,
<kirill.shutemov@...ux.intel.com>, <tglx@...utronix.de>, <bp@...en8.de>,
<peterz@...radead.org>, <mingo@...hat.com>, <hpa@...or.com>,
<dan.j.williams@...el.com>, <seanjc@...gle.com>, <pbonzini@...hat.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>,
<rick.p.edgecombe@...el.com>, <isaku.yamahata@...el.com>,
<chao.gao@...el.com>, <binbin.wu@...ux.intel.com>
Subject: Re: [PATCH v3 1/8] x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to
reflect the spec better
On 28/08/2024 1:10 am, Adrian Hunter wrote:
> On 27/08/24 10:14, Kai Huang wrote:
>
> "to reflect the spec better" is a bit vague. How about:
>
> x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to 'struct tdx_sys_info_tdmr'
>
> Rename 'struct tdx_tdmr_sysinfo' to 'struct tdx_sys_info_tdmr' to
> prepare for adding similar structures that will all be prefixed by
> 'tdx_sys_info_'.
>
>> The TDX module provides a set of "global metadata fields". They report
>
> Since it is a name of something, could capitalize "Global Metadata Fields"
>
>> things like TDX module version, supported features, and fields related
>> to create/run TDX guests and so on.
>>
>> TDX organizes those metadata fields by "Class"es based on the meaning of
>
> by "Class"es -> into "Classes"
>
>> 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".
>>
>> There are both immediate needs to read more metadata fields for module
>> initialization and near-future needs for other kernel components like
>> KVM to run TDX guests. To meet all those requirements, the idea is the
>> TDX host core-kernel to provide a centralized, canonical, and read-only
>> structure for the global metadata that comes out from the TDX module for
>> all kernel components to use.
>>
>> More specifically, the target is to end up with something 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'. To prepare for the above target, rename 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@...el.com>
>
> Reviewed-by: Adrian Hunter <adrian.hunter@...el.com
Thanks for the review.
All comments above look good to me. Will do.
Powered by blists - more mailing lists