From patchwork Fri Apr 26 03:24:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hu Tao X-Patchwork-Id: 239641 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 559B72C00E9 for ; Fri, 26 Apr 2013 13:28:00 +1000 (EST) Received: from localhost ([::1]:47640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVZKI-0001hB-IC for incoming@patchwork.ozlabs.org; Thu, 25 Apr 2013 23:27:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVZHy-000720-E6 for qemu-devel@nongnu.org; Thu, 25 Apr 2013 23:25:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVZHs-00039M-SS for qemu-devel@nongnu.org; Thu, 25 Apr 2013 23:25:34 -0400 Received: from [222.73.24.84] (port=24315 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVZHs-00038u-E3 for qemu-devel@nongnu.org; Thu, 25 Apr 2013 23:25:28 -0400 X-IronPort-AV: E=Sophos;i="4.87,555,1363104000"; d="scan'208";a="7142957" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 26 Apr 2013 11:22:35 +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 r3Q3PIh9016208; Fri, 26 Apr 2013 11:25: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 2013042611234250-844250 ; Fri, 26 Apr 2013 11:23:42 +0800 From: Hu Tao To: qemu-devel@nongnu.org Date: Fri, 26 Apr 2013 11:24:41 +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/26 11:23:42, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/26 11:23:42, Serialize complete at 2013/04/26 11:23:42 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 222.73.24.84 Cc: Paolo Bonzini , Markus Armbruster Subject: [Qemu-devel] [PATCH v21 2/8] 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 Reviewed-by: Markus Armbruster --- 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)