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

Chao Gao
2026-04-07T12:07:27Z

>+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;