From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55955 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnBOK-0002zU-8c for qemu-devel@nongnu.org; Wed, 09 Feb 2011 09:51:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PnBOI-0005JG-Mp for qemu-devel@nongnu.org; Wed, 09 Feb 2011 09:51:36 -0500 Received: from thoth.sbs.de ([192.35.17.2]:20158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PnBOI-0005Ie-C6 for qemu-devel@nongnu.org; Wed, 09 Feb 2011 09:51:34 -0500 Message-ID: <4D52A9F2.40804@siemens.com> Date: Wed, 09 Feb 2011 15:51:30 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <35fe72889a43ad4465c298a70069e9a6fc1eab66.1297077506.git.jan.kiszka@siemens.com> <20110208185932.GB13617@amt.cnet> <4D524B25.80907@web.de> <20110209141700.GB32689@amt.cnet> In-Reply-To: <20110209141700.GB32689@amt.cnet> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 04/15] Improve vm_stop reason declarations List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org On 2011-02-09 15:17, Marcelo Tosatti wrote: > On Wed, Feb 09, 2011 at 09:07:01AM +0100, Jan Kiszka wrote: >> 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; >>>> >>>> - if (running || (reason != EXCP_DEBUG && reason != EXCP_INTERRUPT) || >>>> - s->state == RS_INACTIVE || s->state == RS_SYSCALL) >>>> + if (running || (reason != VMSTOP_DEBUG && reason != VMSTOP_INTERRUPT) || >>>> + s->state == RS_INACTIVE || s->state == RS_SYSCALL) { >>>> return; >>> >>> What about VMSTOP_USER ? >>> >>> VMSTOP_INTERRUPT -> "the VM is stopped by an interrupt". >>> >>> VMSTOP_USER -> "the VM is stopped by the user". >> >> Makes a lot of sense, will change. >> >>> >>>> 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 = vm_running; >>>> >>>> DPRINTF("done iterating\n"); >>>> - vm_stop(0); >>>> + vm_stop(VMSTOP_RWSTATE); >>> >>> 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? > > IMO it would be better to state the specific reason why the vm stopped, > not some generic action. VMSTOP_SAVEVM, VMSTOP_VMLOAD and > VMSTOP_MIGRATE. > Ah, OK. Can be done. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux