From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVoEU-0000tO-Ai for qemu-devel@nongnu.org; Sun, 12 Jun 2011 13:13:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVoES-0002uh-MW for qemu-devel@nongnu.org; Sun, 12 Jun 2011 13:13:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVoES-0002ua-3b for qemu-devel@nongnu.org; Sun, 12 Jun 2011 13:13:52 -0400 Message-ID: <4DF4F3CB.1070408@redhat.com> Date: Sun, 12 Jun 2011 20:13:47 +0300 From: Avi Kivity MIME-Version: 1.0 References: <4DF32FC6.3040607@web.de> In-Reply-To: <4DF32FC6.3040607@web.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Reset system before loadvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel , Luiz Capitulino On 06/11/2011 12:05 PM, Jan Kiszka wrote: > 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); Should we suppress the reset event sent out on the monitor? After all, it's the result of an internal implementation choice, not something the user or the guest did. -- error compiling committee.c: too many arguments to function