summaryrefslogtreecommitdiff
path: root/target-ppc/machine.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-05-02 00:22:51 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-05-22 10:50:33 -0500
commit279899a08f43aecbd31d08826371a378e101ee2f (patch)
tree7bb31d0a51df11ba7d6b7b2b6bb11562bae0fce2 /target-ppc/machine.c
parent2884a792ecc9a9c0b7ac1dac2554a20f84f928da (diff)
downloadqemu-279899a08f43aecbd31d08826371a378e101ee2f.tar.gz
qemu-279899a08f43aecbd31d08826371a378e101ee2f.tar.bz2
qemu-279899a08f43aecbd31d08826371a378e101ee2f.zip
kvm: Add missing bits to support live migration
This patch adds the missing hooks to allow live migration in KVM mode. It adds proper synchronization before/after saving/restoring the VCPU states (note: PPC is untested), hooks into cpu_physical_memory_set_dirty_tracking() to enable dirty memory logging at KVM level, and synchronizes that drity log into QEMU's view before running ram_live_save(). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-ppc/machine.c')
-rw-r--r--target-ppc/machine.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index c15776f690..99ba3eb2ad 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -1,11 +1,14 @@
#include "hw/hw.h"
#include "hw/boards.h"
+#include "kvm.h"
void cpu_save(QEMUFile *f, void *opaque)
{
CPUState *env = (CPUState *)opaque;
unsigned int i, j;
+ cpu_synchronize_state(env, 0);
+
for (i = 0; i < 32; i++)
qemu_put_betls(f, &env->gpr[i]);
#if !defined(TARGET_PPC64)
@@ -174,5 +177,7 @@ 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;
}