summaryrefslogtreecommitdiffstats
path: root/target-ppc/machine.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2016-04-15 11:03:00 +0200
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 20:03:49 -0600
commit6ddb456779d52cd57ff769e58781944625a1860f (patch)
tree222c21dfab16f85e85c5d9e141c22c6978c1fb43 /target-ppc/machine.c
parentdc98fba009061401b5f738f4cc46d00b5b4e9e3a (diff)
downloadhqemu-6ddb456779d52cd57ff769e58781944625a1860f.zip
hqemu-6ddb456779d52cd57ff769e58781944625a1860f.tar.gz
ppc: Fix migration of the XER register
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>
Diffstat (limited to 'target-ppc/machine.c')
-rw-r--r--target-ppc/machine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index 692121e..46684fb 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -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
OpenPOWER on IntegriCloud