From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHt0e-00023O-S2 for qemu-devel@nongnu.org; Thu, 05 May 2011 03:30:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHt0d-0003AN-QK for qemu-devel@nongnu.org; Thu, 05 May 2011 03:30:04 -0400 Received: from mtagate4.uk.ibm.com ([194.196.100.164]:34362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHt0d-00038t-GN for qemu-devel@nongnu.org; Thu, 05 May 2011 03:30:03 -0400 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate4.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p457Tw5Z025666 for ; Thu, 5 May 2011 07:29:58 GMT Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p457VAkA2588876 for ; Thu, 5 May 2011 08:31:10 +0100 Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p457TwTe009561 for ; Thu, 5 May 2011 01:29:58 -0600 Message-ID: <4DC251F5.1000204@de.ibm.com> Date: Thu, 05 May 2011 09:29:57 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <4DC12DE4.80702@de.ibm.com> <4DC1317A.6040700@siemens.com> <4DC17B1E.2080305@de.ibm.com> <9B1B9FD2-E87F-4096-B68F-93F2BE3D5205@suse.de> In-Reply-To: <9B1B9FD2-E87F-4096-B68F-93F2BE3D5205@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] s390x: fix smp support for kvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Jan Kiszka , "qemu-devel@nongnu.org" , Carsten Otte Currently smp support for kvm does not work. 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 the kvm run ioctl. (these CPUs will be started by a SIGP restart later during the boot process) We need to tell the loop that this cpu should not run. Jan Kiszka pointed out that kvm_arch_process_async_events is the right place to do. Signed-off-by: Christian Borntraeger --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -172,7 +172,7 @@ void kvm_arch_post_run(CPUState *env, struct kvm_run *run) int kvm_arch_process_async_events(CPUState *env) { - return 0; + return env->halted; } void kvm_s390_interrupt_internal(CPUState *env, int type, uint32_t parm,