x86/ucode: Add Kconfig option to remove microcode loading

Amend docs to reflect ucode= command/stanza depend on MICROCODE_LOADING
being set.

The new MICROCODE_OP() is a conditional setter for the microcode_ops
struct. By using IS_ENABLED() there rather than ifdef we allow DCE to
remove all statics no longer used when microcode loading is disabled
without tagging them with __maybe_unused.

Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Alejandro Vallejo authored and Andrew Cooper committed 2026-01-21 10:47:46 +00:00
1 parent 54deff5e13
commit c4fecc5267
10 files changed
+63 -18

No files matched your search

+2
View File
@@ -23,6 +23,8 @@ TSX errata which necessitated disabling the feature entirely), or the addition
of brand new features (e.g. the Spectre v2 controls to work around speculative
execution vulnerabilities).
Microcode loading support in Xen is controlled by the
``CONFIG_MICROCODE_LOADING`` Kconfig option.
Boot time microcode loading
---------------------------
+2
View File
@@ -104,6 +104,8 @@ Specifies an XSM module to load.
Specifies a CPU microcode blob to load. (x86 only)
Only available when Xen is compiled with CONFIG_MICROCODE_LOADING enabled.
###`dtb=<filename>`
Specifies a device tree file to load. The platform firmware may provide a
+4 -3
View File
@@ -2751,9 +2751,10 @@ performance.
Applicability: x86
Default: `scan` is selectable via Kconfig, `nmi,digest-check`
Controls for CPU microcode loading. For early loading, this parameter can
specify how and where to find the microcode update blob. For late loading,
this parameter specifies if the update happens within a NMI handler.
Controls for CPU microcode loading, available when `CONFIG_MICROCODE_LOADING`
is enabled. For early loading, this parameter can specify how and where to
find the microcode update blob. For late loading, this parameter specifies if
the update happens within a NMI handler.
'integer' specifies the CPU microcode update blob module index. When positive,
this specifies the n-th module (in the GrUB entry, zero based) to be used
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.