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

RE: [Xen-devel] Fix for SMP xen dom0/domU for x86_64



The Patch I made for SMP dom0 is also applicable to SMP domU. The issue
is same for dom0 & domu as they both are compiled from the same code.
The dom0 fix I sent earlier also fixes the domU SMP issue.

Thanks & Regards,
Nitin
------------------------------------------------------------------------
-----------
Open Source Technology Center, Intel Corp

>-----Original Message-----
>From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-
>bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of David F Barrera
>Sent: Tuesday, October 18, 2005 2:20 PM
>To: Puthiyaparambil, Aravindh
>Cc: xen-devel
>Subject: RE: [Xen-devel] Unable to bring up SMP DomUs on x86_64 Xen
>
>On the SLES 9 SP2 system, I do see the stop_this_cpu.. message (my
>original response was from an FC4 based system):
>
>(XEN) (file=traps.c, line=968) Non-priv domain attempted
>RDMSR(00000000c0000100,00000045,ffffffffff5fd000).
>(XEN) (file=traps.c, line=968) Non-priv domain attempted
>RDMSR(00000000c0000101,00000000,00000000).
>(XEN) (file=traps.c, line=968) Non-priv domain attempted
>RDMSR(00000000c0000102,803c7b80,ffffffff).
>stop_this_cpu disable_local_APIC
>
>On Tue, 2005-10-18 at 17:15 -0400, Puthiyaparambil, Aravindh wrote:
>> Dave,
>>
>> Thanks for confirming it. I have opened a Bugzilla report.
>>
>> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=342
>>
>> Aravindh
>>
>> > On Tue, 2005-10-18 at 16:45 -0400, Puthiyaparambil, Aravindh wrote:
>> > > I was trying to bring up a SMP DomU on Xen x86_64. The DomU dies
>> while
>> > > booting processor 1/1. This is in spite of the fact that I have
set
>> > > vcpus to 4 in the DomU configuration file. I confirmed that the
DomU
>> > > kernel was compiled with SMP turned on. I am seeing this on the
Dell
>> and
>> > > ES7000 x86_64 boxes. Is anyone else seeing this issue or am I
doing
>> > > something wrong?
>> >
>> > I am seeing it, too:
>> > [root@bl2-10 ~]# xm create -c /tmp/xen/test.cfg
>> > Using config file "/tmp/xen/test.cfg".
>> > Started domain vm1
>> > Linux version 2.6.12-xenU (root@bl2-10) (gcc version 4.0.0 20050405
>> (Red
>> > Hat 4.0
>> > .0-0.40)) #1 SMP Tue Oct 18 07:05:25 CDT 2005
>> > kernel direct mapping tables upto 20000000 @ 50e000-610000
>> > Built 1 zonelists
>> > Kernel command line:  root=/dev/sdb2 ro
>> > Initializing CPU#0
>> > PID hash table entries: 4096 (order: 12, 131072 bytes)
>> > Xen reported: 3600.124 MHz processor.
>> > Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
>> > Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
>> > Memory: 509440k/524288k available (1921k kernel code, 14336k
reserved,
>> > 639k data
>> > , 136k init)
>> > Mount-cache hash table entries: 256
>> > CPU: Trace cache: 12K uops, L1 D cache: 16K
>> > CPU: L2 cache: 1024K
>> > CPU: Physical Processor ID: 3
>> > Booting processor 1/1 rip ffffffff80100008 rsp ffff880000655f58
>> > Initializing CPU#1
>> > CPU: Trace cache: 12K uops, L1 D cache: 16K
>> > CPU: L2 cache: 1024K
>> > CPU: Physical Processor ID: 0
>> >                   Intel(R) Xeon(TM) CPU 3.60GHz stepping 01
>> > Booting processor 2/2 rip ffffffff80100008 rsp ffff88000069ff58
>> > Initializing CPU#2
>> > CPU: Trace cache: 12K uops, L1 D cache: 16K
>> > CPU: L2 cache: 1024K
>> > CPU: Physical Processor ID: 0
>> >                   Intel(R) Xeon(TM) CPU 3.60GHz stepping 01
>> > Booting processor 3/3 rip ffffffff80100008 rsp ffff880000089f58
>> > Initializing CPU#3
>> > CPU: Trace cache: 12K uops, L1 D cache: 16K
>> > CPU: L2 cache: 1024K
>> > CPU: Physical Processor ID: 3
>> >                   Intel(R) Xeon(TM) CPU 3.60GHz stepping 01
>> > Brought up 4 CPUs
>> >
>> > ------------------------------------------------
>> >
>> > I am not seeing the stop_this_cpu... message, however. You may want
to
>> > write a defect on the Xen bugzilla, or, if you'd like, I can do it.
>> >
>> > David
>> >
>> > >
>> > > Aravindh
>> > >
>> > > DomU BOOT OUTPUT
>> > > ----------------
>> > > xenbox:~/xen/vm # xm create dom64_2 -c
>> > > Using config file "dom64_2".
>> > > Started domain dom64_2
>> > > Linux version 2.6.12-xenU (root@xenbox) (gcc version 3.3.3 (SuSE
>> Linux))
>> > > #1 SMP Tue Oct 18 16:17:52 EDT 2005
>> > > kernel direct mapping tables upto 18000000 @ 474000-536000
>> > > Built 1 zonelists
>> > > Kernel command line:  root=/dev/sda1 ro 3
>> > > Initializing CPU#0
>> > > PID hash table entries: 2048 (order: 11, 65536 bytes)
>> > > Xen reported: 2992.694 MHz processor.
>> > > Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
>> > > Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
>> > > Memory: 381952k/393216k available (1669k kernel code, 10836k
>> reserved,
>> > > 560k data, 136k init)
>> > > Mount-cache hash table entries: 256
>> > > CPU: Trace cache: 12K uops, L1 D cache: 16K
>> > > CPU: L2 cache: 1024K
>> > > CPU: Physical Processor ID: 0
>> > > Booting processor 1/1 rip ffffffff80100008 rsp ffff880000575f58
>> > >
>> > > SERIAL OUTPUT
>> > > -------------
>> > > (XEN) (file=traps.c, line=968) Non-priv domain attempted
>> > > RDMSR(00000000c0000080,00018000,00018000).
>> > > (XEN) (file=traps.c, line=960) Non-priv domain attempted
>> > > WRMSR(00000000c0000100,00000000,00000000).
>> > > (XEN) (file=traps.c, line=960) Non-priv domain attempted
>> > > WRMSR(00000000c0000102,00000000,00000000).
>> > > (XEN) (file=traps.c, line=968) Non-priv domain attempted
>> > > RDMSR(00000000c0000080,00000000,00000000).
>> > > (XEN) (file=traps.c, line=960) Non-priv domain attempted
>> > > WRMSR(00000000c0000100,00000000,00000000).
>> > > (XEN) (file=traps.c, line=960) Non-priv domain attempted
>> > > WRMSR(00000000c0000102,00000000,00000000).
>> > > (XEN) (file=traps.c, line=968) Non-priv domain attempted
>> > > RDMSR(00000000c0000080,00000000,00000000).
>> > > (XEN) (file=traps.c, line=968) Non-priv domain attempted
>> > > RDMSR(00000000c0000100,00000045,ffffffffff5fd000).
>> > > (XEN) (file=traps.c, line=968) Non-priv domain attempted
>> > > RDMSR(00000000c0000101,00000000,00000000).
>> > > (XEN) (file=traps.c, line=968) Non-priv domain attempted
>> > > RDMSR(00000000c0000102,80372b00,ffffffff).
>> > > stop_this_cpu disable_local_APIC
>> > >
>> > > _______________________________________________
>> > > Xen-devel mailing list
>> > > Xen-devel@xxxxxxxxxxxxxxxxxxx
>> > > http://lists.xensource.com/xen-devel
>> > >
>> > --
>> > Regards,
>> >
>> > David F Barrera
>> > Linux Technology Center
>> > Systems and Technology Group, IBM
>> >
>> > "The wisest men follow their own direction. "
>> >                                                         Euripides
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
>>
>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel

