]> xenbits.xensource.com Git - xen.git/commit
x86/x2APIC: correct cluster tracking upon CPUs going down for S3
authorJan Beulich <jbeulich@suse.com>
Tue, 24 Sep 2024 12:38:27 +0000 (14:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 24 Sep 2024 12:38:27 +0000 (14:38 +0200)
commit404fb9b745dd3f1ca17c3e957e43e3f95ab2613a
tree3dc6cd6cbe659d890f8a66d743a9871c9fd45a6a
parenta0d6b75b832d2f7c54429de1a550fe122bcd6881
x86/x2APIC: correct cluster tracking upon CPUs going down for S3

Downing CPUs for S3 is somewhat special: Since we can expect the system
to come back up in exactly the same hardware configuration, per-CPU data
for the secondary CPUs isn't de-allocated (and then cleared upon re-
allocation when the CPUs are being brought back up). Therefore the
cluster_cpus per-CPU pointer will retain its value for all CPUs other
than the final one in a cluster (i.e. in particular for all CPUs in the
same cluster as CPU0). That, however, is in conflict with the assertion
early in init_apic_ldr_x2apic_cluster().

Note that the issue is avoided on Intel hardware, where we park CPUs
instead of bringing them down.

Extend the bypassing of the freeing to the suspend case, thus making
suspend/resume also a tiny bit faster.

Fixes: 2e6c8f182c9c ("x86: distinguish CPU offlining from CPU removal")
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: ad3ff7b4279d16c91c23cda6e8be5bc670b25c9a
master date: 2024-08-26 10:30:40 +0200
xen/arch/x86/genapic/x2apic.c