summaryrefslogtreecommitdiff
path: root/target-ppc
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
commit5ef30b3a1f9929573621fb9a553cf84e795c381e (patch)
tree1dd3a77d60b3aa96132741326bdb3a8e66fa95c8 /target-ppc
parent0496713b3a94fb8a0ff4a80b35546e5d0d9888ed (diff)
downloadqemu-5ef30b3a1f9929573621fb9a553cf84e795c381e.tar.gz
qemu-5ef30b3a1f9929573621fb9a553cf84e795c381e.tar.bz2
qemu-5ef30b3a1f9929573621fb9a553cf84e795c381e.zip
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')
-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;
}