[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 4/9] s390x/cpu: Set initial CPU state in common r
From: |
Matthew Rosato |
Subject: |
[Qemu-devel] [PATCH v2 4/9] s390x/cpu: Set initial CPU state in common routine |
Date: |
Thu, 19 Nov 2015 10:10:09 -0500 |
Both initial and hotplugged CPUs need to set the same initial
state.
Signed-off-by: Matthew Rosato <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
---
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 6304433..84cde80 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
- [Qemu-devel] [PATCH v2 0/9] s390: Allow hotplug of s390 CPUs, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 1/9] cpus: Reclaim vCPU objects, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 6/9] s390x/cpu: Add functions to (un)register CPU state, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 4/9] s390x/cpu: Set initial CPU state in common routine,
Matthew Rosato <=
- [Qemu-devel] [PATCH v2 5/9] s390x/cpu: Move some CPU initialization into realize, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 3/9] s390x/cpu: Cleanup init in preparation for hotplug, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 2/9] cpus: Add a sync version of cpu_remove(), Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 7/9] s390x/cpu: Extra cleanup during CPU finalize, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 9/9] s390x/cpu: Allow hot plug/unplug of CPUs, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 8/9] s390/virtio-ccw: Add hotplug handler and prepare for unplug, Matthew Rosato, 2015/11/19