From: "Huang, Kai" <kai.huang@intel.com>
To: Adrian Hunter <adrian.hunter@intel.com>, <dave.hansen@intel.com>,
<kirill.shutemov@linux.intel.com>, <tglx@linutronix.de>,
<bp@alien8.de>, <peterz@infradead.org>, <mingo@redhat.com>,
<hpa@zytor.com>, <dan.j.williams@intel.com>, <seanjc@google.com>,
<pbonzini@redhat.com>
Cc: <x86@kernel.org>, <linux-kernel@vger.kernel.org>,
<kvm@vger.kernel.org>, <rick.p.edgecombe@intel.com>,
<isaku.yamahata@intel.com>, <chao.gao@intel.com>,
<binbin.wu@linux.intel.com>
Subject: Re: [PATCH v3 1/8] x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to reflect the spec better
Date: Wed, 28 Aug 2024 10:20:38 +1200 [thread overview]
Message-ID: <2152e96c-eccc-4e96-b658-70cc59dfee68@intel.com> (raw)
In-Reply-To: <1b810874-2734-4ca8-933d-ebe9500a8ddc@intel.com>
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@intel.com>
>
> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com
Thanks for the review.
All comments above look good to me. Will do.
next prev parent reply other threads:[~2024-08-27 22:20 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 7:14 [PATCH v3 0/8] TDX host: metadata reading tweaks, bug fix and info dump Kai Huang
2024-08-27 7:14 ` [PATCH v3 1/8] x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to reflect the spec better Kai Huang
2024-08-27 13:10 ` Adrian Hunter
2024-08-27 22:20 ` Huang, Kai [this message]
2024-09-24 11:39 ` Huang, Kai
2024-08-30 22:05 ` Dan Williams
2024-08-27 7:14 ` [PATCH v3 2/8] x86/virt/tdx: Remove 'struct field_mapping' and implement TD_SYSINFO_MAP() macro Kai Huang
2024-08-29 7:20 ` Adrian Hunter
2024-08-30 10:52 ` Huang, Kai
2024-09-06 21:30 ` Dan Williams
2024-09-09 9:59 ` Huang, Kai
2024-09-06 20:21 ` Dan Williams
2024-09-09 9:59 ` Huang, Kai
2024-08-27 7:14 ` [PATCH v3 3/8] x86/virt/tdx: Prepare to support reading other global metadata fields Kai Huang
2024-08-30 6:43 ` Adrian Hunter
2024-08-30 11:02 ` Huang, Kai
2024-08-30 9:05 ` Nikolay Borisov
2024-08-30 11:09 ` Huang, Kai
2024-09-06 21:34 ` Dan Williams
2024-09-09 12:28 ` Huang, Kai
2024-08-27 7:14 ` [PATCH v3 4/8] x86/virt/tdx: Refine a comment to reflect the latest TDX spec Kai Huang
2024-08-30 6:45 ` Adrian Hunter
2024-08-30 9:14 ` Nikolay Borisov
2024-08-27 7:14 ` [PATCH v3 5/8] x86/virt/tdx: Start to track all global metadata in one structure Kai Huang
2024-08-30 7:02 ` Adrian Hunter
2024-08-30 11:10 ` Huang, Kai
2024-08-30 11:01 ` Nikolay Borisov
2024-08-30 11:57 ` Huang, Kai
2024-08-27 7:14 ` [PATCH v3 6/8] x86/virt/tdx: Print TDX module basic information Kai Huang
2024-09-06 22:46 ` Dan Williams
2024-09-09 10:18 ` Huang, Kai
2024-08-27 7:14 ` [PATCH v3 7/8] x86/virt/tdx: Reduce TDMR's reserved areas by using CMRs to find memory holes Kai Huang
2024-08-30 10:50 ` Adrian Hunter
2024-08-30 11:52 ` Huang, Kai
2024-08-30 12:02 ` Adrian Hunter
2024-08-30 12:27 ` Nikolay Borisov
2024-09-06 23:31 ` Dan Williams
2024-09-09 10:30 ` Huang, Kai
2024-08-27 7:14 ` [PATCH v3 8/8] x86/virt/tdx: Don't initialize module that doesn't support NO_RBP_MOD feature Kai Huang
2024-08-30 11:01 ` Adrian Hunter
2024-09-06 23:36 ` Dan Williams
2024-09-09 10:21 ` 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=2152e96c-eccc-4e96-b658-70cc59dfee68@intel.com \
--to=kai.huang@intel.com \
--cc=adrian.hunter@intel.com \
--cc=binbin.wu@linux.intel.com \
--cc=bp@alien8.de \
--cc=chao.gao@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=hpa@zytor.com \
--cc=isaku.yamahata@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.