From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIafO-0007nh-5P for qemu-devel@nongnu.org; Mon, 11 Jan 2016 06:29:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIafK-0005fs-V3 for qemu-devel@nongnu.org; Mon, 11 Jan 2016 06:29:42 -0500 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:35793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIafK-0005fl-PB for qemu-devel@nongnu.org; Mon, 11 Jan 2016 06:29:38 -0500 Received: by mail-wm0-x241.google.com with SMTP id f206so25829328wmf.2 for ; Mon, 11 Jan 2016 03:29:38 -0800 (PST) Sender: Paolo Bonzini References: <1450256449-23779-1-git-send-email-den@openvz.org> <56712AF4.9030105@redhat.com> <20151216095029.GW1404639@andariel.pipo.sk> <567152C4.1010004@redhat.com> <56717988.2000207@openvz.org> <56938474.3060401@openvz.org> From: Paolo Bonzini Message-ID: <5693921E.3060506@redhat.com> Date: Mon, 11 Jan 2016 12:29:34 +0100 MIME-Version: 1.0 In-Reply-To: <56938474.3060401@openvz.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: Peter Krempa , qemu-devel@nongnu.org, Dmitry Andreev , Markus Armbruster On 11/01/2016 11:31, Denis V. Lunev wrote: >>> >>> IMO, after a reset, main_loop_should_exit should actually transition >>> to VM_STATE_PRELAUNCH (*not* RUN_STATE_PAUSED) for *all* states except >>> RUN_STATE_INMIGRATE, RUN_STATE_SAVE_VM (which I think cannot happen >>> there) and (of course) RUN_STATE_RUNNING. Some changes will be required >>> to the transition table as well. >>> >>> This will fix similar bugs for other runstates as well, though most of >>> them probably cannot be triggered from libvirt. >> >> ok. Thank you for this input. I'll analyse this and come with >> corrected patch :) > > What would be correct procedure to handle this state? > > Setting VM_STATE_PRELAUNCH in main_loop_should_exit does not > move QEMU into VM_STATE_RUNNING and thus subsequent 'resume' > command is necessary. > > In this case the processing of 'reset' command should be different > in libvirt, i.e. libvirt should send two commands ('reset' and 'resume') > in this state. Either that, or libvirt's client should send two of them. As far as QEMU is concerned, a paused VM remains paused after a reset, no matter why it was reset. I'm not sure what are the desired semantics for libvirt. Paolo