From: Jan Kiszka Date: Tue, 14 Jun 2011 16:29:45 +0000 (+0200) Subject: Reset system before loadvm X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~5670^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a8a49d7aa78b31a853e8f5d31f5b12811caeb27;p=sdk%2Femulator%2Fqemu.git Reset system before loadvm In case we load the vmstate during incoming migration, we start from a clean, default machine state as we went through system reset before. But if we load from a snapshot, the machine can be in any state. That can cause troubles if loading an older image which does not carry all state information the executing QEMU requires. Hardly any device takes care of this scenario. However, fixing this is trivial. We just need to issue a system reset during loadvm as well. Signed-off-by: Jan Kiszka Signed-off-by: Luiz Capitulino --- diff --git a/savevm.c b/savevm.c index 939845c..8139bc7 100644 --- a/savevm.c +++ b/savevm.c @@ -2073,6 +2073,7 @@ int load_vmstate(const char *name) return -EINVAL; } + qemu_system_reset(VMRESET_SILENT); ret = qemu_loadvm_state(f); qemu_fclose(f);