[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 10/11] QMP: Introduce basic events
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] Re: [PATCH 10/11] QMP: Introduce basic events |
Date: |
Tue, 23 Jun 2009 14:07:12 -0300 |
On Tue, 23 Jun 2009 12:46:06 +0300
Avi Kivity <address@hidden> 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.