From patchwork Thu Mar 21 08:35:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hu Tao X-Patchwork-Id: 229583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C84F02C00A6 for ; Thu, 21 Mar 2013 19:37:49 +1100 (EST) Received: from localhost ([::1]:35683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIb0O-0007Id-0J for incoming@patchwork.ozlabs.org; Thu, 21 Mar 2013 04:37:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIayf-00051d-PE for qemu-devel@nongnu.org; Thu, 21 Mar 2013 04:36:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIayY-0003Ah-FN for qemu-devel@nongnu.org; Thu, 21 Mar 2013 04:36:01 -0400 Received: from [222.73.24.84] (port=54766 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIayX-00038c-OQ for qemu-devel@nongnu.org; Thu, 21 Mar 2013 04:35:54 -0400 X-IronPort-AV: E=Sophos;i="4.84,884,1355068800"; d="scan'208";a="6916811" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 21 Mar 2013 16:33:12 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r2L8Zd7k005132; Thu, 21 Mar 2013 16:35:39 +0800 Received: from localhost.localdomain ([10.167.233.156]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013032116341155-1041176 ; Thu, 21 Mar 2013 16:34:11 +0800 From: Hu Tao To: qemu-devel , "Daniel P. Berrange" , KAMEZAWA Hiroyuki , Jan Kiszka , Gleb Natapov , Blue Swirl , Eric Blake , Andrew Jones , Marcelo Tosatti , Sasha Levin , Luiz Capitulino , Anthony Liguori , Markus Armbruster , Paolo Bonzini , Stefan Hajnoczi , Juan Quintela , Orit Wasserman , Wen Congyang , "Michael S. Tsirkin" , Alexander Graf , Alex Williamson , Peter Maydell , Christian Borntraeger Date: Thu, 21 Mar 2013 16:35:40 +0800 Message-Id: <23c219151768ded559c8207f1e94eb7edbe1ef38.1363847790.git.hutao@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: References: X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/03/21 16:34:11, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/03/21 16:34:14, Serialize complete at 2013/03/21 16:34:14 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 222.73.24.84 Subject: [Qemu-devel] [PATCH v15 2/6] add a new qevent: QEVENT_GUEST_PANICKED X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This event will be emited when qemu detects guest panic. 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..a725fab 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 guest OS panic is detected. + +Data: + +- "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 1b5acf8..d8893a9 100644 --- a/monitor.c +++ b/monitor.c @@ -464,6 +464,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)