Subject: Re: Multiprocessor support
To: Andreas Gustafsson <gson@gson.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-xen
Date: 09/05/2007 18:42:56
On Wed, Sep 05, 2007 at 07:39:39PM +0300, Andreas Gustafsson wrote:
> Manuel Bouyer wrote:
> > > - Can you run a GENERIC_MP kernel fully virtualized using HVM and
> > > take advantage of multiple CPUs that way?
> >
> > This should work. I run a windows 2003 HVM which see multiple CPUs, so
> > it should work with NetBSD too.
>
> I built a -current kernel using the following configuration file
> (NOFLOPPY.MP):
>
> include "arch/i386/conf/GENERIC.MP"
> no fdc0 at isa?
> no fd* at fdc?
>
> I then booted it under Xen 3.0.3 on an Intel Core 2 Quad Q6600 CPU,
> using the following Xen configuration file:
>
> kernel = "/usr/lib/xen-ioemu-3.0/boot/hvmloader"
> builder = 'hvm'
> memory = 256
> name = "curvi"
> vcpus = 4
> acpi = 1
> apic = 1
> vif = [ 'type=ioemu, bridge=xenbr0,mac=00:16:3e:49:34:80' ]
> disk = ['phy:/dev/mapper/guesthouse-current,ioemu:hda,w']
> device_model = '/usr/lib/xen-ioemu-3.0/bin/qemu-dm'
> ne2000=0
> boot='c'
> serial = 'pty'
> nographic = 1
>
> It hung while attaching the third CPU core:
>
> >> NetBSD/i386 BIOS Boot, Revision 3.3
> >> (root@guru.araneus.fi, Mon Aug 6 21:18:55 EEST 2007)
> >> Memory: 639/261120 k
> Press return to boot now, any other key for boot menu
> booting hd0a:netbsd - starting in 0
> 9165028+421316+363768 [461888+446360]=0xa5ca38
> BIOS CFG: Model-SubM-Rev: fc-00-01, 0x4074<EBDA,KBDINT,RTC,IC2,KBDF>
> Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
> 2006, 2007
> The NetBSD Foundation, Inc. All rights reserved.
> Copyright (c) 1982, 1986, 1989, 1991, 1993
> The Regents of the University of California. All rights reserved.
>
> NetBSD 4.99.30 (NOFLOPPY.MP) #0: Wed Sep 5 19:10:40 EEST 2007
> root@dhcppc1:/usr/src/sys/arch/i386/compile/NOFLOPPY.MP
> total memory = 255 MB
> rbus: rbus_min_start set to 0x40000000
> avail memory = 240 MB
> mainbus0 (root)
> cpu0 at mainbus0 apid 0: (boot processor)
> cpu0: Intel Core 2 (Merom) (686-class), 2400.24 MHz, id 0x6f7
> cpu0: "Intel(R) Core(TM)2 Quad CPU @ 2.40GHz"
> cpu1 at mainbus0 apid 1: (application processor)
> cpu1: Intel Core 2 (Merom) (686-class), 2400.33 MHz, id 0x6f7
> cpu1: "Intel(R) Core(TM)2 Quad CPU @ 2.40GHz"
> cpu2 at mainbus0 apid 2: (application processor)
>
> There was no more output after that. When I tried to destroy the hung
> VM using "xm destroy curvi", the whole system locked up (including the
> Linux dom0) and had to be rebooted.
>
> If I set "vcpus = 2" in the configuration file, NetBSD boots
> successfully.
Maybe try without acpi ?
No need to build a new kernel to try, just
boot -c
disable acpi
quit
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
NetBSD: 26 ans d'experience feront toujours la difference
--