From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHZYo-0006j2-TR for qemu-devel@nongnu.org; Wed, 04 May 2011 06:44:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHZYn-0000wc-VY for qemu-devel@nongnu.org; Wed, 04 May 2011 06:44:02 -0400 Received: from mtagate1.uk.ibm.com ([194.196.100.161]:60756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHZYn-0000wW-Ir for qemu-devel@nongnu.org; Wed, 04 May 2011 06:44:01 -0400 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p44Aht4H027104 for ; Wed, 4 May 2011 10:43:55 GMT Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p44Aj0dJ2539694 for ; Wed, 4 May 2011 11:45:06 +0100 Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p44AhnrI030976 for ; Wed, 4 May 2011 04:43:49 -0600 Message-ID: <4DC12DE4.80702@de.ibm.com> Date: Wed, 04 May 2011 12:43:48 +0200 From: Christian Borntraeger MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] s390x kvm and smp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Carsten Otte , qemu-devel@nongnu.org Alex, I have trouble getting kvm smp support running. Turns out that qemu does a kvm run even on secondary CPUs which dont have a sane state (initial psw == 0) triggering some program faults. Architecturally these cpus are in the stopped state, so we should not do KVM_RUN. (these CPUs will be started by a SIGP restart later during the boot process) This patch seems to help (it allows me to boot and use more than 1 cpu) --- a/cpus.c +++ b/cpus.c @@ -131,6 +131,10 @@ static void do_vm_stop(int reason) static int cpu_can_run(CPUState *env) { + if (env->halted) { + return 0; + } + if (env->stop) { return 0; } but it does not look like the right solution. What are the proper definitions for halted and stopped? Christian