From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVK82-0007SM-W3 for qemu-devel@nongnu.org; Sat, 11 Jun 2011 05:05:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVK80-0008RI-W4 for qemu-devel@nongnu.org; Sat, 11 Jun 2011 05:05:14 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:44648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVK80-0008R3-Hi for qemu-devel@nongnu.org; Sat, 11 Jun 2011 05:05:12 -0400 Message-ID: <4DF32FC6.3040607@web.de> Date: Sat, 11 Jun 2011 11:05:10 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH] Reset system before loadvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino , qemu-devel From: Jan Kiszka 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. Almost no 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 --- savevm.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 98b2422..5db01aa 100644 --- a/savevm.c +++ b/savevm.c @@ -2074,6 +2074,7 @@ int load_vmstate(const char *name) return -EINVAL; } + qemu_system_reset(); ret = qemu_loadvm_state(f); qemu_fclose(f); -- 1.7.1