From 7bbc124e7e8fb544288ccd1f5185643a7d0554b8 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 20 Oct 2016 13:26:04 +0200 Subject: exec: call cpu_exec_exit() from a CPU unrealize common function As cpu_exec_exit() mirrors the cpu_exec_realizefn(), rename it as cpu_exec_unrealizefn(). Create and register a cpu_common_unrealizefn() function for the CPU device class and call cpu_exec_unrealizefn() from this function. Remove cpu_exec_exit() from cpu_common_finalize() (which mirrors init, not realize), and as x86_cpu_unrealizefn() and ppc_cpu_unrealizefn() overwrite the device class unrealize function, add a call to a parent_unrealize pointer. Signed-off-by: Laurent Vivier Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- include/qom/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 5520c6c3c1..633c3fc124 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -948,7 +948,7 @@ void QEMU_NORETURN cpu_abort(CPUState *cpu, const char *fmt, ...) GCC_FMT_ATTR(2, 3); void cpu_exec_initfn(CPUState *cpu); void cpu_exec_realizefn(CPUState *cpu, Error **errp); -void cpu_exec_exit(CPUState *cpu); +void cpu_exec_unrealizefn(CPUState *cpu); #ifdef CONFIG_SOFTMMU extern const struct VMStateDescription vmstate_cpu_common; -- cgit v1.2.3