Re: [PATCH v7 15/22] x86/virt/tdx: Restore TDX module state

Edgecombe, Rick P
2026-04-11T02:06:29Z

On Tue, 2026-04-07 at 20:07 +0800, Chao Gao wrote:
> > +int tdx_module_run_update(void)
> > +{
> > + struct tdx_module_args args = {};
> > + int ret;
> > +
> > + ret = seamcall_prerr(TDH_SYS_UPDATE, &args);
> > + if (ret) {
> > + pr_err("update failed (%d)\n", ret);
> > + tdx_module_status = TDX_MODULE_ERROR;
> > + return ret;
> > + }
>
> The pr_err() isn't needed as seamcall_prerr() will emit a
> message. and no need to set tdx_module_status to ERROR on
> failure as it is already done during shutdown.
>
> so, this can be simplified to:
>
> ret = seamcall_prerr(TDH_SYS_UPDATE, &args);
> if (ret)
> return ret;

Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com>