From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 04/15] Improve vm_stop reason declarations Date: Wed, 09 Feb 2011 09:07:01 +0100 Message-ID: <4D524B25.80907@web.de> References: <35fe72889a43ad4465c298a70069e9a6fc1eab66.1297077506.git.jan.kiszka@siemens.com> <20110208185932.GB13617@amt.cnet> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF55D9DBCB4A86D1E11E08ECB" Cc: Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org To: Marcelo Tosatti Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:48364 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752128Ab1BIIHD (ORCPT ); Wed, 9 Feb 2011 03:07:03 -0500 In-Reply-To: <20110208185932.GB13617@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF55D9DBCB4A86D1E11E08ECB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-02-08 19:59, Marcelo Tosatti wrote: > On Mon, Feb 07, 2011 at 12:19:15PM +0100, Jan Kiszka wrote: >> index d6556c9..3397566 100644 >> --- a/gdbstub.c >> +++ b/gdbstub.c >> @@ -2194,14 +2194,14 @@ static void gdb_vm_state_change(void *opaque, = int running, int reason) >> const char *type; >> int ret; >> =20 >> - if (running || (reason !=3D EXCP_DEBUG && reason !=3D EXCP_INTERR= UPT) || >> - s->state =3D=3D RS_INACTIVE || s->state =3D=3D RS_SYSCALL) >> + if (running || (reason !=3D VMSTOP_DEBUG && reason !=3D VMSTOP_IN= TERRUPT) || >> + s->state =3D=3D RS_INACTIVE || s->state =3D=3D RS_SYSCALL) { >> return; >=20 > What about VMSTOP_USER ? >=20 > VMSTOP_INTERRUPT -> "the VM is stopped by an interrupt". >=20 > VMSTOP_USER -> "the VM is stopped by the user". Makes a lot of sense, will change. >=20 >> diff --git a/migration.c b/migration.c >> index 3612572..20ea113 100644 >> --- a/migration.c >> +++ b/migration.c >> @@ -378,7 +378,7 @@ void migrate_fd_put_ready(void *opaque) >> int old_vm_running =3D vm_running; >> =20 >> DPRINTF("done iterating\n"); >> - vm_stop(0); >> + vm_stop(VMSTOP_RWSTATE); >=20 > VMSTOP_RWSTATE is cryptic. What about VMSTOP_SAVEVM, MIGRATE, etc. Both alternatives are not completely accurate as we also stop of vmload. What about VMSTOP_SYNC_STATE or UPDATE_STATE? Jan --------------enigF55D9DBCB4A86D1E11E08ECB 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/ iEYEARECAAYFAk1SSyUACgkQitSsb3rl5xSNswCfWtTHKOcXV70whJ6M0j8QY47E k1MAn121i3eXT44a/tozB6GcF1HPVvBF =nI68 -----END PGP SIGNATURE----- --------------enigF55D9DBCB4A86D1E11E08ECB--