@@ -1128,6 +1128,7 @@ void ppc_store_msr (CPUPPCState *env, target_ulong value);
void ppc_cpu_list (FILE *f, fprintf_function cpu_fprintf);
void ppc_cpu_initfn(Object *obj);
+void ppc_cpu_finalize(Object *obj);
const char *ppc_find_by_pvr(uint32_t pvr);
PowerPCCPU *cpu_ppc_find_by_name(const char *name);
@@ -3163,6 +3163,5 @@ CPUPPCState *cpu_ppc_init(const char *cpu_model)
void cpu_ppc_close(CPUPPCState *env)
{
- /* Should also remove all opcode tables... */
object_delete(OBJECT(ppc_env_get_cpu(env)));
}
@@ -942,6 +942,7 @@ static void kvmppc_register_types(void)
.name = "host",
.instance_size = sizeof(PowerPCCPU),
.instance_init = ppc_cpu_initfn,
+ .instance_finalize = ppc_cpu_finalize,
.class_size = sizeof(PowerPCCPUClass),
.class_init = kvmppc_host_cpu_class_init,
};
@@ -10212,6 +10212,11 @@ static void ppc_cpu_reset(CPUState *c)
tlb_flush(env, 1);
}
+void ppc_cpu_finalize(Object *obj)
+{
+ /* Should remove all opcode tables... */
+}
+
static bool ppc_cpu_usable(const PowerPCCPUInfo *def)
{
#if defined(TARGET_PPCEMB)
@@ -10336,6 +10341,7 @@ static void ppc_register_cpu(const PowerPCCPUInfo *info)
.parent = TYPE_POWERPC_CPU,
.instance_size = sizeof(PowerPCCPU),
.instance_init = ppc_cpu_initfn,
+ .instance_finalize = ppc_cpu_finalize,
.class_size = sizeof(PowerPCCPUClass),
.class_init = ppc_cpu_class_init,
.class_data = (void *)info,
Signed-off-by: Andreas Färber <afaerber@suse.de> --- target-ppc/cpu.h | 1 + target-ppc/helper.c | 1 - target-ppc/kvm.c | 1 + target-ppc/translate_init.c | 6 ++++++ 4 files changed, 8 insertions(+), 1 deletions(-)