[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/19] target-s390: move back cpu_exec_init() to ini
From: |
Laurent Vivier |
Subject: |
[Qemu-devel] [PATCH 04/19] target-s390: move back cpu_exec_init() to init |
Date: |
Wed, 5 Oct 2016 21:38:38 +0200 |
We have now the cpu_exec_realize() in realize,
so the init part must be in init.
I've removed the cannot_destroy_with_object_finalize_yet field as
it should be removed by commit c6644fc.
(tested with QOM command provided by commit 4c315c27 with
"z890.3-s390-cpu")
CC: Richard Henderson <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
target-s390x/cpu.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index 20a88dd..74154a9 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -207,10 +207,6 @@ static void s390_cpu_realizefn(DeviceState *dev, Error
**errp)
goto out;
}
- cpu_exec_init(cs, &err);
- if (err != NULL) {
- goto out;
- }
cpu_exec_realize(cs, &err);
if (err != NULL) {
goto out;
@@ -293,6 +289,7 @@ static void s390_cpu_initfn(Object *obj)
cs->env_ptr = env;
cs->halted = 1;
cs->exception_index = EXCP_HLT;
+ cpu_exec_init(cs, &error_abort);
object_property_add(OBJECT(cpu), "id", "int64_t", s390x_cpu_get_id,
s390x_cpu_set_id, NULL, NULL, NULL);
s390_cpu_model_register_props(obj);
@@ -444,12 +441,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void
*data)
cc->gdb_core_xml_file = "s390x-core64.xml";
cc->gdb_arch_name = s390_gdb_arch_name;
- /*
- * Reason: s390_cpu_realizefn() calls cpu_exec_init(), which saves
- * the object in cpus -> dangling pointer after final
- * object_unref().
- */
- dc->cannot_destroy_with_object_finalize_yet = true;
s390_cpu_model_class_register_props(oc);
}
--
2.7.4
- [Qemu-devel] [PATCH 00/19] Split cpu_exec_init() into an init and a realize part, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 02/19] target-i386: move back cpu_exec_init() to init, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 03/19] target-ppc: move back cpu_exec_init() to init, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 04/19] target-s390: move back cpu_exec_init() to init,
Laurent Vivier <=
- [Qemu-devel] [PATCH 05/19] target-arm: move cpu_exec_realize() to realize function, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 06/19] target-alpha: move cpu_exec_realize() to realize function, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 07/19] target-cris: move cpu_exec_realize() to realize function, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 08/19] target-lm32: move cpu_exec_realize() to realize function, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 09/19] target-m68k: move cpu_exec_realize() to realize function, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 10/19] target-microblaze: move cpu_exec_realize() to realize function, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 11/19] target-mips: move cpu_exec_realize() to realize function, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 12/19] target-moxie: move cpu_exec_realize() to realize function, Laurent Vivier, 2016/10/05
- [Qemu-devel] [PATCH 13/19] target-openrisc: move cpu_exec_realize() to realize function, Laurent Vivier, 2016/10/05