From patchwork Thu Mar 14 08:15:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hu Tao X-Patchwork-Id: 227476 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 2E4B22C00A9 for ; Thu, 14 Mar 2013 19:18:22 +1100 (EST) Received: from localhost ([::1]:57078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG3Mi-0007yW-Bn for incoming@patchwork.ozlabs.org; Thu, 14 Mar 2013 04:18:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG3Kn-0005ZI-GW for qemu-devel@nongnu.org; Thu, 14 Mar 2013 04:16:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UG3Kj-0002ux-7x for qemu-devel@nongnu.org; Thu, 14 Mar 2013 04:16:21 -0400 Received: from [222.73.24.84] (port=23745 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG3Ki-0002ug-TP for qemu-devel@nongnu.org; Thu, 14 Mar 2013 04:16:17 -0400 X-IronPort-AV: E=Sophos;i="4.84,843,1355068800"; d="scan'208";a="6871311" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 14 Mar 2013 16:13:21 +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 r2E8Flts030308; Thu, 14 Mar 2013 16:15:48 +0800 Received: from localhost.localdomain ([10.167.233.156]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013031416143122-862267 ; Thu, 14 Mar 2013 16:14:31 +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 , Kevin Wolf , Wen Congyang , "Michael S. Tsirkin" , Alexander Graf , Alex Williamson , Peter Maydell , Christian Borntraeger Date: Thu, 14 Mar 2013 16:15:51 +0800 Message-Id: <6c31b1535b0e2beb6b099831b9c71b6168b6201f.1363243596.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/14 16:14:31, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/03/14 16:14:32, Serialize complete at 2013/03/14 16:14:32 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 v14 2/4] 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 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. + +Data: + +- "action": Action that has been taken. Currently it's 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)