[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab89f15ab0497e4d609a5cd843a3e64e736def14.camel@intel.com>
Date: Tue, 6 Aug 2024 12:48:04 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "Hansen, Dave" <dave.hansen@...el.com>, "seanjc@...gle.com"
<seanjc@...gle.com>, "bp@...en8.de" <bp@...en8.de>, "peterz@...radead.org"
<peterz@...radead.org>, "hpa@...or.com" <hpa@...or.com>, "mingo@...hat.com"
<mingo@...hat.com>, "kirill.shutemov@...ux.intel.com"
<kirill.shutemov@...ux.intel.com>, "Williams, Dan J"
<dan.j.williams@...el.com>, "pbonzini@...hat.com" <pbonzini@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>
CC: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>, "kvm@...r.kernel.org"
<kvm@...r.kernel.org>, "Yamahata, Isaku" <isaku.yamahata@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Gao, Chao"
<chao.gao@...el.com>, "binbin.wu@...ux.intel.com"
<binbin.wu@...ux.intel.com>, "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v2 08/10] x86/virt/tdx: Print TDX module basic information
> > > struct tdx_sysinfo {
> > > - struct tdx_sysinfo_tdmr_info tdmr_info;
> > > + struct tdx_sysinfo_module_info module_info;
> > > + struct tdx_sysinfo_module_version module_version;
> > > + struct tdx_sysinfo_tdmr_info tdmr_info;
> >
> > Compare that to:
> >
> > struct tdx_sys_info {
> > struct tdx_sys_info_features features;
> > struct tdx_sys_info_version version;
> > struct tdx_sys_info_tdmr tdmr;
> > };
> >
> > ...and tell me which oine is easier to read.
>
> I agree this is easier to read if we don't look at the JSON file. On the
> other hand, following JSON file's "Class" names IMHO we can more easily
> find which class to look at for a given member.
>
> So I think they both have pros/cons, and I have no hard opinion on this.
>
Hi Dan,
Btw, if we aim (either now or eventually) to auto generate all metadata
fields based on JSON file, I think it would be easier to name the
structures based on the "Class" names. Otherwise we will need to do some
class-specific tweaks.
Powered by blists - more mailing lists