diff options
author | Avi Kivity <avi@qumranet.com> | 2008-06-16 11:25:16 -0700 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-06-16 11:25:16 -0700 |
commit | ba67a003839dec19eb47176bf4af858c965f4f12 (patch) | |
tree | 9c87e6f8e69036cc14aea52ed27e1e00ffed2e64 | |
parent | c19e6e33ac7e827171b8c50093f7925fa56ec99e (diff) |
Fix loading vcpu register state before system startupkvm-70
we now load registers only on the vcpu thread, but that is not ready
when the system is starting up. so defer the loading until the thread
is ready.
fixes live migration.
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r-- | qemu-kvm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qemu-kvm.c b/qemu-kvm.c index 553875be7..431e26d53 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -194,7 +194,7 @@ static void kvm_do_load_registers(void *_env) void kvm_load_registers(CPUState *env) { - if (kvm_enabled()) + if (kvm_enabled() && qemu_system_ready) on_vcpu(env, kvm_do_load_registers, env); } @@ -392,6 +392,8 @@ static int kvm_main_loop_cpu(CPUState *env) #endif cpu_single_env = env; + kvm_load_registers(env); + while (1) { while (!has_work(env)) kvm_main_loop_wait(env, 1000); |