From patchwork Thu Feb 16 17:39:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9578489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6AB5360209 for ; Thu, 16 Feb 2017 23:10:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 584A32867D for ; Thu, 16 Feb 2017 23:10:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 492592869A; Thu, 16 Feb 2017 23:10:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8C50E2867D for ; Thu, 16 Feb 2017 23:10:39 +0000 (UTC) Received: from localhost ([::1]:50716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceVC9-0005cC-7q for patchwork-qemu-devel@patchwork.kernel.org; Thu, 16 Feb 2017 18:10:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceVBh-0005ZI-Pa for qemu-devel@nongnu.org; Thu, 16 Feb 2017 18:10:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceVBe-0005xm-K0 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 18:10:09 -0500 Received: from mail-db5eur01on0117.outbound.protection.outlook.com ([104.47.2.117]:3680 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ceVBe-0005uo-6H for qemu-devel@nongnu.org; Thu, 16 Feb 2017 18:10:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=5tklntPFo+nfjDpU1raS37G5GY49jYF8/rK7m0jjYww=; b=ZXxpED45hl6nRTlQm7nYg+s3ZYYmjqurXSFJugKP+2p+2+wRMn0Gzn17VMa+I1K3Cv1GQhjIvWpzMeCZHCulgaGTAlwLKoK6BhPRY8HJ30Pz/LPbiSSpPpAk3KXzz+isDt3gfBWJNrrk+cPDL9xatnSD3CBJPwCll/RygvZbdsM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by HE1PR08MB0972.eurprd08.prod.outlook.com (10.166.125.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Thu, 16 Feb 2017 17:39:50 +0000 From: Anton Nefedov To: Date: Thu, 16 Feb 2017 20:39:20 +0300 Message-ID: <1487266760-80500-2-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487266760-80500-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1487266760-80500-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0401CA0064.eurprd04.prod.outlook.com (10.168.27.32) To HE1PR08MB0972.eurprd08.prod.outlook.com (10.166.125.24) X-MS-Office365-Filtering-Correlation-Id: d544d659-f573-46de-6cd6-08d45692cef0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:HE1PR08MB0972; X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0972; 3:4VbtPk8UDSX08v33jYACFdmPqNvv9GWbSUPIxJQGfR0csxXgZIyYgEjyqmkqu/VWswuVyN2it+Pvn+NiYszOyi8hqUyRIpGXHtfEcvSM+7TRaxViLEvJ3urUGzj6lEl3WDSIXdrQQwSy58ELYeSnv/hnb1monPtqjaXEkyhT7lz/o3JXUzsy9Q0CHqTh8UptSrAPDlkNyCmuEQKx1QB2KlOQgLg3efVJIH07PTgoAt8b8QE4fxLJXOojAuhsFgEd0yWqonr89U3JgmNnjgF3Jw==; 25:GsuQzADTQ0wL621Ds2NoE1TojpKBD0X6QGiRCkDgVRm7gVxGx/KAi/vK76GOMVr7YwFX+Lhy+PibK4/8o2UnGNGwyJNWocq4ObeBYtyfvCxc1BfjtY0S7zysEJO3W26FgLHqi55Izz/9TBC5+uXUoTy2GBM9UnoVLAqyoJHUtIUfqDBlNr60J4RpP6QReMyKAet+AwbKJIPjnpcMe8UQQ3LMC6OeLiSKzoma2rApDHkgetlNSa9oPn8DFB3Sj5EXpnyPvhahpN+s8SF7V8JRdt/RhxFb8Ns9acdUARRS/wvFR8h6ulsVnDEPqqsYcYa05/K0mUV8lXOZ/AwQaHy727AdRpuIK4OfFA2TUenmLhrx8/hhoUQsUFxAP8C/lKXc2ZSdx4HAgPszd0m4LdIo3tfQdkHe/TiUv1sWzQPvV/qs11hOmO01dVkQjkOoZlGHC8BKykiw3ugIVY/k0NlkwQ== X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0972; 31:11CBLz8NUjdGcdzCpqE50byY+RwcqCAWYqOgCbc7glGtBADuGPI7wkKuJyfyWeepAzIWETeg9Cq0uDnNZ8f1hBWsW5wp5okNylM4Rp5/IbnRt/tOzSCd3U4wXWC4zoHVkFLE67h7VBFfRqie4/7L6qM84CTtaGUAo0Co3ApTA+KSiK6UHRcio+Fs6vLajmRGBmyW1uB/VMlSrksrQRCrgCQAcyhG6mC0YC5ihydWF9k=; 20:yOYa/3hEW7/qcRbgujmUgRsisa/4LFk+jpxP/ntfqxkY0xrM7DQQinzaceoP3NQOunm+VVGT1O1aCW6NNlx8asYUgPpFe3Efjf0SHjxLsKt3NPaSvspDijTNxSEvMEyG72t1tD0uvtqDnOr8dVNfnuTBy0ygIOo/WKH4YAGRcfWGYdlK6trjU+ENEY8y3Y/PHb5O0zNzkdaoO5u7SYdVVCRj/mr8B12wnS+hH5E0c9RAnDM/0v9+AzsnngL8UzpltQAsBJXA9T1rN8f73YuVUfKBPtRjwX4uuuR9GR4YnKzRBXUosA85XJD/WKOW++6yUIzpD9SjEQD8dbRSvfysDagBiYbV2Qk/sOoVVNRR3/+IyMc7rFjVNDmHKg1e6eWimWFQWvYR+GmyQYQrbQLYZi8ma20ZUaHQP44VDYjvar8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(211171220733660); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123558025)(20161123562025)(6072148); SRVR:HE1PR08MB0972; BCL:0; PCL:0; RULEID:; SRVR:HE1PR08MB0972; X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0972; 4:Q18yI/DE5EfxMGMuyUzkxtaLCFQICoQ3QzVq23d4uMUvR35g8KtgOXYxEHhJU7NdAWRgfmKn+8R6li6WJrySF9CInIPuJ9b5n0aNyFPtN6DFr3cdDy7EOeA37ouC4zA3tStl1he56yoTRTskKx71VGu5cYynEASdgebOFXWeFLueOetW73KZCLqro2BYH+BSEOSjFDO1pWSRaJEYftMQNWNPBCy33g5NzHqCKtk944U9dR3Ui3aK2035JNmH8jnYWy/6oAjs6y8/7tPxF18KjzZhO50wyqIS9uaUaUzYWwU9VXS2cuYxlm2rvsOBTu/9UFcnO/P4YQ7dfWkGWT41oaWTjO6vaXVrkUpzEIEMerPOKIa2PyIzFfdyBM4iNXfH9cIcnhOgS67I1Tq+5biEWZBHgBoXKt6EFGvOGSronsoShheidYw/3GzKTPzGpUjqRmMPM5dmIlP7QZckuqlLPo+vTiUDwOa5OqJJ8CBzjh2TnkDidl+7LZTQQAAcxjXI1YRtDuIuTF5jxv5vHYvnyu+0/IYC+g7Nr0HM5dvz07lhkX9UTcoRsrOMgVcqLi/YrAs0WBL+htmQ2HdydNX19mQN85qFqoed8s3KC1phABjbyjMWodcTwOL2Zdd1Ln6T+56ZAOnpHvP3OfPvc56/RA== X-Forefront-PRVS: 0220D4B98D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(39450400003)(39830400002)(39410400002)(189002)(199003)(4326007)(86362001)(50466002)(5660300001)(6666003)(2351001)(2950100002)(6916009)(54906002)(53936002)(8676002)(389900003)(81156014)(3846002)(92566002)(6116002)(189998001)(48376002)(81166006)(50226002)(25786008)(36756003)(50986999)(76176999)(305945005)(6506006)(110136004)(38730400002)(101416001)(107886003)(6512007)(53416004)(105586002)(42186005)(69596002)(7736002)(6486002)(2906002)(33646002)(106356001)(66066001)(97736004)(68736007)(5003940100001)(47776003); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR08MB0972; H:xantnef-ws.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR08MB0972; 23:DDTi1jHVw36gN0SbPCjDtRt190piN341y39RjfUN6?= =?us-ascii?Q?ITQHSeBkBcbr78XD2lFiShBRbRJPmsCG8xli6HHlWg4THJ5VFLoXv61rhSjB?= =?us-ascii?Q?Pq3bbryUlzTvNcNUXRzPrpytLCSgEA+9B4DDGdSCRgeY1msEsZs9xF/utZUw?= =?us-ascii?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ange-Diagnostics: 1; HE1PR08MB0972; 7:4hYUJDWOsbDKyuM/KBSTI9ayBRm2Ab8jzt1Nug6whJELZkXaikzfLOxYBZW3Yg+Idbita6pnGlArq2LaPxzIPzeuaz/0Tg3kLwM1OeJdvUymhPgzomGTvJqSXQ+0ooVCnzbsuUTUUfhoudVrax+yKD8xplnR7TG+0Y4Vl7A+m5Dg4lU0BgruYk+yiPyP0BLQBlxhb2HIfQ/VGr6ZVH/VmxNTde+1Pg42Gtv68bTrWz4KsZkmwWPPuvZVZtBgwQ00EN/uS5Z+A4ySsBkAH7+uPsvjy6vwU0cKGL+BUFyxHN5dJyN92fiZhcAEedQYNmtdV9ersQm/h7tC4xw4hzf4ww==; 20:yq+/UhYOmCfn4oOFilWzrKOYa3D1LxJZZl+UucdnAhQKM5jkx2vBaaQb6Z8b03k+rpl6XPe5M+V/kfchubDPx/4LYH1AfNxdO7JYNfC7h8/0QVXnXc7ooyaisruAwQmsSDm4lpChMabSQE+aeA6Q841VYUhrZtj93cG8MiIk3gM= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2017 17:39:50.0937 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB0972 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.117 Subject: [Qemu-devel] [PATCH] qmp-events: fix GUEST_PANICKED description formatting X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, anton.nefedov@virtuozzo.com, armbru@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP also remove a useless NULL check in the event reporting code Signed-off-by: Anton Nefedov --- qapi/event.json | 4 ++-- vl.c | 22 ++++++++++------------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/qapi/event.json b/qapi/event.json index 970ff02..e02852c 100644 --- a/qapi/event.json +++ b/qapi/event.json @@ -488,9 +488,9 @@ # # @action: action that has been taken, currently always "pause" # -# @info: optional information about a panic +# @info: #optional information about a panic (since 2.9) # -# Since: 1.5 (@info since 2.9) +# Since: 1.5 # # Example: # diff --git a/vl.c b/vl.c index 903c46d..f410e03 100644 --- a/vl.c +++ b/vl.c @@ -1710,6 +1710,15 @@ void qemu_system_reset(bool report) void qemu_system_guest_panicked(GuestPanicInformation *info) { qemu_log_mask(LOG_GUEST_ERROR, "Guest crashed\n"); + if (info && info->type == GUEST_PANIC_INFORMATION_KIND_HYPER_V) { + qemu_log_mask(LOG_GUEST_ERROR, "HV crash parameters: (%#"PRIx64 + " %#"PRIx64" %#"PRIx64" %#"PRIx64" %#"PRIx64")\n", + info->u.hyper_v.data->arg1, + info->u.hyper_v.data->arg2, + info->u.hyper_v.data->arg3, + info->u.hyper_v.data->arg4, + info->u.hyper_v.data->arg5); + } if (current_cpu) { current_cpu->crash_occurred = true; @@ -1723,18 +1732,7 @@ void qemu_system_guest_panicked(GuestPanicInformation *info) qemu_system_shutdown_request(); } - if (info) { - if (info->type == GUEST_PANIC_INFORMATION_KIND_HYPER_V) { - qemu_log_mask(LOG_GUEST_ERROR, "HV crash parameters: (%#"PRIx64 - " %#"PRIx64" %#"PRIx64" %#"PRIx64" %#"PRIx64")\n", - info->u.hyper_v.data->arg1, - info->u.hyper_v.data->arg2, - info->u.hyper_v.data->arg3, - info->u.hyper_v.data->arg4, - info->u.hyper_v.data->arg5); - } - qapi_free_GuestPanicInformation(info); - } + qapi_free_GuestPanicInformation(info); } void qemu_system_reset_request(void)