From patchwork Fri Mar 29 08:16:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hu Tao X-Patchwork-Id: 232305 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 DD18D2C00AA for ; Fri, 29 Mar 2013 19:17:51 +1100 (EST) Received: from localhost ([::1]:33078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULUVS-000885-1r for incoming@patchwork.ozlabs.org; Fri, 29 Mar 2013 04:17:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULUV3-000880-5D for qemu-devel@nongnu.org; Fri, 29 Mar 2013 04:17:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULUV2-0007CY-3t for qemu-devel@nongnu.org; Fri, 29 Mar 2013 04:17:25 -0400 Received: from [222.73.24.84] (port=35091 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULUV1-00079f-P7 for qemu-devel@nongnu.org; Fri, 29 Mar 2013 04:17:24 -0400 X-IronPort-AV: E=Sophos;i="4.87,372,1363104000"; d="scan'208";a="6969337" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 29 Mar 2013 16:14:47 +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 r2T8HIm3014557; Fri, 29 Mar 2013 16:17:18 +0800 Received: from localhost.localdomain ([10.167.233.156]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013032916162780-163877 ; Fri, 29 Mar 2013 16:16:27 +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: Fri, 29 Mar 2013 16:16:43 +0800 Message-Id: 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/29 16:16:27, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/03/29 16:16:29, Serialize complete at 2013/03/29 16:16:29 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 v16 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 dcc826d..92fe5fb 100644 --- a/QMP/qmp-events.txt +++ b/QMP/qmp-events.txt @@ -446,3 +446,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 b868760..1a6cfcf 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -46,6 +46,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 4ec1db9..a46d5ae 100644 --- a/monitor.c +++ b/monitor.c @@ -484,6 +484,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)