Re: [PATCH v7 16/22] x86/virt/tdx: Update tdx_sysinfo and check features post-update

Dave Hansen
2026-04-07T15:53:40Z

On 4/7/26 05:15, Chao Gao wrote:
> Dave's comment on another patch applies here too: don't preemptively handle
> errors that never occur. The custom error message is unnecessary, and
> propagating the error isn't worth it. Will simplify it to:
>
> /* Shouldn't fail as the update has succeeded. */
> WARN_ON_ONCE(get_tdx_sys_info(info));

This is nit territory, but I don't like that either.

Actual, important, normal-program-flow logic should stand on its own,
separate from warnings.

OK:
ret = foo()
WARN_ON(ret);

Not OK:
WARN_ON(foo());