aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/machine.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-08-17 23:19:53 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-27 20:35:30 -0500
commit4c0960c0c483fffc5f8e1dab169d946ac295bf44 (patch)
tree1dd3a77d60b3aa96132741326bdb3a8e66fa95c8 /target-ppc/machine.c
parent09aaa1602f9381c0e0fb539390b1793e51bdfc7b (diff)
downloadqemu-arm-4c0960c0c483fffc5f8e1dab169d946ac295bf44.tar.gz
kvm: Simplify cpu_synchronize_state()
cpu_synchronize_state() is a little unreadable since the 'modified' argument isn't self-explanatory. Simplify it by making it always synchronize the kernel state into qemu, and automatically flush the registers back to the kernel if they've been synchronized on this exit. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-ppc/machine.c')
-rw-r--r--target-ppc/machine.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index deb2e2d801..4897c8a4d3 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -7,7 +7,7 @@ void cpu_save(QEMUFile *f, void *opaque)
CPUState *env = (CPUState *)opaque;
unsigned int i, j;
- cpu_synchronize_state(env, 0);
+ cpu_synchronize_state(env);
for (i = 0; i < 32; i++)
qemu_put_betls(f, &env->gpr[i]);
@@ -96,6 +96,8 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
CPUState *env = (CPUState *)opaque;
unsigned int i, j;
+ cpu_synchronize_state(env);
+
for (i = 0; i < 32; i++)
qemu_get_betls(f, &env->gpr[i]);
#if !defined(TARGET_PPC64)
@@ -177,7 +179,5 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
qemu_get_sbe32s(f, &env->mmu_idx);
qemu_get_sbe32s(f, &env->power_mode);
- cpu_synchronize_state(env, 1);
-
return 0;
}