[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix x86_64 SMP support.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID df98f37a88b05ced33ed0915efa576e5b110b60d
# Parent  2710f2fe624a5103d198e6685e250c6678f34ec1
Fix x86_64 SMP support.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 2710f2fe624a -r df98f37a88b0 
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Tue Feb  7 
11:59:27 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Tue Feb  7 
13:57:40 2006
@@ -911,6 +911,9 @@
        init_apic_mappings();
 #endif
 #endif
+#if defined(CONFIG_XEN) && defined(CONFIG_SMP) && !defined(CONFIG_HOTPLUG_CPU)
+       prefill_possible_map();
+#endif
 
 #if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN)
        /*
diff -r 2710f2fe624a -r df98f37a88b0 
linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c     Tue Feb  7 
11:59:27 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c     Tue Feb  7 
13:57:40 2006
@@ -272,8 +272,10 @@
         * Initialize the per-CPU GDT with the boot GDT,
         * and set up the GDT descriptor:
         */
+#ifndef CONFIG_XEN 
        if (cpu)
                memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE);
+#endif
 
        cpu_gdt_descr[cpu].size = GDT_SIZE;
 #ifndef CONFIG_XEN 
diff -r 2710f2fe624a -r df98f37a88b0 
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Tue Feb  7 11:59:27 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Tue Feb  7 13:57:40 2006
@@ -81,6 +81,18 @@
 unsigned int maxcpus = NR_CPUS;
 #endif
 
+void __init prefill_possible_map(void)
+{
+       int i, rc;
+
+       for (i = 0; i < NR_CPUS; i++) {
+               rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
+               if (rc == -ENOENT)
+                       break;
+               cpu_set(i, cpu_possible_map);
+       }
+}
+
 void __init smp_alloc_memory(void)
 {
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.