Re: [PATCH v3 18/26] x86/virt/seamldr: Log TDX Module update failures

From: Xu Yilun

Date: Mon Feb 02 2026 - 02:33:28 EST


> +static void print_update_failure_message(void)
> +{
> + static atomic_t printed = ATOMIC_INIT(0);
> +
> + if (atomic_inc_return(&printed) == 1)
> + pr_err("update failed, SEAMCALLs will report failure until TDs killed\n");
> +}

Not sure why it can't be just pr_err_once()?

> +
> /*
> * See multi_cpu_stop() from where this multi-cpu state-machine was
> * adopted, and the rationale for touch_nmi_watchdog()
> @@ -289,10 +297,13 @@ static int do_seamldr_install_module(void *params)
> break;
> }
>
> - if (ret)
> + if (ret) {
> atomic_inc(&tdp_data.failed);
> - else
> + if (curstate > TDP_SHUTDOWN)
> + print_update_failure_message();
> + } else {
> ack_state();
> + }
> } else {
> touch_nmi_watchdog();
> rcu_momentary_eqs();
> --
> 2.47.3
>