Subject: Re: [PATCH v9 18/23] x86/virt/tdx: Restore TDX module state
From: Dave Hansen <[email-masked]>
To: [email-masked]

[Draft review generated by x86-maintainer-agent applying Dave_Hansen.txt
 rules to the v9 series.  Strip this banner before sending.]

> +int tdx_module_run_update(void)
> +{
> +	struct tdx_module_args args = {};
> +	int ret;
> +
> +	ret = seamcall_prerr(TDH_SYS_UPDATE, &args);
> +	if (ret)
> +		return ret;
> +
> +	tdx_module_state.initialized = true;
> +	return 0;
> +}

The error-handling rationale in the changelog (quoted spec text +
"simply propagate errors") is exactly the right framing
(Dave_Hansen.txt RULE 1).  Future-you will not have to argue with a
reviewer about whether to attempt the chain-of-fallbacks; the
decision is written down.

One thing worth a comment in the code, not just the changelog: by the
time we set `initialized = true` here, the module has been physically
replaced and SEAMCALL state is back.  A two-line comment above the
assignment ("module is fully operational again after a successful
TDH.SYS.UPDATE; flip the gate so tdx_get_sysinfo() etc. resume
returning real data") closes the loop.  RULE 2.