Re: [RFC PATCH 06/15] x86/virt/tdx: Initialize Quoting extension during bringup

From: Peter Fang

Date: Sun Jun 14 2026 - 03:50:36 EST


On Fri, Jun 12, 2026 at 05:00:11PM -0700, Dan Williams (nvidia) wrote:
> Xu Yilun wrote:
> > From: Peter Fang <peter.fang@xxxxxxxxx>
> >
> > Initialize the Quoting extension and fetch its metadata during TDX
> > bringup.
> >
> > Because Quoting is an optional TDX feature, do not let its
> > initialization failures cause TDX bringup to fail.
>
> Is this micro-optimization worth it? What are the classes of quote-init
> failures vs just make the policy be anything in the module must init.

Since there is a fallback option to do the Quoting in userspace, I think
it is probably not worth shooting down TDX entirely over quote-init
failures.

The quote-init failures can come from:

1. Quoting init SEAMCALL failures, which look pretty opaque to the
kernel and there's not much it can do about it.
2. Quoting buffer allocation failures, which *are* understood by the
kernel, and it could maybe try something else. Right now, we just
treat it the same as 1.

This is helpful because I think the question of "what if the Quoting
extension fails" has come up enough times that it warrants some
explanation in the patch log. Thanks.

>
> > This patch does not include the opt-in portion of the initialization.
> > It mainly lays the groundwork for TDX Quoting support. Opt-in will be
> > added in a follow-up patch once the feature can be properly used by the
> > system.
>
> It is unconditionally calling quote init even if the feature is not
> present. Is that not a problem?

Good question... I should reorder the patches so this looks more
straightforward. I enable everything in patch 15 (including the check
for the Quoting feature) and I think that just creates confusion for
folks looking at this patch.

>