From nobody Fri May 3 02:49:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519723994314411.56576754930984; Tue, 27 Feb 2018 01:33:14 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id A9ED57FEA3; Tue, 27 Feb 2018 09:33:12 +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 7DC4160172; Tue, 27 Feb 2018 09:33:12 +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 D15124A46D; Tue, 27 Feb 2018 09:33:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1R9XAvP023995 for ; Tue, 27 Feb 2018 04:33:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 87A035D977; Tue, 27 Feb 2018 09:33:10 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 80AED5D96F for ; Tue, 27 Feb 2018 09:33:08 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 306334C for ; Tue, 27 Feb 2018 09:33:07 +0000 (UTC) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1R9WERW012070 for ; Tue, 27 Feb 2018 04:33:06 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gd1yaxn6r-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 27 Feb 2018 04:33:06 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Feb 2018 09:33:04 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 27 Feb 2018 09:33:01 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1R9X1eQ56099058; Tue, 27 Feb 2018 09:33:01 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C2A39A4059; Tue, 27 Feb 2018 09:26:05 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 97F53A4055; Tue, 27 Feb 2018 09:26:05 +0000 (GMT) Received: from s38lp19.boeblingen.de.ibm.com (unknown [9.152.161.19]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 27 Feb 2018 09:26:05 +0000 (GMT) From: Bjoern Walk To: libvir-list@redhat.com Date: Tue, 27 Feb 2018 10:32:56 +0100 In-Reply-To: <20180227093257.42384-1-bwalk@linux.vnet.ibm.com> References: <20180227093257.42384-1-bwalk@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18022709-0020-0000-0000-000003FC529B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022709-0021-0000-0000-00004290779A Message-Id: <20180227093257.42384-2-bwalk@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-27_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802270117 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 27 Feb 2018 09:33:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 27 Feb 2018 09:33:07 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'bwalk@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Bjoern Walk Subject: [libvirt] [PATCH v2 1/2] qemu: log the crash information for S390 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 Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 27 Feb 2018 09:33:13 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since QEMU 2.12 guest crash information for S390 is available in the QEMU monitor, e.g.: { "timestamp": { "seconds": 1518004739, "microseconds": 552563 }, "event": "GUEST_PANICKED", "data": { "action": "pause", "info": { "core": 0, "psw-addr": 1102832, "reason": "disabled-wait", "psw-mask": 562956395872256, "type": "s390" } } } Let's log this information into the domain log file, e.g.: 2018-02-08 13:11:26.075+0000: panic s390: core=3D'0' psw-mask=3D'0x0002= 000180000000' psw-addr=3D'0x000000000010f146' reason=3D'disabled-wait' Reviewed-by: Boris Fiuczynski Signed-off-by: Bjoern Walk Reviewed-by: John Ferlan --- src/qemu/qemu_monitor.c | 19 ++++++++++++++++++- src/qemu/qemu_monitor.h | 12 ++++++++++++ src/qemu/qemu_monitor_json.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index ad5c572a..1d67a977 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4361,7 +4361,14 @@ qemuMonitorGuestPanicEventInfoFormatMsg(qemuMonitorE= ventPanicInfoPtr info) info->data.hyperv.arg3, info->data.hyperv= .arg4, info->data.hyperv.arg5)); break; - + case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_S390: + ignore_value(virAsprintf(&ret, "s390: core=3D'%d' psw-mask=3D'0x%0= 16llx' " + "psw-addr=3D'0x%016llx' reason=3D'%s'", + info->data.s390.core, + info->data.s390.psw_mask, + info->data.s390.psw_addr, + info->data.s390.reason)); + break; case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_NONE: case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_LAST: break; @@ -4377,6 +4384,16 @@ qemuMonitorEventPanicInfoFree(qemuMonitorEventPanicI= nfoPtr info) if (!info) return; =20 + switch (info->type) { + case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_S390: + VIR_FREE(info->data.s390.reason); + break; + case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_NONE: + case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_HYPERV: + case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_LAST: + break; + } + VIR_FREE(info); } =20 diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 954ae88e..adfa87ab 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -73,6 +73,7 @@ struct _qemuMonitorMessage { typedef enum { QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_NONE =3D 0, QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_HYPERV, + QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_S390, =20 QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_LAST } qemuMonitorEventPanicInfoType; @@ -88,12 +89,23 @@ struct _qemuMonitorEventPanicInfoHyperv { unsigned long long arg5; }; =20 +typedef struct _qemuMonitorEventPanicInfoS390 qemuMonitorEventPanicInfoS39= 0; +typedef qemuMonitorEventPanicInfoS390 *qemuMonitorEventPanicInfoS390Ptr; +struct _qemuMonitorEventPanicInfoS390 { + /* S390 specific guest panic information */ + int core; + unsigned long long psw_mask; + unsigned long long psw_addr; + char *reason; +}; + typedef struct _qemuMonitorEventPanicInfo qemuMonitorEventPanicInfo; typedef qemuMonitorEventPanicInfo *qemuMonitorEventPanicInfoPtr; struct _qemuMonitorEventPanicInfo { qemuMonitorEventPanicInfoType type; union { qemuMonitorEventPanicInfoHyperv hyperv; + qemuMonitorEventPanicInfoS390 s390; } data; }; =20 diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index a09e93e4..9f68d4d1 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -576,6 +576,42 @@ qemuMonitorJSONGuestPanicExtractInfoHyperv(virJSONValu= ePtr data) return NULL; } =20 +static qemuMonitorEventPanicInfoPtr +qemuMonitorJSONGuestPanicExtractInfoS390(virJSONValuePtr data) +{ + qemuMonitorEventPanicInfoPtr ret; + int core; + unsigned long long psw_mask, psw_addr; + const char *reason =3D NULL; + + if (VIR_ALLOC(ret) < 0) + return NULL; + + ret->type =3D QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_S390; + + if (virJSONValueObjectGetNumberInt(data, "core", &core) < 0 || + virJSONValueObjectGetNumberUlong(data, "psw-mask", &psw_mask) < 0 = || + virJSONValueObjectGetNumberUlong(data, "psw-addr", &psw_addr) < 0 = || + !(reason =3D virJSONValueObjectGetString(data, "reason"))) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("malformed s390 pan= ic data")); + goto error; + } + + ret->data.s390.core =3D core; + ret->data.s390.psw_mask =3D psw_mask; + ret->data.s390.psw_addr =3D psw_addr; + + if (VIR_STRDUP(ret->data.s390.reason, reason) < 0) { + virReportOOMError(); + goto error; + } + + return ret; + + error: + qemuMonitorEventPanicInfoFree(ret); + return NULL; +} =20 static qemuMonitorEventPanicInfoPtr qemuMonitorJSONGuestPanicExtractInfo(virJSONValuePtr data) @@ -584,6 +620,8 @@ qemuMonitorJSONGuestPanicExtractInfo(virJSONValuePtr da= ta) =20 if (STREQ_NULLABLE(type, "hyper-v")) return qemuMonitorJSONGuestPanicExtractInfoHyperv(data); + else if (STREQ_NULLABLE(type, "s390")) + return qemuMonitorJSONGuestPanicExtractInfoS390(data); =20 virReportError(VIR_ERR_INTERNAL_ERROR, _("unknown panic info type '%s'"), NULLSTR(type)); --=20 2.13.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 02:49:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519723994466580.1591931103394; Tue, 27 Feb 2018 01:33:14 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1413F61D3B; Tue, 27 Feb 2018 09:33:13 +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 E26AF5C880; Tue, 27 Feb 2018 09:33:12 +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 A98DF4A46D; Tue, 27 Feb 2018 09:33:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1R9XBl9024000 for ; Tue, 27 Feb 2018 04:33:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id D811960C93; Tue, 27 Feb 2018 09:33:11 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D1F1360C91 for ; Tue, 27 Feb 2018 09:33:08 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 704817B9AD for ; Tue, 27 Feb 2018 09:33:07 +0000 (UTC) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1R9URV4014458 for ; Tue, 27 Feb 2018 04:33:06 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gd1xcy174-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 27 Feb 2018 04:33:06 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Feb 2018 09:33:04 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 27 Feb 2018 09:33:03 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1R9X2bX51380278; Tue, 27 Feb 2018 09:33:02 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0F2A5A4053; Tue, 27 Feb 2018 09:26:07 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D15EAA404D; Tue, 27 Feb 2018 09:26:06 +0000 (GMT) Received: from s38lp19.boeblingen.de.ibm.com (unknown [9.152.161.19]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 27 Feb 2018 09:26:06 +0000 (GMT) From: Bjoern Walk To: libvir-list@redhat.com Date: Tue, 27 Feb 2018 10:32:57 +0100 In-Reply-To: <20180227093257.42384-1-bwalk@linux.vnet.ibm.com> References: <20180227093257.42384-1-bwalk@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18022709-0040-0000-0000-000004384BCD X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022709-0041-0000-0000-000020DA7789 Message-Id: <20180227093257.42384-3-bwalk@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-27_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802270117 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 27 Feb 2018 09:33:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 27 Feb 2018 09:33:07 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'bwalk@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.72 (RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Bjoern Walk Subject: [libvirt] [PATCH v2 2/2] news: add logging of guest crash information on S390 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 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 27 Feb 2018 09:33:13 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Bjoern Walk Reviewed-by: John Ferlan --- docs/news.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 86a0c8d1..5dd01daf 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -140,6 +140,15 @@ qemu: Add support for hot unplugging redirdev device + + + qemu: Add logging of guest crash information on S390 + + + On S390, when the guest crashes and QEMU exposes the guest crash + information, log the relevant data to the domain log file. + +
--=20 2.13.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list