Re: [PATCH v7 09/22] x86/virt/seamldr: Introduce skeleton for TDX module updates

Chao Gao
2026-04-07T11:49:27Z

>@@ -214,7 +287,14 @@ int seamldr_install_module(const u8 *data, u32 size)
> if (IS_ERR(params))
> return PTR_ERR(params);
>
>- /* TODO: Update TDX module here */
>- return 0;
>+ /*
>+ * Prevent CPU hotplug. If a CPU goes offline after thread_ack
>+ * initialization, thread_ack will exceed the online count and
>+ * never decrement to zero, causing all CPUs spinning forever
>+ * with IRQs disabled.
>+ */

Applying Dave's feedback to simplify comments across the series. I will change
this to:

/* The lockstep update needs a stable set of online CPUs. */

>+ guard(cpus_read_lock)();
>+ set_target_state(MODULE_UPDATE_START + 1);
>+ return stop_machine_cpuslocked(do_seamldr_install_module, params, cpu_online_mask);
> }
> EXPORT_SYMBOL_FOR_MODULES(seamldr_install_module, "tdx-host");
>--
>2.47.3
>