linux-stable/arch/x86
Thomas Gleixner c90399fbd7 x86/cpu: Ensure that CPU info updates are propagated on UP
The boot sequence evaluates CPUID information twice:

  1) During early boot

  2) When finalizing the early setup right before
     mitigations are selected and alternatives are patched.

In both cases the evaluation is stored in boot_cpu_data, but on UP the
copying of boot_cpu_data to the per CPU info of the boot CPU happens
between #1 and #2. So any update which happens in #2 is never propagated to
the per CPU info instance.

Consolidate the whole logic and copy boot_cpu_data right before applying
alternatives as that's the point where boot_cpu_data is in it's final
state and not supposed to change anymore.

This also removes the voodoo mb() from smp_prepare_cpus_common() which
had absolutely no purpose.

Fixes: 71eb4893cf ("x86/percpu: Cure per CPU madness on UP")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240322185305.127642785@linutronix.de
2024-03-23 12:22:04 +01:00
..
boot - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
coco x86/sev: Fix position dependent variable references in startup code 2024-02-06 16:38:42 +01:00
configs x86/config: Fix warning for 'make ARCH=x86_64 tinyconfig' 2024-03-21 10:09:41 +01:00
crypto This update includes the following changes: 2024-01-10 12:23:43 -08:00
entry Core x86 changes for v6.9: 2024-03-11 19:53:15 -07:00
events perf/x86/amd/core: Avoid register reset when CPU is dead 2024-03-13 11:01:30 +01:00
hyperv Rework of APIC enumeration and topology evaluation: 2024-03-11 15:45:55 -07:00
ia32
include x86/pm: Work around false positive kmemleak report in msr_build_context() 2024-03-22 11:01:31 +01:00
kernel x86/cpu: Ensure that CPU info updates are propagated on UP 2024-03-23 12:22:04 +01:00
kvm S390: 2024-03-15 13:03:13 -07:00
lib Merge branch 'linus' into x86/boot, to resolve conflict 2024-03-12 09:55:57 +01:00
math-emu
mm - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
net Networking changes for 6.9. 2024-03-12 17:44:08 -07:00
pci PCI: Disable D3cold on Asus B1400 PCI-NVMe bridge 2024-02-29 13:25:24 -06:00
platform platform-drivers-x86 for v6.9-1 2024-03-14 10:44:09 -07:00
power - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
purgatory x86/bugs: Rename CONFIG_RETPOLINE => CONFIG_MITIGATION_RETPOLINE 2024-01-10 10:52:28 +01:00
ras
realmode x86/trampoline: Bypass compat mode in trampoline_start64() if not needed 2024-02-23 08:40:29 -08:00
tools x86, relocs: Ignore relocations in .notes section 2024-02-29 22:34:42 -08:00
um This pull request contains the following changes for UML: 2024-01-17 10:44:34 -08:00
video
virt crypto: ccp: Add panic notifier for SEV/SNP firmware shutdown on kdump 2024-01-29 20:34:19 +01:00
xen - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
.gitignore
Kbuild x86/sev: Add SEV-SNP host initialization support 2024-01-29 17:20:23 +01:00
Kconfig S390: 2024-03-15 13:03:13 -07:00
Kconfig.assembler
Kconfig.cpu x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 2024-02-09 16:28:19 +01:00
Kconfig.debug
Makefile - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
Makefile.postlink kbuild: remove ARCH_POSTLINK from module builds 2023-10-28 21:10:08 +09:00
Makefile.um
Makefile_32.cpu