From patchwork Fri Apr 19 07:06:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hu Tao X-Patchwork-Id: 237856 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 BEE0A2C0166 for ; Fri, 19 Apr 2013 17:08:58 +1000 (EST) Received: from localhost ([::1]:54715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT5RI-0003WN-C1 for incoming@patchwork.ozlabs.org; Fri, 19 Apr 2013 03:08:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT5PR-0001OA-GP for qemu-devel@nongnu.org; Fri, 19 Apr 2013 03:07:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UT5PP-0004Lo-T0 for qemu-devel@nongnu.org; Fri, 19 Apr 2013 03:07:01 -0400 Received: from [222.73.24.84] (port=44324 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT5PP-0004Kg-HF for qemu-devel@nongnu.org; Fri, 19 Apr 2013 03:06:59 -0400 X-IronPort-AV: E=Sophos;i="4.87,507,1363104000"; d="scan'208";a="7094273" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 19 Apr 2013 15:04:16 +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 r3J76uCL000712 for ; Fri, 19 Apr 2013 15:06:57 +0800 Received: from localhost.localdomain ([10.167.233.156]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013041915053144-682439 ; Fri, 19 Apr 2013 15:05:31 +0800 From: Hu Tao To: qemu-devel@nongnu.org Date: Fri, 19 Apr 2013 15:06:20 +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/04/19 15:05:31, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/19 15:05:31, Serialize complete at 2013/04/19 15:05:31 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 v20 2/7] 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 332abe7..059726e 100644 --- a/monitor.c +++ b/monitor.c @@ -496,6 +496,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)