diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 15d4b050b338..c724e8b6f107 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -689,11 +689,11 @@ static inline bool cpu_handle_halt(CPUState *cpu) return true; } - cpu->halted = cpu->on_reset; + cpu->halted = 0; } #endif /* !CONFIG_USER_ONLY */ - return cpu->on_reset; + return false; } static inline void cpu_handle_debug_exception(CPUState *cpu) diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index dff635393b8d..ced66c2b3429 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -116,34 +116,15 @@ void cpu_reset(CPUState *cpu) trace_cpu_reset(cpu->cpu_index); } -static void cpu_common_reset_enter(Object *obj, ResetType type) +static void cpu_common_reset_hold(Object *obj) { CPUState *cpu = CPU(obj); CPUClass *cc = CPU_GET_CLASS(cpu); - cpu->on_reset = true; if (qemu_loglevel_mask(CPU_LOG_RESET)) { - qemu_log("CPU Reset Enter (CPU %d)\n", cpu->cpu_index); + qemu_log("CPU Reset (CPU %d)\n", cpu->cpu_index); log_cpu_state(cpu, cc->reset_dump_flags); } -} - -static void cpu_common_reset_exit(Object *obj) -{ - CPUState *cpu = CPU(obj); - cpu->on_reset = false; - cpu->halted = 0; - if (qemu_loglevel_mask(CPU_LOG_RESET)) { - CPUClass *cc = CPU_GET_CLASS(cpu); - qemu_log("CPU Reset Exit (CPU %d) PC:0x%" VADDR_PRIx "\n", - cpu->cpu_index, cc->get_pc(cpu)); - } - cpu_resume(cpu); -} - -static void cpu_common_reset_hold(Object *obj) -{ - CPUState *cpu = CPU(obj); cpu->interrupt_request = 0; cpu->halted = cpu->start_powered_off; @@ -289,9 +270,7 @@ static void cpu_class_init(ObjectClass *klass, void *data) set_bit(DEVICE_CATEGORY_CPU, dc->categories); dc->realize = cpu_common_realizefn; dc->unrealize = cpu_common_unrealizefn; - rc->phases.enter = cpu_common_reset_enter; rc->phases.hold = cpu_common_reset_hold; - rc->phases.exit = cpu_common_reset_exit; cpu_class_init_props(dc); /* * Reason: CPUs still need special care by board code: wiring up diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index f5ca8a6505cb..fdcbe8735258 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -348,7 +348,6 @@ struct CPUState { /* Should CPU start in powered-off state? */ bool start_powered_off; - bool on_reset; bool unplug; bool crash_occurred;