From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a988K-0003tN-Ti for qemu-devel@nongnu.org; Wed, 16 Dec 2015 04:12:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a988F-0004zx-TV for qemu-devel@nongnu.org; Wed, 16 Dec 2015 04:12:28 -0500 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:34978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a988F-0004zr-Mw for qemu-devel@nongnu.org; Wed, 16 Dec 2015 04:12:23 -0500 Received: by mail-wm0-x235.google.com with SMTP id l126so29174991wml.0 for ; Wed, 16 Dec 2015 01:12:23 -0800 (PST) Sender: Paolo Bonzini References: <1450256449-23779-1-git-send-email-den@openvz.org> From: Paolo Bonzini Message-ID: <56712AF4.9030105@redhat.com> Date: Wed, 16 Dec 2015 10:12:20 +0100 MIME-Version: 1.0 In-Reply-To: <1450256449-23779-1-git-send-email-den@openvz.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: qemu-devel@nongnu.org, Dmitry Andreev , Markus Armbruster On 16/12/2015 10:00, Denis V. Lunev wrote: > With pvpanic or HyperV panic devices could be moved into the paused state > with ' preserve'. In this state VM reacts only to > 'virsh destroy' or 'continue'. > > 'virsh reset' command is usually used to force guest reset. The expectation > of the behavior of this command is that the guest will be force restarted. > This is not true at the moment. Does "virsh reset" + "virsh continue" work, and if not why? > Thus it is quite natural to process 'virh reset' aka qmp_system_reset > this way, i.e. allow to reset the guest. This behavior is similar to > one observed with 'reset' button on real hardware :) Paolo > Signed-off-by: Denis V. Lunev > CC: Markus Armbruster > CC: Dmitry Andreev > --- > qmp.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/qmp.c b/qmp.c > index 0a1fa19..df17a33 100644 > --- a/qmp.c > +++ b/qmp.c > @@ -112,6 +112,10 @@ void qmp_stop(Error **errp) > void qmp_system_reset(Error **errp) > { > qemu_system_reset_request(); > + > + if (!runstate_is_running()) { > + vm_start(); > + } > } > > void qmp_system_powerdown(Error **erp) >