mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chang S. Bae" <chang.seok.bae@intel.com>
To: linux-kernel@vger.kernel.org
Cc: x86@kernel.org, tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, kevin.shu@intel.com,
	chang.seok.bae@intel.com
Subject: [PATCH RFC v1 4/8] x86/microcode: Extend struct microcode_ops for uniform loading
Date: Sat, 12 Sep 2026 00:08:10 +0000	[thread overview]
Message-ID: <20260912000815.997720-5-chang.seok.bae@intel.com> (raw)
In-Reply-To: <20260912000815.997720-1-chang.seok.bae@intel.com>

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@intel.com>
---
 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


  parent reply	other threads:[~2026-09-12  0:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12  0:08 [PATCH RFC v1 0/8] x86/microcode: Enable uniform feature Chang S. Bae
2026-09-12  0:08 ` [PATCH RFC v1 1/8] cpu/hotplug: Allow architecture-specific primary CPU bringup Chang S. Bae
2026-09-12  0:08 ` [PATCH RFC v1 2/8] x86/hotplug: Implement SMT-primary selection for parallel bringup Chang S. Bae
2026-09-12  0:08 ` [PATCH RFC v1 3/8] x86/cpu/topology: Introduce primary core mask Chang S. Bae
2026-09-12  0:08 ` Chang S. Bae [this message]
2026-09-12  0:08 ` [PATCH RFC v1 5/8] x86/microcode: Clarify online enforcement with uniform loading Chang S. Bae
2026-09-12  0:08 ` [PATCH RFC v1 6/8] x86/microcode: Support uniform scope for late loading Chang S. Bae
2026-09-12  0:08 ` [PATCH RFC v1 7/8] x86/microcode/intel: Support uniform scope for early loading Chang S. Bae
2026-09-12  0:08 ` [PATCH RFC v1 8/8] x86/microcode/intel: Enable uniform loading Chang S. Bae
2026-09-16  0:45 ` [PATCH RFC v1 0/8] x86/microcode: Enable uniform feature Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260912000815.997720-5-chang.seok.bae@intel.com \
    --to=chang.seok.bae@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=kevin.shu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®