From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzmSq-00025l-Qu for qemu-devel@nongnu.org; Tue, 21 Feb 2012 04:56:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzmSi-0005Hp-8Q for qemu-devel@nongnu.org; Tue, 21 Feb 2012 04:56:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzmSh-0005HV-US for qemu-devel@nongnu.org; Tue, 21 Feb 2012 04:56:44 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1L9ufJI021446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 21 Feb 2012 04:56:42 -0500 Message-ID: <4F436A57.3060001@redhat.com> Date: Tue, 21 Feb 2012 10:56:39 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <1329301701-30395-1-git-send-email-kraxel@redhat.com> <1329301701-30395-8-git-send-email-kraxel@redhat.com> <20120217153221.7fd4c70f@doriath.home> In-Reply-To: <20120217153221.7fd4c70f@doriath.home> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 07/12] suspend: add system_wakeup monitor command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org Hi, >> +# @system_wakeup: >> +# >> +# Wakeup guest from suspend >> +# >> +# Since: 1.1 >> +# >> +# Returns: nothing. > > Would be nice to note that this command does nothing if the guest is already > suspended (btw, does is_suspend account for guest initiated suspends too?). s/suspended/running/, but yes. There are only guest initiated suspends (well, libvirt-via-agent is somewhat grey ...). cheers, Gerd >> diff --git a/qmp.c b/qmp.c >> index 1f64844..a182b51 100644 >> --- a/qmp.c >> +++ b/qmp.c >> @@ -163,6 +163,11 @@ void qmp_cont(Error **errp) >> vm_start(); >> } >> >> +void qmp_system_wakeup(Error **errp) >> +{ >> + qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER); > > qemu_system_wakeup_request() does: > > if (!(wakeup_reason_mask & (1 << reason))) { > return; > } > > But I think you never disable REASON_OTHER, meaning that this will > never be true when the wakeup request comes from the command, right? Correct. The mask is for wakeup events the guest is able to enable/disable (i.e. rtc wakeups can be enabled/disabled via acpi). REASON_OTHER can't be maked. cheers, Gerd