]> Git Repo - qemu.git/commitdiff
target-moxie: Fix VMState registration
authorPeter Maydell <[email protected]>
Mon, 8 Apr 2013 15:51:46 +0000 (16:51 +0100)
committerStefan Hajnoczi <[email protected]>
Fri, 12 Apr 2013 12:30:39 +0000 (14:30 +0200)
Register the CPU VMState in the correct way, via cpu_class_set_vmsd(),
rather than doing it in two different wrong ways (once by providing
cpu_save and cpu_load functions, and once by setting the vmsd field in
DeviceClass).

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Andreas Färber <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
target-moxie/cpu.c
target-moxie/cpu.h
target-moxie/machine.c

index c0855f0573c4c56de5ca76af03ea66e29a7e3008..f2b0791b91bca154c4977d0d6cf1c0f878c276d7 100644 (file)
@@ -97,7 +97,7 @@ static void moxie_cpu_class_init(ObjectClass *oc, void *data)
 
     cc->class_by_name = moxie_cpu_class_by_name;
 
-    dc->vmsd = &vmstate_moxie_cpu;
+    cpu_class_set_vmsd(cc, &vmstate_moxie_cpu);
     cc->do_interrupt = moxie_cpu_do_interrupt;
 }
 
index 988729a06fb8d1963bb03405d74f6b5b14712d02..a9d9ace3035e44a4de3ebb47e8be3a5947b5b36c 100644 (file)
@@ -28,8 +28,6 @@
 
 #define TARGET_HAS_ICE 1
 
-#define CPU_SAVE_VERSION 1
-
 #define ELF_MACHINE     0xFEED /* EM_MOXIE */
 
 #define MOXIE_EX_DIV0        0
index 5bfdb2886a29f49e1bfab11bab5500025624cab5..0f5992b6a0a3f9b26eb202a3f826b5a3ab543030 100644 (file)
@@ -3,7 +3,7 @@
 
 const VMStateDescription vmstate_moxie_cpu = {
     .name = "cpu",
-    .version_id = CPU_SAVE_VERSION,
+    .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
     .fields      = (VMStateField[]) {
@@ -16,13 +16,3 @@ const VMStateDescription vmstate_moxie_cpu = {
         VMSTATE_END_OF_LIST()
     }
 };
-
-void cpu_save(QEMUFile *f, void *opaque)
-{
-    vmstate_save_state(f, &vmstate_moxie_cpu, opaque);
-}
-
-int cpu_load(QEMUFile *f, void *opaque, int version_id)
-{
-    return vmstate_load_state(f, &vmstate_moxie_cpu, opaque, version_id);
-}
This page took 0.028405 seconds and 4 git commands to generate.