From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aarbt-0000EQ-9h for qemu-devel@nongnu.org; Tue, 01 Mar 2016 16:13:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aarbq-0002Hm-2n for qemu-devel@nongnu.org; Tue, 01 Mar 2016 16:13:37 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:48986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aarbp-0002Ha-RI for qemu-devel@nongnu.org; Tue, 01 Mar 2016 16:13:34 -0500 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Mar 2016 14:13:33 -0700 Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 55B831FF0023 for ; Tue, 1 Mar 2016 14:01:39 -0700 (MST) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u21LDT8i31850568 for ; Tue, 1 Mar 2016 21:13:29 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u21L9JH8002384 for ; Tue, 1 Mar 2016 16:09:20 -0500 From: Matthew Rosato Date: Tue, 1 Mar 2016 16:13:22 -0500 Message-Id: <1456866806-31466-3-git-send-email-mjrosato@linux.vnet.ibm.com> In-Reply-To: <1456866806-31466-1-git-send-email-mjrosato@linux.vnet.ibm.com> References: <1456866806-31466-1-git-send-email-mjrosato@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v7 2/6] 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: dahi@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com, imammedo@redhat.com, bharata@linux.vnet.ibm.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com, 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 b576811..b3707f4 100644 --- a/hw/s390x/s390-virtio.c +++ b/hw/s390x/s390-virtio.c @@ -107,14 +107,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 73a910d..603c2a1 100644 --- a/target-s390x/cpu.c +++ b/target-s390x/cpu.c @@ -219,6 +219,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