From 11f8d55624d122320f50b8a853d3bedfaeaed271 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 2 Sep 2026 15:14:55 +0200 Subject: [PATCH] x86/CPU: re-arrange tail of early_cpu_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some early setup doesn't need re-doing after ucode load. Move the call to initialize_cpu_data() slightly up and add a conditional return point. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné --- xen/arch/x86/cpu/common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index 771ec2cf86..4be86e1f7b 100644 --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -432,10 +432,18 @@ void __init early_cpu_init(bool verbose) paddr_bits -= (ebx >> 6) & 0x3f; } + initialize_cpu_data(0); + + if (!verbose) + return; + + /* + * Work which doesn't need repeating after microcode load goes below + * here. + */ + if (!(c->vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON))) park_offline_cpus = opt_mce; - - initialize_cpu_data(0); } void reset_cpuinfo(struct cpuinfo_x86 *c, bool keep_basic)