From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWMyH-0004a0-Ot for qemu-devel@nongnu.org; Tue, 14 Jun 2011 02:19:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWMyG-0007JJ-4F for qemu-devel@nongnu.org; Tue, 14 Jun 2011 02:19:29 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:47845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWMyF-0007JA-Jy for qemu-devel@nongnu.org; Tue, 14 Jun 2011 02:19:27 -0400 Message-ID: <4DF6FD6D.6020109@web.de> Date: Tue, 14 Jun 2011 08:19:25 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4DF32FC6.3040607@web.de> <4DF4F3CB.1070408@redhat.com> In-Reply-To: <4DF4F3CB.1070408@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCF05D1261AE8BF86FC0A7270" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH] Reset system before loadvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel , Luiz Capitulino This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCF05D1261AE8BF86FC0A7270 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2011-06-12 19:13, Avi Kivity wrote: > 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. B= ut >> 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 stat= e >> information the executing QEMU requires. Almost no device takes care o= f >> 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 =3D qemu_loadvm_state(f); >> >> qemu_fclose(f); >=20 > 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. We already issue this pattern during -loadvm or -incoming - or is the monitor not yet connected at this point? Jan --------------enigCF05D1261AE8BF86FC0A7270 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk32/W0ACgkQitSsb3rl5xRKsQCdE/IW8uo0Mvn8YrAT6M27M4Ob CwIAoO8at54z2+3FxOI2JxY5pr6Tiv/Y =sgEc -----END PGP SIGNATURE----- --------------enigCF05D1261AE8BF86FC0A7270--