Re: [PATCH v4] x86/tdx: Dump TDX version During the TD Bootup

From: Huang, Kai
Date: Fri Oct 06 2023 - 16:40:29 EST


On Fri, 2023-10-06 at 19:09 +0800, Sun, Yi wrote:
> > > +
> > > + /* TDX 1.0 does not have the TDCALL TDG.SYS.RD */
> > > +version_1_0:
> > > + td_sys->vendor_id = TDX_VENDOR_INTEL;
> > > + td_sys->major_version = 1;
> > > + td_sys->minor_version = 0;
> >
> > So the main reason that I think you can just print module version in this
> > function instead of tdx_early_init() is because IIUC you are setting up some
> > random value for TDX module 1.0.  Probably it's better to just print it's module
> > 1.0 w/o mentioning major/minor.
>
> Actually, it is not a random value here; it is the fixed value for TDX 1.0
> becasue there is not such version info in TDX 1.0.
> I assume we can state major=1 and minor=0 when TDX 1.0 is detected.
> This will prevent confusion for the users.

I mean we cannot assume minor always being 0, IIUC. I am not sure whether we
should report it just as 0.