]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ppc: Fix migration of the XER register
authorThomas Huth <thuth@redhat.com>
Fri, 15 Apr 2016 09:03:00 +0000 (11:03 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 18 Apr 2016 05:14:38 +0000 (15:14 +1000)
env->xer only holds the lower bits of the XER register nowadays, the
SO, OV and CA bits are stored in separate variables (see the function
cpu_write_xer() for details). Since the migration code currently only
reads the "xer" variable, the upper bits are lost during migration.
Fix it by using cpu_read_xer() instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target-ppc/machine.c

index 692121e983190c56088375335bc692715faba749..46684fb9337229e5fd94285ef3a85ec945390c09 100644 (file)
@@ -136,7 +136,7 @@ static void cpu_pre_save(void *opaque)
 
     env->spr[SPR_LR] = env->lr;
     env->spr[SPR_CTR] = env->ctr;
-    env->spr[SPR_XER] = env->xer;
+    env->spr[SPR_XER] = cpu_read_xer(env);
 #if defined(TARGET_PPC64)
     env->spr[SPR_CFAR] = env->cfar;
 #endif