[RFC 07/12] target-ppc: Prepare finalizer for PowerPCCPU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Andreas Färber <afaerber@xxxxxxx>
---
 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(-)

diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index ff28843..3ff2156 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -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);
 
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index 7d26cb5..1467cf7 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -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)));
 }
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 2ee5bc0..8be235b 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -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,
     };
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 52264c8..c167595 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -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,
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux