Received: from eggs.gnu.org ([208.118.235.92]:54762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIEwu-0001kw-5g for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:04:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIEws-0008TY-Oy for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:04:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIEws-0008TO-Go for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:04:42 -0400 From: Markus Armbruster References: <6c31b1535b0e2beb6b099831b9c71b6168b6201f.1363243596.git.hutao@cn.fujitsu.com> Date: Wed, 20 Mar 2013 10:04:02 +0100 In-Reply-To: <6c31b1535b0e2beb6b099831b9c71b6168b6201f.1363243596.git.hutao@cn.fujitsu.com> (Hu Tao's message of "Thu, 14 Mar 2013 16:15:51 +0800") Message-ID: <87li9imohp.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v14 2/4] add a new qevent: QEVENT_GUEST_PANICKED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao Cc: Peter Maydell , Gleb Natapov , "Michael S. Tsirkin" , Jan Kiszka , qemu-devel , Luiz Capitulino , Blue Swirl , Orit Wasserman , Juan Quintela , Alexander Graf , Christian Borntraeger , Andrew Jones , Alex Williamson , Sasha Levin , Stefan Hajnoczi , KAMEZAWA Hiroyuki , Kevin Wolf , Anthony Liguori , Marcelo Tosatti , Paolo Bonzini Hu Tao writes: > This event will be emited when the guest is panicked. > > Signed-off-by: Wen Congyang > Signed-off-by: Hu Tao > --- > QMP/qmp-events.txt | 14 ++++++++++++++ > include/monitor/monitor.h | 1 + > monitor.c | 1 + > 3 files changed, 16 insertions(+) > > diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt > index b2698e4..62fffad 100644 > --- a/QMP/qmp-events.txt > +++ b/QMP/qmp-events.txt > @@ -428,3 +428,17 @@ Example: > > Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is > followed respectively by the RESET, SHUTDOWN, or STOP events. > + > +GUEST_PANICKED > +-------------- > + > +Emitted when the guest OS is panicked. This suggests we reliably emit the event on guest panic. That's not accurate; we emit it only when the guest manages to tell us. Better clarify. Perhaps "Emitted when we detect a guest OS panic" suffices. > + > +Data: > + > +- "action": Action that has been taken. Currently it's always "pause". Please make that - "action": Action that has been taken (json-string, currently always "pause") > + > +Example: > + > +{ "event": "GUEST_PANICKED", > + "data": { "action": "pause" } } > diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h > index 87fb49c..4006905 100644 > --- a/include/monitor/monitor.h > +++ b/include/monitor/monitor.h > @@ -45,6 +45,7 @@ typedef enum MonitorEvent { > QEVENT_WAKEUP, > QEVENT_BALLOON_CHANGE, > QEVENT_SPICE_MIGRATE_COMPLETED, > + QEVENT_GUEST_PANICKED, > > /* Add to 'monitor_event_names' array in monitor.c when > * defining new events here */ > diff --git a/monitor.c b/monitor.c > index 32a6e74..5b7d7f9 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -463,6 +463,7 @@ static const char *monitor_event_names[] = { > [QEVENT_WAKEUP] = "WAKEUP", > [QEVENT_BALLOON_CHANGE] = "BALLOON_CHANGE", > [QEVENT_SPICE_MIGRATE_COMPLETED] = "SPICE_MIGRATE_COMPLETED", > + [QEVENT_GUEST_PANICKED] = "GUEST_PANICKED", > }; > QEMU_BUILD_BUG_ON(ARRAY_SIZE(monitor_event_names) != QEVENT_MAX)