From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ9Sx-0003Gw-ES for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:07:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ9Ss-000393-6S for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:07:26 -0400 Received: from [199.232.76.173] (port=59650 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ9Ss-00038k-0i for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:07:22 -0400 Received: from mx2.redhat.com ([66.187.237.31]:51687) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJ9Sq-0002Zc-HE for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:07:21 -0400 Date: Tue, 23 Jun 2009 14:07:12 -0300 From: Luiz Capitulino Message-ID: <20090623140712.7e58ff69@doriath> In-Reply-To: <4A40A45E.8020906@redhat.com> References: <20090623012955.2d152759@doriath> <4A40A45E.8020906@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 10/11] QMP: Introduce basic events List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: aliguori@us.ibm.com, ehabkost@redhat.com, jan.kiszka@siemens.com, dlaor@redhat.com, qemu-devel@nongnu.org On Tue, 23 Jun 2009 12:46:06 +0300 Avi Kivity wrote: > On 06/23/2009 07:29 AM, Luiz Capitulino wrote: > > Reboot, shutdown and powerdown are very basic events and can be > > added together. > > > > > > Reboot only exists within a guest. qemu sees a reset (there are reboots > not associated with a reset, for example kexec). Yeah, will fix. > > diff --git a/vl.c b/vl.c > > index 60a00e1..7dc5954 100644 > > --- a/vl.c > > +++ b/vl.c > > @@ -3693,18 +3693,21 @@ void qemu_system_reset_request(void) > > reset_requested = 1; > > } > > qemu_notify_event(); > > + monitor_notify_event(EVENT_REBOOT); > > } > > > > void qemu_system_shutdown_request(void) > > { > > shutdown_requested = 1; > > qemu_notify_event(); > > + monitor_notify_event(EVENT_SHUTDOWN); > > } > > > > void qemu_system_powerdown_request(void) > > { > > powerdown_requested = 1; > > qemu_notify_event(); > > + monitor_notify_event(EVENT_POWERDOWN); > > } > > > > Maybe it's better to signal the event when the reset etc. actually takes > place, to avoid subtle races. This concern was raised by Daniel as well, will change this too.