Attachment: smpbootfix.patch
Description: smpbootfix.patch

--- Begin Message ---
Keir, Ian,

    The local_setup_timer prototype was bad. The call from start
secondary() to it was calling with out the CPU parameter. Eventually the
CPU parameter received by the local_setup_timer is bogus (big negative
number). With such a big cpu number the per_cpu macro was trying to
access totally wrong memory location (per cpu data offset for big -ve no
cpu) causing the unhandled page fault. Because the dom0 was panicking
the error information on the serial console was also not going through,
giving just clueless hang.  With hyper call based debug statement I
could find out what was going wrong in the dom0.

 

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@xxxxxxxxx>

 

diff -r 446aa56ca4fee7d3ea2badfb59e8bb3540b507ae
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c

--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c     Mon Oct
17 12:50:28 2005

+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c     Mon Oct
17 18:07:11 2005

@@ -445,7 +445,7 @@

 }

 

 #ifdef CONFIG_XEN

-extern void local_setup_timer(void);

+extern void local_setup_timer(unsigned int cpu);

 #endif

 

 /*

@@ -478,7 +478,7 @@

 

        enable_APIC_timer();

 #else

-       local_setup_timer();

+       local_setup_timer(smp_processor_id());

        smp_intr_init();

        local_irq_enable();

 #endif

 

 

Thanks & Regards,

Nitin

------------------------------------------------------------------------
-----------

Open Source Technology Center, Intel Corp

 


--- End Message ---
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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