From: Thomas Huth Date: Fri, 15 Apr 2016 09:03:00 +0000 (+0200) Subject: ppc: Fix migration of the XER register X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=aa378598fea819b15c00d48048bedfa0dc631132;p=qemu.git 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 Signed-off-by: David Gibson --- diff --git a/target-ppc/machine.c b/target-ppc/machine.c index 692121e983..46684fb933 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