From ce5b1bbf624b977a55ff7f85bb3871682d03baff Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 20 Oct 2016 13:26:03 +0200 Subject: exec: move cpu_exec_init() calls to realize functions Modify all CPUs to call it from XXX_cpu_realizefn() function. Remove all the cannot_destroy_with_object_finalize_yet as unsafe references have been moved to cpu_exec_realizefn(). (tested with QOM command provided by commit 4c315c27) for arm: Setting of cpu->mp_affinity is moved from arm_cpu_initfn() to arm_cpu_realizefn() as setting of cpu_index is now done in cpu_exec_realizefn(). To avoid to overwrite an user defined value, we set it to an invalid value by default, and update it in realize function only if the value is still invalid. Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Reviewed-by: Igor Mammedov Reviewed-by: Eduardo Habkost Reviewed-by: Andrew Jones Signed-off-by: Eduardo Habkost --- include/qom/cpu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/qom') diff --git a/include/qom/cpu.h b/include/qom/cpu.h index d7648a9..5520c6c 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -947,6 +947,7 @@ AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx); 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); #ifdef CONFIG_SOFTMMU -- cgit v1.1