From nobody Tue Apr 23 11:28:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=bytedance.com ARC-Seal: i=1; a=rsa-sha256; t=1578650819; cv=none; d=zohomail.com; s=zohoarc; b=YKkYS9ZaMqcIJ0qNMpKOkQjmkj54TOEolu4T5+8NnnsUHIiKYG9auxxBHN8asu5cLWKSBhA+hPUWSEr8vpGGsejFF4DoDSYoquMl9YDl9NWpk8W2RcDPME5oBla8G1kosKuW/aIl0L43KG0X6YpgBOHJIqbIzk+ksHPdpb24fwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578650819; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IUgIZ3HjhFgPRZ5sPrpSavWZSCy5GuLmZk9ly6bvA+s=; b=liTdCNl5Oz6Gl3UU1agaG2cgFMAvJi3n44Vvl1LNW5NcXaZwagxtd0PIIvUPYejQfKaaOOY4xz2qkBx2QoyKSzJXEnqLAxioE28yOpd8OdRmVbUHUk70fJsJjzNsDf/PLrdx7m+GPg5j/I6CLLnu1UCHgeW6FSvP6eFm7kidVvo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1578650819704740.2564308473815; Fri, 10 Jan 2020 02:06:59 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-193-NJxqJbwoPSWTdcnwfCOB1g-1; Fri, 10 Jan 2020 05:06:57 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 89411184B1F8; Fri, 10 Jan 2020 10:06:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F1C460FA2; Fri, 10 Jan 2020 10:06:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C7D0C503CE; Fri, 10 Jan 2020 10:06:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00AA6mZ9000346 for ; Fri, 10 Jan 2020 05:06:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3266A2022EAC; Fri, 10 Jan 2020 10:06:48 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C3202022EAB for ; Fri, 10 Jan 2020 10:06:48 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0BD8F8E6847 for ; Fri, 10 Jan 2020 10:06:48 +0000 (UTC) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-349-cv0w-lcnMa-SQBe1kCi6QA-1; Fri, 10 Jan 2020 05:06:46 -0500 Received: by mail-pl1-f193.google.com with SMTP id c23so674869plz.4 for ; Fri, 10 Jan 2020 02:06:46 -0800 (PST) Received: from libai.bytedance.net ([61.120.150.71]) by smtp.gmail.com with ESMTPSA id q21sm2179039pff.105.2020.01.10.02.06.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jan 2020 02:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578650818; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=IUgIZ3HjhFgPRZ5sPrpSavWZSCy5GuLmZk9ly6bvA+s=; b=JnCdqogfZHzKsd+yigPfG4THarXZIwAP2GHKQnvXY91QqTUDmeIJQnz7WdKBf8MYyYcqCu JAv083zpUkdUK/BMi/0091sf/qd1Cpk2+yVbG7XyqSTXaOSkZlWcULF2QDWTPuc269m5Uc aB4OKqSSFYAnKWvviw424V9AHpjmlQU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dAhOey3cqiOp5/b6uTfIau2ZiRzs6yslTIYzXyRfd0c=; b=BDJ3CdLIYbE1U37DF6j5KSNLpMFP9Mfgdkwn50regu/rw0UfKDEsCmHOMEP9qRGx1e nS3PuBQg+Oq2Rj20fQnbuLndGLvLErYo1ZVgfudpwacMsCMqtMRz5zxOJhh1KvgG5LIY v3I4j1XpcPUQC8BEN0FG88zLIeQNXnZeZb6PqeD82zFtKRCT33zWNfb/J+4hqadV/ck5 9fW36P83VNC+ZjA66pAX0Y5OiqBhKgKGTAdxheAAlc1tkwKR/Ye4q/Ol3BsHVNP0SYYp ds6GtEF7Q0JJIAODZctO0dF/axatr9ymhr8+xMo4rD6QMMpZEuKarHa5dyFzHyWOfg+P rsCg== X-Gm-Message-State: APjAAAX92hmAzf/hwB3krK+Hl5VUKFRfEb7nYvbxwLYJ+t8BVgXwRP7O hKbTeopibag7y427D0l20YJI1Q== X-Google-Smtp-Source: APXvYqyqnZ9lf3ppNVir68eoZT7u3buRR7s7HIwujRNHxEUEdVG6qsr88g9VM/pC+0jZaZIEUqzprA== X-Received: by 2002:a17:90a:1b4d:: with SMTP id q71mr3653557pjq.82.1578650805378; Fri, 10 Jan 2020 02:06:45 -0800 (PST) From: zhenwei pi To: pbonzini@redhat.com Date: Fri, 10 Jan 2020 18:06:33 +0800 Message-Id: <20200110100634.491936-2-pizhenwei@bytedance.com> In-Reply-To: <20200110100634.491936-1-pizhenwei@bytedance.com> References: <20200110100634.491936-1-pizhenwei@bytedance.com> X-MC-Unique: cv0w-lcnMa-SQBe1kCi6QA-1 X-MC-Unique: NJxqJbwoPSWTdcnwfCOB1g-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 00AA6mZ9000346 X-loop: libvir-list@redhat.com Cc: yelu@bytedance.com, libvir-list@redhat.com, gregkh@linuxfoundation.org, qemu-devel@nongnu.org, zhenwei pi , linux-kernel@vger.kernel.org, mprivozn@redhat.com Subject: [libvirt] [PATCH 1/2] pvpanic: introduce crashloaded for pvpanic X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add bit 1 for pvpanic. This bit means that guest hits a panic, but guest wants to handle error by itself. Typical case: Linux guest runs kdump in panic. It will help us to separate the abnormal reboot from normal operation. Signed-off-by: zhenwei pi --- docs/specs/pvpanic.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/specs/pvpanic.txt b/docs/specs/pvpanic.txt index c7bbacc778..bdea68a430 100644 --- a/docs/specs/pvpanic.txt +++ b/docs/specs/pvpanic.txt @@ -16,8 +16,12 @@ pvpanic exposes a single I/O port, by default 0x505. On = read, the bits recognized by the device are set. Software should ignore bits it doesn't recognize. On write, the bits not recognized by the device are ignored. Software should set only bits both itself and the device recognize. -Currently, only bit 0 is recognized, setting it indicates a guest panic -has happened. + +Bit Definition +-------------- +bit 0: setting it indicates a guest panic has happened. +bit 1: named crashloaded. setting it indicates a guest panic and run + kexec to handle error by guest itself. =20 ACPI Interface -------------- --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue Apr 23 11:28:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=bytedance.com ARC-Seal: i=1; a=rsa-sha256; t=1578650827; cv=none; d=zohomail.com; s=zohoarc; b=DmdnF8pDHSuommGpHhs0+wn4Go1FKA3YgfKvsBh0WwRwQ6iHxBDYqrj6+EL69XcNuXC9zf6uveqw3ovyk1gpd6qQpRWuOkGI4dtsxuWk1CQoNi4LPKjbnZAsBPDQaOuNiNFVda3rMTkM6rOJo4yh5hp+PMgLgXVNX4Dcsy5SXoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578650827; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TPKmHZ1Nk2MsIZoUYh18WfXWM/271xyHVRZf7xUcajg=; b=XtYjkpWRi/7TDgtMBTVMQ2pQnvwIe9OWukRl8NBolIPqhhUxIx8hIxKHkmK0urDkPuCzeNbbZ7FGnwCxyzJDSDWlCoC2C/DthdsJW1R9hU5tZ0KjeMYZu5oIgkFS3aYUEhBwyjsUFdg76P8i4+014zppKArAT+eJ2t5wCO+84k4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1578650826997536.7390657899408; Fri, 10 Jan 2020 02:07:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-87-lKZwq1isPkau1pAZvF4HEA-1; Fri, 10 Jan 2020 05:07:04 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 489861034B21; Fri, 10 Jan 2020 10:06:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2263C80620; Fri, 10 Jan 2020 10:06:57 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CBEEC503D5; Fri, 10 Jan 2020 10:06:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00AA6sB8000365 for ; Fri, 10 Jan 2020 05:06:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id 784EC2166B28; Fri, 10 Jan 2020 10:06:54 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 732112166B29 for ; Fri, 10 Jan 2020 10:06:52 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E245E180192C for ; Fri, 10 Jan 2020 10:06:51 +0000 (UTC) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-106-3qHIzdvAN7q6i4XGErDw0w-1; Fri, 10 Jan 2020 05:06:50 -0500 Received: by mail-pf1-f196.google.com with SMTP id 195so889977pfw.11 for ; Fri, 10 Jan 2020 02:06:49 -0800 (PST) Received: from libai.bytedance.net ([61.120.150.71]) by smtp.gmail.com with ESMTPSA id q21sm2179039pff.105.2020.01.10.02.06.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jan 2020 02:06:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578650825; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=TPKmHZ1Nk2MsIZoUYh18WfXWM/271xyHVRZf7xUcajg=; b=bHu7FRSiIKorbKJq/rd2Z5TQqTso481Sm/M8woBRAIsVDWhcBJZPqsR8WjNY4uLBrxF0Tn 4Qp4iFcLUCBB5TGsWQwX3UNvOHnSJhvnJ2mVrJ/gCgLrbp+Dc/DFz/dgjEHyXOn9/G7njN vwUrclc9NI6WbpiPi+WXby6JFsFYS8w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fshKwfwt9Dp2Wq1APH+4/EX0Jo99Mva81d26eLwAGKU=; b=cDSxYPj25SknMz29LYdE99Bxs2I7bFnzXGEYQvy8DBZLDyQe/GFpUzIY4eba8SATRW f/8MF+jQ2SxLQVqF8A3KneIsFh8YXImwtqcgu357NFrepv6vYElmq2UzArkmJsoL60/R FJlz1ePchhpU8Q+BCZ96tf71hG7SZfcZU1zUeo4fw5Ydr0Nnj3KwdF6A6UEAtrURYDhh u6yLoCD0cWYts//ZBXi8MXFlGjBU/wqcnYGGdBux+z004/rL72t0AadXXh8IrE7lPmB6 6gkBfbx9Ikt9d9mARiZzWzZpBWUNLvBIG6HxcLt2tIz0oJYSdAEDFZvRiWQiP68UNoVP +F7Q== X-Gm-Message-State: APjAAAXIWhs33agMQ93MyrEJ75lDE8P7FQKX9YF8GbreEQymjrbe9wDj TEAALTy/ockl4OQjCunNM1NiTQ== X-Google-Smtp-Source: APXvYqwLM80h5i/WiPXHqIG/DdJ1TUWK+d+JqiEcoNNkviF23F6YROu6y6DgPL2cKbxCTsnfqsFYxg== X-Received: by 2002:a63:201d:: with SMTP id g29mr3428289pgg.427.1578650808856; Fri, 10 Jan 2020 02:06:48 -0800 (PST) From: zhenwei pi To: pbonzini@redhat.com Date: Fri, 10 Jan 2020 18:06:34 +0800 Message-Id: <20200110100634.491936-3-pizhenwei@bytedance.com> In-Reply-To: <20200110100634.491936-1-pizhenwei@bytedance.com> References: <20200110100634.491936-1-pizhenwei@bytedance.com> X-MC-Unique: 3qHIzdvAN7q6i4XGErDw0w-1 X-MC-Unique: lKZwq1isPkau1pAZvF4HEA-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 00AA6sB8000365 X-loop: libvir-list@redhat.com Cc: yelu@bytedance.com, libvir-list@redhat.com, gregkh@linuxfoundation.org, qemu-devel@nongnu.org, zhenwei pi , linux-kernel@vger.kernel.org, mprivozn@redhat.com Subject: [libvirt] [PATCH 2/2] pvpanic: implement crashloaded event handling X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Handle bit 1 write, then post event to monitor. Suggested by Paolo, declear a new event, using GUEST_PANICKED could cause upper layers to react by shutting down or rebooting the guest. In advance for extention, add GuestPanicInformation in event message. Signed-off-by: zhenwei pi --- hw/misc/pvpanic.c | 11 +++++++++-- include/sysemu/runstate.h | 1 + qapi/run-state.json | 22 +++++++++++++++++++++- vl.c | 12 ++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c index d65ac86478..4ebda7872a 100644 --- a/hw/misc/pvpanic.c +++ b/hw/misc/pvpanic.c @@ -21,11 +21,13 @@ #include "hw/qdev-properties.h" #include "hw/misc/pvpanic.h" =20 -/* The bit of supported pv event */ +/* The bit of supported pv event, TODO: include uapi header and remove thi= s */ #define PVPANIC_F_PANICKED 0 +#define PVPANIC_F_CRASHLOADED 1 =20 /* The pv event value */ #define PVPANIC_PANICKED (1 << PVPANIC_F_PANICKED) +#define PVPANIC_CRASHLOADED (1 << PVPANIC_F_CRASHLOADED) =20 #define ISA_PVPANIC_DEVICE(obj) \ OBJECT_CHECK(PVPanicState, (obj), TYPE_PVPANIC) @@ -34,7 +36,7 @@ static void handle_event(int event) { static bool logged; =20 - if (event & ~PVPANIC_PANICKED && !logged) { + if (event & ~(PVPANIC_PANICKED | PVPANIC_CRASHLOADED) && !logged) { qemu_log_mask(LOG_GUEST_ERROR, "pvpanic: unknown event %#x.\n", ev= ent); logged =3D true; } @@ -43,6 +45,11 @@ static void handle_event(int event) qemu_system_guest_panicked(NULL); return; } + + if (event & PVPANIC_CRASHLOADED) { + qemu_system_guest_crashloaded(NULL); + return; + } } =20 #include "hw/isa/isa.h" diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index 0b41555609..f760094858 100644 --- a/include/sysemu/runstate.h +++ b/include/sysemu/runstate.h @@ -63,6 +63,7 @@ ShutdownCause qemu_reset_requested_get(void); void qemu_system_killed(int signal, pid_t pid); void qemu_system_reset(ShutdownCause reason); void qemu_system_guest_panicked(GuestPanicInformation *info); +void qemu_system_guest_crashloaded(GuestPanicInformation *info); =20 #endif =20 diff --git a/qapi/run-state.json b/qapi/run-state.json index d7477cd715..b7a91f3125 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -357,6 +357,26 @@ 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation'= } } =20 ## +# @GUEST_CRASHLOADED: +# +# Emitted when guest OS crash loaded is detected +# +# @action: action that has been taken, currently always "run" +# +# @info: information about a panic (since 2.9) +# +# Since: 5.0 +# +# Example: +# +# <- { "event": "GUEST_CRASHLOADED", +# "data": { "action": "run" } } +# +## +{ 'event': 'GUEST_CRASHLOADED', + 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation'= } } + +## # @GuestPanicAction: # # An enumeration of the actions taken when guest OS panic is detected @@ -366,7 +386,7 @@ # Since: 2.1 (poweroff since 2.8) ## { 'enum': 'GuestPanicAction', - 'data': [ 'pause', 'poweroff' ] } + 'data': [ 'pause', 'poweroff', 'run' ] } =20 ## # @GuestPanicInformationType: diff --git a/vl.c b/vl.c index 86474a55c9..5b1b2ef095 100644 --- a/vl.c +++ b/vl.c @@ -1468,6 +1468,18 @@ void qemu_system_guest_panicked(GuestPanicInformatio= n *info) } } =20 +void qemu_system_guest_crashloaded(GuestPanicInformation *info) +{ + qemu_log_mask(LOG_GUEST_ERROR, "Guest crash loaded"); + + qapi_event_send_guest_crashloaded(GUEST_PANIC_ACTION_RUN, + !!info, info); + + if (info) { + qapi_free_GuestPanicInformation(info); + } +} + void qemu_system_reset_request(ShutdownCause reason) { if (no_reboot && reason !=3D SHUTDOWN_CAUSE_SUBSYSTEM_RESET) { --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list