From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHZnh-0002tL-3m for qemu-devel@nongnu.org; Wed, 04 May 2011 06:59:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHZng-0003oN-2b for qemu-devel@nongnu.org; Wed, 04 May 2011 06:59:24 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:36776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHZnf-0003nn-S9 for qemu-devel@nongnu.org; Wed, 04 May 2011 06:59:24 -0400 Message-ID: <4DC1317A.6040700@siemens.com> Date: Wed, 04 May 2011 12:59:06 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4DC12DE4.80702@de.ibm.com> In-Reply-To: <4DC12DE4.80702@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: jan.kiszka@siemens.com Subject: Re: [Qemu-devel] s390x kvm and smp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: Carsten Otte , Alexander Graf , qemu-devel@nongnu.org On 2011-05-04 12:43, Christian Borntraeger wrote: > 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? s390 just need to return a meaningful value from kvm_arch_process_async_events, e.g. env->halted, see other archs. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux