From nobody Wed Nov 27 09:50:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1699366960; cv=none; d=zohomail.com; s=zohoarc; b=hXY4oX9RhwZPO2cI6uQXI4nsB6vX+tL0rysaqC4Yziy5pK4xhTMIW40Jrg8vn9PRMVqdEEjD1YHSbJE/OA9xPKPLP6cwBx1lqkBkLV6X5i3musfiy4jpegA4E1x6EGO+33i4tBbjPPSLMPRkqLp5hEuNhMk2zwpGrHpWHi5Ef2g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699366960; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=L8eMsSC272LOxGADKNqHNvwqRKhWq/daxb4+R4VbC/k=; b=VAuNlB6gWEbGYqcLk/czieauVc29eA06zY3/oz4LU0daAd500sT39mWCzcstA0Tw4ub9WhX/YrTQxUYd8CNOXDQtLuEdyXB6BKb6gdWkYsmxND2EY+uT+7qVfJnv3kggq/KL1R6KTHuuZsk/byo6s6Wrd/Nh8zBZR4o3NzlhX+E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699366960381856.462641719909; Tue, 7 Nov 2023 06:22:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0MxA-0000sl-D2; Tue, 07 Nov 2023 09:21:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0Mx9-0000sL-B3; Tue, 07 Nov 2023 09:21:15 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0Mx7-000719-Ln; Tue, 07 Nov 2023 09:21:15 -0500 Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7EJZMA024595; Tue, 7 Nov 2023 14:21:11 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u7pwag28w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:10 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3A7EKQcJ028769; Tue, 7 Nov 2023 14:21:09 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u7pwag27g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:09 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7EI248028253; Tue, 7 Nov 2023 14:21:08 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3u62gk0qyj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:08 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3A7EL7Wi45351176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Nov 2023 14:21:07 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E7FCC20049; Tue, 7 Nov 2023 14:21:06 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C422B2004E; Tue, 7 Nov 2023 14:21:06 +0000 (GMT) Received: from a46lp67.. (unknown [9.152.108.100]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 7 Nov 2023 14:21:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=L8eMsSC272LOxGADKNqHNvwqRKhWq/daxb4+R4VbC/k=; b=bYVhO/phJk8IMqvbqLMziNQMjvUcHPkpvEytlal1zMkcNv0d3ardgMtpCUSw1s4DBaSi JVrYVehO/U3imbCEn2WU1WXRghHtk7cyjjUrgB/lVmazCbe13xiF+fmZyHiQHbZrnZw/ wDb5TFBQl2aY3EA8AJhnwnMeZyB/4E9RLcKOAKRLR18QcLLR4Qk9uLsKgPTP6WaiIKNn 38BxDxSKFS4B6Va4Jqqo4ZmLO7l17hhi6lfNK1yXNhlsFp4mXFUqnaQivy9EQFSYPooa /BphZEOdCNTpAmMCNuw02kOB4ddCRRt/kNDwjYbDJTImC1+Wki2ZsQlSvpZ/Co863tpK Lw== From: Janosch Frank To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, marcandre.lureau@redhat.com, thuth@redhat.com, imbrenda@linux.ibm.com Subject: [PATCH 1/4] dump: Set dump info function pointers to NULL Date: Tue, 7 Nov 2023 14:20:45 +0000 Message-Id: <20231107142048.22422-2-frankja@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231107142048.22422-1-frankja@linux.ibm.com> References: <20231107142048.22422-1-frankja@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 9s9gKleLJCoIAWGdJb-yP5L8NQH87UoL X-Proofpoint-GUID: nJKwWZlRAe1wZKvP3Qh5RAgyw8zaePYM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_05,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 adultscore=0 bulkscore=0 mlxscore=0 spamscore=0 mlxlogscore=803 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311070118 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=frankja@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1699366962375100003 Content-Type: text/plain; charset="utf-8" Better to not rely on the struct zeroing since NULL is not necessarily 0. Signed-off-by: Janosch Frank --- dump/dump.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dump/dump.c b/dump/dump.c index d355ada62e..1d38274925 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1706,6 +1706,9 @@ static void dump_state_prepare(DumpState *s) { /* zero the struct, setting status to active */ *s =3D (DumpState) { .status =3D DUMP_STATUS_ACTIVE }; + s->dump_info.arch_sections_add_fn =3D NULL; + s->dump_info.arch_sections_write_hdr_fn =3D NULL; + s->dump_info.arch_sections_write_fn =3D NULL; } =20 bool qemu_system_dump_in_progress(void) --=20 2.34.1 From nobody Wed Nov 27 09:50:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1699366953; cv=none; d=zohomail.com; s=zohoarc; b=aqR4bIoFSvj/RQtRneP3lZFsOCXsLqZtOeSn9C7h6lrlf2XG+kvZJlVVQdxtlmn285SLFNCCbqxnaaUxz+CPHPQQReBpDOh5uMihiwBJgOuUEkaStrVTgpeHfUojc4svfoRbYAO+bjnC19QjvYKgpz8Dkj6Xe2/TVFGRw30NZIo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699366953; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4JPR7W3IJVqy4P6UnrpwkJpRzrjwi3WayfURjaC/bwY=; b=N2kV1v9CNNY9rLhGqfBuKhShxdzviZMq1OQhiQKzvz5MHSDg1enUZbuhTEEhXlI+Iep8brzbAxz/sV1jmvcF6c48c1ux34BiBS4z7je3rQCuE12cLNY+i5YvVGEjGBx4q2FRsF7me+BwlC7Fi9CUnGoTng/cXURbUDDfEquJjpM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699366952999186.00354379332168; Tue, 7 Nov 2023 06:22:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0MxC-0000u2-7g; Tue, 07 Nov 2023 09:21:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0MxA-0000st-Kf; Tue, 07 Nov 2023 09:21:16 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0Mx8-00071L-6K; Tue, 07 Nov 2023 09:21:16 -0500 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7EFpWd032705; Tue, 7 Nov 2023 14:21:12 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u7pungdtn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:11 +0000 Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3A7EGVR2003103; Tue, 7 Nov 2023 14:21:11 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u7pungds3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:10 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7CXnxq007958; Tue, 7 Nov 2023 14:21:09 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3u60nyh7px-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:09 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3A7EL72c37880328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Nov 2023 14:21:07 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1D33520049; Tue, 7 Nov 2023 14:21:07 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC77E2004D; Tue, 7 Nov 2023 14:21:06 +0000 (GMT) Received: from a46lp67.. (unknown [9.152.108.100]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 7 Nov 2023 14:21:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=4JPR7W3IJVqy4P6UnrpwkJpRzrjwi3WayfURjaC/bwY=; b=YbimfsBRfM10UZLXRMnOWvR++qgG2lyhoz61Rp/ELaVvQE+cVzjERZm2vHWMwdh5gemO wtyvgzKVaIBnLij1GZwta5Gdgqy8IcDaQ3cEB62VSQkXd5MlkxWW4ORi05VmOG9Ei94c ZQUQzJaiUUhLI5zPt2oTx1JgGvH1j+T/tiSTgQuSkmpCeDx/CDk+/zCrKr18QdUiMPZZ BDRN51x2Il+/lyCO9sqrenrGoMvn29VtC7dEJBnjyjSPFzk8U8TCsqHRjabF9ItF9kaH yeZuoSMc9ggM6ToSPDJ0/uBeC2gQvI3dVIKgvprlElhMIqUoyNEw9HWNN/fO/Y0fUb+f Bg== From: Janosch Frank To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, marcandre.lureau@redhat.com, thuth@redhat.com, imbrenda@linux.ibm.com Subject: [PATCH 2/4] target/s390x/dump: Remove unneeded dump info function pointer init Date: Tue, 7 Nov 2023 14:20:46 +0000 Message-Id: <20231107142048.22422-3-frankja@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231107142048.22422-1-frankja@linux.ibm.com> References: <20231107142048.22422-1-frankja@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: c6069JV4iwnpPBtyMnbP3ZJltPiXk-y6 X-Proofpoint-ORIG-GUID: UvYJ3pGjdtnxEtdEHAseOsLBaNP58o87 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_05,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 mlxlogscore=537 phishscore=0 mlxscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311070118 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=frankja@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1699366954142100005 Content-Type: text/plain; charset="utf-8" dump_state_prepare() now sets the fucntion pointers to NULL so we only need to touch them if we're going to use them. Signed-off-by: Janosch Frank Reviewed-by: Marc-Andr=C3=A9 Lureau --- target/s390x/arch_dump.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c index 51a2116515..bdb0bfa0e7 100644 --- a/target/s390x/arch_dump.c +++ b/target/s390x/arch_dump.c @@ -448,10 +448,6 @@ int cpu_get_dump_info(ArchDumpInfo *info, info->arch_sections_add_fn =3D *arch_sections_add; info->arch_sections_write_hdr_fn =3D *arch_sections_write_hdr; info->arch_sections_write_fn =3D *arch_sections_write; - } else { - info->arch_sections_add_fn =3D NULL; - info->arch_sections_write_hdr_fn =3D NULL; - info->arch_sections_write_fn =3D NULL; } return 0; } --=20 2.34.1 From nobody Wed Nov 27 09:50:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1699366962; cv=none; d=zohomail.com; s=zohoarc; b=AfUG4lgULGoIFLdILoKDYwkoePpwYYZYyqEFR3nU1lbd3zP5x8mAzO3pXuyDxR/oTakp1XC/npK1+2MUXWapr/xC/f0yXbKT0jfg3C0i5fZwXo3xLsriJ1YEwbbOd/scnUHLVimj5uiLBweBgQ8yQ2kCrlBqxnI6nQrhpqeoElw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699366962; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=at7fwd4i5wuk4G9X3L4wCGqhlwkM4JHbQIKrDTw7Rjk=; b=TQvQdW3ZXOOpsfXS0hncpMebTrvM9kpYs+J/XHHhzXhQNbhtOReVhy0fK2O0wxRf+8JJ6XmuFZupbq7uMw/giZW6KQwMP2co/w4CxBIsuL7i5PmT3wg3xUfBdUxfz06DSCJtt+byLj5S6S0iUolbkOxJfU9fjjimhVf9xki2D2E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699366962808781.9059157412742; Tue, 7 Nov 2023 06:22:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0MxA-0000sn-Lq; Tue, 07 Nov 2023 09:21:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0Mx9-0000sS-IC; Tue, 07 Nov 2023 09:21:15 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0Mx7-00071A-Jk; Tue, 07 Nov 2023 09:21:15 -0500 Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7EK1Z5018422; Tue, 7 Nov 2023 14:21:11 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u7pwj00ym-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:10 +0000 Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3A7EL5MJ021634; Tue, 7 Nov 2023 14:21:10 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u7pwj00x5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:10 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7DQOxH007938; Tue, 7 Nov 2023 14:21:09 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3u61skgxbp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:09 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3A7EL7Uj37880330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Nov 2023 14:21:07 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3A64C2004D; Tue, 7 Nov 2023 14:21:07 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2025F20040; Tue, 7 Nov 2023 14:21:07 +0000 (GMT) Received: from a46lp67.. (unknown [9.152.108.100]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 7 Nov 2023 14:21:07 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=at7fwd4i5wuk4G9X3L4wCGqhlwkM4JHbQIKrDTw7Rjk=; b=rOABPsUuDhRNjPXGNKMdlUKB6HdF0DHajor8Dn2rxGIOfsOn3LCxfCSW4k6v/GR9zKdj yzLTHRb8oWohvs+yuGgiQH9lwSkwqNPMKXxEBfn3exI7FS7gq3fShDVALoMpv7JvX0pW OHb3/hD2HW3yl1wGceWCIKlAaYDjSXDSp3MC8M1O8zG7jnqfQUS7giXLHdvQ1zMvTXgG k4U2/LZwHotFOCTa1uSeI3ovrJPvkTC5wAVQzVt56dzHJo3O0xSB818eHigiToP0USbC PiWnVmYFBgd3oYXkfwvaD8S5TR75un+AWWB/rYfIm76OSGb8VguFi5lghVgT5ncSwrW5 3w== From: Janosch Frank To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, marcandre.lureau@redhat.com, thuth@redhat.com, imbrenda@linux.ibm.com Subject: [PATCH 3/4] dump: Add arch cleanup function Date: Tue, 7 Nov 2023 14:20:47 +0000 Message-Id: <20231107142048.22422-4-frankja@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231107142048.22422-1-frankja@linux.ibm.com> References: <20231107142048.22422-1-frankja@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: H9oLxpY4-xwjhiUm-3mElocxIJvSBTV6 X-Proofpoint-GUID: P1Xk5hTVFQnruQgc7KpO_vu_PmCneWhb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_05,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 adultscore=0 impostorscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=676 phishscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311070118 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=frankja@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1699366964315100007 Content-Type: text/plain; charset="utf-8" Some architectures (s390x) need to cleanup after a failed dump to be able to continue to run the vm. Add a cleanup function pointer and call it if it's set. Signed-off-by: Janosch Frank --- dump/dump.c | 5 +++++ include/sysemu/dump-arch.h | 1 + 2 files changed, 6 insertions(+) diff --git a/dump/dump.c b/dump/dump.c index 1d38274925..5c4e405ad2 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -96,6 +96,10 @@ uint64_t cpu_to_dump64(DumpState *s, uint64_t val) =20 static int dump_cleanup(DumpState *s) { + if (s->dump_info.arch_cleanup_fn) { + s->dump_info.arch_cleanup_fn(s); + } + guest_phys_blocks_free(&s->guest_phys_blocks); memory_mapping_list_free(&s->list); close(s->fd); @@ -1709,6 +1713,7 @@ static void dump_state_prepare(DumpState *s) s->dump_info.arch_sections_add_fn =3D NULL; s->dump_info.arch_sections_write_hdr_fn =3D NULL; s->dump_info.arch_sections_write_fn =3D NULL; + s->dump_info.arch_cleanup_fn =3D NULL; } =20 bool qemu_system_dump_in_progress(void) diff --git a/include/sysemu/dump-arch.h b/include/sysemu/dump-arch.h index 59bbc9be38..743916e46c 100644 --- a/include/sysemu/dump-arch.h +++ b/include/sysemu/dump-arch.h @@ -24,6 +24,7 @@ typedef struct ArchDumpInfo { void (*arch_sections_add_fn)(DumpState *s); uint64_t (*arch_sections_write_hdr_fn)(DumpState *s, uint8_t *buff); int (*arch_sections_write_fn)(DumpState *s, uint8_t *buff); + void (*arch_cleanup_fn)(DumpState *s); } ArchDumpInfo; =20 struct GuestPhysBlockList; /* memory_mapping.h */ --=20 2.34.1 From nobody Wed Nov 27 09:50:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1699366953; cv=none; d=zohomail.com; s=zohoarc; b=CCPCJw6yjR1DoM5m6gwZeH+PCcJ0krZkCsNIxFqM30drenU3yJOtoUP7ifGKUqul16IzppOr8i+QsqhZoU/Su1lGXLcHD01PX08MAVGnOzOfIs2Z4m+HyJfPpKzlP9E2VjCwit498/EZse1+1BwKO74mmUzrxDxC2yoO70CIJX8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699366953; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LObvxQEWeax/0iuezMdYjyLPQkqRrr64HBuZvDf4PxU=; b=jVtqEYiyEZ0ZDpU3iCP/W4zAE9wqpEvS1QE+mczD2Ixs88immD6+4g81r4XnRmVAT4Ji8+Ei7DE/DE4hh6ns0JHgytsHbtD7I6xZXLLhak9xlFTIg06uGhfje/2m3NovP8rjIhiZys7r5cvxCsUn0opsalV3uHyd+cpOPSJ0KnU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699366953358728.280369498188; Tue, 7 Nov 2023 06:22:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0MxE-0000vN-3D; Tue, 07 Nov 2023 09:21:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0MxA-0000sr-K4; Tue, 07 Nov 2023 09:21:16 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0Mx7-00071D-JZ; Tue, 07 Nov 2023 09:21:16 -0500 Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7EAag1013532; Tue, 7 Nov 2023 14:21:11 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u7ps4gp7m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:10 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3A7EBGVH018848; Tue, 7 Nov 2023 14:21:10 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u7ps4gp70-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:10 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7D97Al025652; Tue, 7 Nov 2023 14:21:09 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3u619nh3vd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Nov 2023 14:21:09 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3A7EL7kH43123082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Nov 2023 14:21:07 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5928720040; Tue, 7 Nov 2023 14:21:07 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3E9B42004F; Tue, 7 Nov 2023 14:21:07 +0000 (GMT) Received: from a46lp67.. (unknown [9.152.108.100]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 7 Nov 2023 14:21:07 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=LObvxQEWeax/0iuezMdYjyLPQkqRrr64HBuZvDf4PxU=; b=WNBOE85xkvyXkI+gfX08bSUW/IvR5rmNG5EMirkAU0LL1jj0/nGjI3Gyy2W7y2Yx5+Qn H2C70fLBJOVQ2VuGEWOzPgf8QKs+nULPwHEth24xMoZXmtuzdqApVRHbtfB6wZ6sVcFe appSitqQOl97ksa19OgJWtNp61vhylp/jmr1aaRYJqCPN7c1TIbd1cMWf6n+QVTiNI7W ALLyq/Cg9rd/Hdt9uRIOlv48qOjkKpebqYZ4GxZAYMB9Quc6EthJ0foIP59oUg8lyCLI lV6zdN2JMUuwqFuIUhdNdAQA4SJ2LmVXlAXa4Fz7LN6AAOv/isN94CgxIG9GK7+bqtrv Vg== From: Janosch Frank To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, marcandre.lureau@redhat.com, thuth@redhat.com, imbrenda@linux.ibm.com Subject: [PATCH 4/4] target/s390x/arch_dump: Add arch cleanup function for PV dumps Date: Tue, 7 Nov 2023 14:20:48 +0000 Message-Id: <20231107142048.22422-5-frankja@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231107142048.22422-1-frankja@linux.ibm.com> References: <20231107142048.22422-1-frankja@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 9jx0cTenXqvFZxs_DTjmy3iS7AKnvEBt X-Proofpoint-ORIG-GUID: 1v6rBE2cHUiqodTgasB-vJH8Dm64RWoI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_05,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=999 adultscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 phishscore=0 impostorscore=0 mlxscore=0 clxscore=1015 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311070118 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=frankja@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1699366954153100007 Content-Type: text/plain; charset="utf-8" PV dumps block vcpu runs until dump end is reached. If there's an error between PV dump init and PV dump end the vm will never be able to run again. One example of such an error is insufficient disk space for the dump file. Let's add a cleanup function that tries to do a dump end. The dump completion data is discarded but there's no point in writing it to a file anyway if there's a possibility that other PV dump data is missing. Signed-off-by: Janosch Frank --- target/s390x/arch_dump.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c index bdb0bfa0e7..70146d7e84 100644 --- a/target/s390x/arch_dump.c +++ b/target/s390x/arch_dump.c @@ -433,6 +433,22 @@ static int arch_sections_write(DumpState *s, uint8_t *= buff) return 0; } =20 +static void arch_cleanup(DumpState *s) +{ + uint8_t *buff =3D g_malloc(kvm_s390_pv_dmp_get_size_completion_data()); + int rc; + + if (!pv_dump_initialized || !buff) { + return; + } + + rc =3D kvm_s390_dump_completion_data(buff); + if (!rc) { + pv_dump_initialized =3D false; + } + g_free(buff); +} + int cpu_get_dump_info(ArchDumpInfo *info, const struct GuestPhysBlockList *guest_phys_blocks) { @@ -448,6 +464,7 @@ int cpu_get_dump_info(ArchDumpInfo *info, info->arch_sections_add_fn =3D *arch_sections_add; info->arch_sections_write_hdr_fn =3D *arch_sections_write_hdr; info->arch_sections_write_fn =3D *arch_sections_write; + info->arch_cleanup_fn =3D *arch_cleanup; } return 0; } --=20 2.34.1