x86/S3: don't lose previously collected CPU data

smp_store_cpu_info() doesn't call identify_cpu() again during S3 resume,
hence it is wrong to overwrite APs' data using boot_cpu_data. With
7126b7f806 ("x86/CPU: re-work populating of cpu_data[]") this now
results in a crash, as the cpu_to_socket() use in smp_store_cpu_info()
then obtains a bad socket number, much like was already observed in [1].

[1] https://lists.xen.org/archives/html/xen-devel/2025-06/msg01879.html

Fixes: bb502a8ca5 ("x86: check feature flags after resume")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
master commit: acaa69d985
master date: 2025-07-17 12:49:18 +0200
This commit is contained in:
Jan Beulich committed 2025-07-22 10:00:00 +02:00
1 parent 687ae6747d
commit e0ef14b32e
1 file changed
+3 -1
+3 -1
View File
@@ -363,7 +363,9 @@ void asmlinkage start_secondary(void *unused)
cpu_init();
initialize_cpu_data(cpu);
/* During resume, must not clear previously collected data. */
if ( system_state != SYS_STATE_resume )
initialize_cpu_data(cpu);
microcode_update_one();
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.