Re: [PATCH v2 12/17] x86/virt/tdx: Reinitialize the Quoting extension after TDX module update

From: Peter Fang

Date: Tue Aug 11 2026 - 00:30:33 EST


On Mon, Jul 27, 2026 at 11:33:42AM -0700, Edgecombe, Rick P wrote:
> On Thu, 2026-06-18 at 16:13 +0800, Xu Yilun wrote:
> > From: Peter Fang <peter.fang@xxxxxxxxx>
> >

[ ... ]

> >  
> > +static void update_tdx_quoting_extension(void)
> > +{
> > + int ret;
> > +
> > + if (tdx_addon_feature0 & TDX_FEATURES0_QUOTE) {
> > + /*
> > + * The TDH.QUOTE.INIT call renews the quoting keys.
> > + *
> > + * A module update must not increase the quote buffer size,
> > or
> > + * quote generation may fail and break attestation.
> > + */
>
> It makes sense to explain why to call this again, but I'm not sure how this
> comment helps.

OK, I can improve the "why" of this, and not just say what it does.

BTW the "must not increase the quote buffer size" comment will probably
be irrelevant in the next version, since I plan to remove the static
global quote buffer altogether.

>
> > + ret = tdx_quote_init();
> > + WARN_ON(ret);
> > + }
>
> Since the caller of this function has an return code. Please justify why not to
> return an error.

The original thought was to warn since there is no proper handling for
this kind of error, and at the same time try to keep other parts of TDX
going. But I think it's probably better to just fail TDX as a whole if
this goes wrong. If this returns an error then maybe something more
serious is wrong here.

>