[PATCH RFC v1 5/8] x86/microcode: Clarify online enforcement with uniform loading
From: Chang S. Bae
Date: Fri Sep 11 2026 - 20:36:25 EST
The microcode update process requires at least one primary thread to
oversee the update for each defined scope. Currently, the kernel mandates
that all SMT primary threads remain online, assuming a core scope.
When the loading scope is extended to cover a package or the entire
system, this enforcement may be seen as unnecessary because offlining
more CPUs is affordable as long as at least one CPU remains to
participate in the microcode loading.
The nosmt option can be considered for practical reasons. But it is
impractical to aggressively switch off cores during such system-critical
updates. So, the current online enforcement isn't expected to be too
excessive even with the uniform loading.
Clarify this consideration in code comments.
Signed-off-by: Chang S. Bae <chang.seok.bae@xxxxxxxxx>
---
arch/x86/kernel/cpu/microcode/core.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index 36f08e2c99fb..8f617745d4d0 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -719,6 +719,12 @@ static bool setup_cpus(void)
*
* Ensure that the primary thread is online so that it is
* guaranteed that all cores are updated.
+ *
+ * When the loading scope is extended beyond each core, it is
+ * not strictly required to have primary threads online.
+ * However, during such system-critical updates, offlining CPUs
+ * besides the nosmt case isn't a sensible measure either. So,
+ * this mandate remains considerably benign.
*/
if (!cpu_online(cpu)) {
if (topology_is_primary_thread(cpu) || !allow_smt_offline) {
--
2.53.0