From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvoCk-0006jr-07 for qemu-devel@nongnu.org; Mon, 09 Nov 2015 10:18:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvoCh-0002nc-9S for qemu-devel@nongnu.org; Mon, 09 Nov 2015 10:17:57 -0500 Received: from e33.co.us.ibm.com ([32.97.110.151]:57789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvoCg-0002nX-NM for qemu-devel@nongnu.org; Mon, 09 Nov 2015 10:17:55 -0500 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Nov 2015 08:17:54 -0700 Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 3C9753E4003B for ; Mon, 9 Nov 2015 08:17:52 -0700 (MST) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tA9FGNES393600 for ; Mon, 9 Nov 2015 08:16:23 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tA9FHplE020303 for ; Mon, 9 Nov 2015 08:17:51 -0700 From: Matthew Rosato Date: Mon, 9 Nov 2015 10:17:38 -0500 Message-Id: <1447082260-427-3-git-send-email-mjrosato@linux.vnet.ibm.com> In-Reply-To: <1447082260-427-1-git-send-email-mjrosato@linux.vnet.ibm.com> References: <1447082260-427-1-git-send-email-mjrosato@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 2/4] s390x/cpu: Set initial CPU state in common routine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: cornelia.huck@de.ibm.com, borntraeger@de.ibm.com, agraf@suse.de, afaerber@suse.de, rth@twiddle.net Both initial and hotplugged CPUs need to set the same initial state. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio.c | 4 ---- target-s390x/cpu.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c index 496898c..b9cf058 100644 --- a/hw/s390x/s390-virtio.c +++ b/hw/s390x/s390-virtio.c @@ -180,14 +180,10 @@ void s390_init_cpus(MachineState *machine) for (i = 0; i < smp_cpus; i++) { S390CPU *cpu; - CPUState *cs; cpu = cpu_s390x_init(machine->cpu_model); - cs = CPU(cpu); ipi_states[i] = cpu; - cs->halted = 1; - cs->exception_index = EXCP_HLT; } } diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 189a2af..aafbbdc 100644 --- a/target-s390x/cpu.c +++ b/target-s390x/cpu.c @@ -218,6 +218,8 @@ static void s390_cpu_initfn(Object *obj) #endif cs->env_ptr = env; + cs->halted = 1; + cs->exception_index = EXCP_HLT; cpu_exec_init(cs, &error_abort); #if !defined(CONFIG_USER_ONLY) qemu_register_reset(s390_cpu_machine_reset_cb, cpu); -- 1.9.1