[PATCH RFC v1 4/8] x86/microcode: Extend struct microcode_ops for uniform loading

From: Chang S. Bae

Date: Fri Sep 11 2026 - 20:36:07 EST


Microcode loading is currently performed on a per-core basis. The loading
process concludes only after every core has been updated. As core counts
continue to grow, reducing the number of update invocations makes the
process increasingly efficient.

The uniform loading feature extends the update scope beyond a single
core, for example to a package or even an entire system. This means a
single update covers multiple cores, which in turn reduces the number of
update triggers.

The common late-loading logic determines the primary CPUs before invoking
vendor-specific callbacks. Extend struct microcode_ops with fields for
describing the feature support and the loading scope.

The actual loading flow changes will follow later.

Signed-off-by: Chang S. Bae <chang.seok.bae@xxxxxxxxx>
---
arch/x86/kernel/cpu/microcode/internal.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/microcode/internal.h b/arch/x86/kernel/cpu/microcode/internal.h
index a10b547eda1e..0a74794e0245 100644
--- a/arch/x86/kernel/cpu/microcode/internal.h
+++ b/arch/x86/kernel/cpu/microcode/internal.h
@@ -21,6 +21,13 @@ enum ucode_state {
UCODE_OFFLINE,
};

+enum uniform_scope {
+ UNIFORM_DEFAULT = 0,
+ UNIFORM_CORE,
+ UNIFORM_PKG,
+ UNIFORM_SYS,
+};
+
struct microcode_ops {
enum ucode_state (*request_microcode_fw)(int cpu, struct device *dev);
void (*microcode_fini_cpu)(int cpu);
@@ -36,7 +43,9 @@ struct microcode_ops {
void (*finalize_late_load)(int result);
unsigned int nmi_safe : 1,
use_nmi : 1,
- use_staging : 1;
+ use_staging : 1,
+ use_uniform : 1;
+ enum uniform_scope uniform_scope;
};

struct early_load_data {
--
2.53.0