# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1300122321 0
# Node ID a29b35408950ce91013787d4ac3e874da9bc7bd1
# Parent 9a15ff175e0040d1ff1d568683c177d2b5d3ae27
x86: fix cpu_sibling_map initialization when topology CPUID leaf is present
c/s 21811:12f0618400de broke this by not properly initializing struct
cpuinfo_x86's x86_num_siblings member (other than Linux, where this is
a global variable, it is being maintained per CPU by Xen).
Hyper-threaded CPUs with CPUID leaf 0xb present had therefore all
cpu_sibling_map-s with just a single bit set, thus improperly feeding
the scheduler.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
diff -r 9a15ff175e00 -r a29b35408950 xen/arch/x86/cpu/common.c
--- a/xen/arch/x86/cpu/common.c Mon Mar 14 17:04:42 2011 +0000
+++ b/xen/arch/x86/cpu/common.c Mon Mar 14 17:05:21 2011 +0000
@@ -477,7 +477,7 @@
{
unsigned int eax, ebx, ecx, edx, sub_index;
unsigned int ht_mask_width, core_plus_mask_width;
- unsigned int core_select_mask, core_level_siblings, smp_num_siblings;
+ unsigned int core_select_mask, core_level_siblings;
unsigned int initial_apicid;
int cpu = smp_processor_id();
@@ -495,7 +495,7 @@
initial_apicid = edx;
/* Populate HT related information from sub-leaf level 0 */
- core_level_siblings = smp_num_siblings = LEVEL_MAX_SIBLINGS(ebx);
+ core_level_siblings = c->x86_num_siblings = LEVEL_MAX_SIBLINGS(ebx);
core_plus_mask_width = ht_mask_width = BITS_SHIFT_NEXT_LEVEL(eax);
sub_index = 1;
@@ -519,7 +519,7 @@
phys_proc_id[cpu] = phys_pkg_id(initial_apicid, core_plus_mask_width);
c->apicid = phys_pkg_id(initial_apicid, 0);
- c->x86_max_cores = (core_level_siblings / smp_num_siblings);
+ c->x86_max_cores = (core_level_siblings / c->x86_num_siblings);
if ( opt_cpu_info )
{
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|