]> Git Repo - qemu.git/commitdiff
target-sparc: Migrate CWP and PIL for SPARC64
authorPeter Maydell <[email protected]>
Mon, 11 Jan 2016 12:40:28 +0000 (12:40 +0000)
committerMark Cave-Ayland <[email protected]>
Sat, 16 Jan 2016 12:01:23 +0000 (12:01 +0000)
In SPARC32 the env->cwp and env->psrpil state is part of the PSR
register, and gets migrated as part of that register.
In SPARC64 this state is in separate CWP and PIL registers, but we
were not doing anything to migrate those.

Add the missing fields to the migration vmstate (which is a
migration break, but without these fields migration is completely
broken anyway).

This change means that trying a save/load of a SPARC64 target at
the boot rom prompt now produces a system which at least responds
to keyboard input after the restore.

Reported-by: Paolo Bonzini <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Mark Cave-Ayland <[email protected]>
target-sparc/machine.c

index f8eebdde3fa98f7fb925db323ccf65d9a7757d27..aecbe2cedbf2f2d97c77fb84e82727a9f89f000c 100644 (file)
@@ -100,7 +100,7 @@ static void cpu_pre_save(void *opaque)
 #ifndef TARGET_SPARC64
 #define SPARC_VMSTATE_VER 7
 #else
-#define SPARC_VMSTATE_VER 8
+#define SPARC_VMSTATE_VER 9
 #endif
 
 const VMStateDescription vmstate_sparc_cpu = {
@@ -181,6 +181,9 @@ const VMStateDescription vmstate_sparc_cpu = {
         VMSTATE_UINT64(env.hstick_cmpr, SPARCCPU),
         VMSTATE_UINT64(env.ssr, SPARCCPU),
         VMSTATE_CPU_TIMER(env.hstick, SPARCCPU),
+        /* On SPARC32 env.psrpil and env.cwp are migrated as part of the PSR */
+        VMSTATE_UINT32(env.psrpil, SPARCCPU),
+        VMSTATE_UINT32(env.cwp, SPARCCPU),
 #endif
         VMSTATE_END_OF_LIST()
     },
This page took 0.024997 seconds and 4 git commands to generate.