Received: from [140.186.70.92] (port=39221 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFaE4-00015G-HE for qemu-devel@nongnu.org; Mon, 08 Nov 2010 17:30:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFaE3-0004AL-1V for qemu-devel@nongnu.org; Mon, 08 Nov 2010 17:30:08 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]:45594 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PFaE2-0004A3-Lv for qemu-devel@nongnu.org; Mon, 08 Nov 2010 17:30:06 -0500 From: xscript@gmx.net (=?utf-8?Q?Llu=C3=ADs?=) Subject: Re: [Qemu-devel] smp: linux guest only sees 1 CPU when not using KVM References: <87lj531nsw.fsf@ginnungagap.bsc.es> <20101108220942.GM12909@caffeine.csclub.uwaterloo.ca> Date: Mon, 08 Nov 2010 23:30:52 +0100 In-Reply-To: <20101108220942.GM12909@caffeine.csclub.uwaterloo.ca> (Lennart Sorensen's message of "Mon, 8 Nov 2010 17:09:42 -0500") Message-ID: <87fwvb1m8z.fsf@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Lennart Sorensen writes: > On Mon, Nov 08, 2010 at 10:57:19PM +0100, Llu=C3=ADs wrote: >> Well, thre's nothing more to add than the contents in the subject. >>=20 >> I tried booting up with -smp 2, and /proc/cpuinfo on the linux guest >> only return one CPU, while booting with "-smp 2 -enable-kvm" shows 2 >> CPUs. > I was under the impression qemu didn't emulate SMP. KVM on the other > hand does support running on real SMP hardware. It doesn't have to > emulate SMP after all. Well, I thought it did when I saw the "-smp" option, and it does in fact create multiple CPUState objects, as if the "extra" cpus where unplugged. In fact, cpus.c:cpu_exec_all does indeed loop through all the CPUState objects, calling qemu_cpu_exec on each. Lluis --=20 "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth