From nobody Wed Apr 8 04:33:18 2026 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=1773155782; cv=none; d=zohomail.com; s=zohoarc; b=mGCriatOxlm527gRrjSChupLXUY/K/+NTDrv4yIergqdYxq2dAwshvk224RPbsHsVKCUL/95Cexjc319w4xFPtny6Do06ry70B0WeK4sqqIGJALBApGV83F20z2qIDlic3JNT1F9WxXUZPkHdQ2/ssYdjGzZfCuR3WicGc+6FkM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773155782; 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=oxnCuJ415kJrm9x0e7Lh0j6E+LRZnIIw3ZKt6MD94sY=; b=mPeEpwSvaLgsV5GGuGupte71H7zd7tEciz6A+GzuL/CkL6P55aD279o2w9LyBEX9RCY7WGApaJdq1McfEvO8f6DKClAO3P1qa3VFjUVusbkMwmNN35zwkr7dzTXBJ8nRjYJThNPgbUa/WKQIZT0rMq7ESGWnm/PDX0GOPlWzaqw= 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 1773155782779529.6802316637386; Tue, 10 Mar 2026 08:16:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vzynk-0007MM-50; Tue, 10 Mar 2026 11:15:16 -0400 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 1vzynT-0006rP-JD for qemu-devel@nongnu.org; Tue, 10 Mar 2026 11:15:04 -0400 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 1vzynQ-0000GI-KG for qemu-devel@nongnu.org; Tue, 10 Mar 2026 11:14:59 -0400 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62A1Ew0s076304 for ; Tue, 10 Mar 2026 15:14:55 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 4crcvrb6fq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 10 Mar 2026 15:14:55 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 62ABlH9R015629 for ; Tue, 10 Mar 2026 15:14:54 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4crybn9mvu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 10 Mar 2026 15:14:54 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 62AFEpZH44040464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Mar 2026 15:14:51 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E7A5F2004D; Tue, 10 Mar 2026 15:14:50 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C944C2004B; Tue, 10 Mar 2026 15:14:49 +0000 (GMT) Received: from Mac.com (unknown [9.39.23.49]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 10 Mar 2026 15:14:49 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=oxnCuJ415kJrm9x0e 7Lh0j6E+LRZnIIw3ZKt6MD94sY=; b=Ey6Os1B8vuNQBOxIz1v+qoG5d31abjjDc zMhskVWZosUk051vBKfdsaDOGEX9i5XB96OcW+HLioh/KBA1rBPwnfbJtIPMgbv1 bQ0wLvo5ddiu1GcwOtkRSoXaMGVnf7HU2nPAX3AHMKasq/mH1KrJN4jMiWcdHmkH MMBOvMKJLKvW1F0eMmnD9mq59GBm72dzBZpPbaEILGwY/73/N3h7/baIFDoZUwQI OiEBm/puOApj9drrjwE+06QgKmHS40GM8c/tufPYGtRSZsbZenP+lX86ra+BPP4M lnBz9bEWb4OVqqnjyN92m5KZVOqbiCIg+Y9pJut/lFjVCkVc2IO4w== From: Harsh Prateek Bora To: qemu-devel@nongnu.org Cc: Aditya Gupta , Hari Bathini , Shivang Upadhyay , Sourabh Jain Subject: [PULL 06/10] pnv/mpipl: Set thread entry size to be allocated by firmware Date: Tue, 10 Mar 2026 20:44:26 +0530 Message-ID: <20260310151432.92531-7-harshpb@linux.ibm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260310151432.92531-1-harshpb@linux.ibm.com> References: <20260310151432.92531-1-harshpb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzEwMDEzMSBTYWx0ZWRfX83LnxTT/DJN5 4PRn2hBXEXWsAPW0Ke3Ro3gTkA4znzSS5R9lHrbJUeraFJDSNz9Y+2+yfPqB9MhixdDwqcHxWK1 VafMSvdSvfnMELhtbpv+ZJn/JCXIo1f1cbZGTN7YJQv2ooo1Y46a8jlNlbG7050JhxodJ42TjCk VyZnNmFjIQsj1JhIYiZxS1mzVWfw0AtsK+fyALNaG3m9d8AX/jBokeGEawv98c5xlGhkVqX1R2O xN46RZWzyV7SnDEG3fccMZYgxlhZnVqPUn5Gl7RZsvvRrOm+xi/yHsYdYQg+HnHhRi0MS0FdruH oBTtEcQBa0GqfO15fsqTh7fE8hq2EyIkk967gXmtMjcTEqsGoJmd+nx2PpzbGek6P6YJhsLpyUs Jw7ymIQQQO5Psc8BipujIyBU2yCSEq87dP1xf7c14HMRjhOqEpDU/1Ms2bDOvOC2qvpGd0rMuWQ 7g/yAJVZ3ckmZvJq8aA== X-Proofpoint-GUID: 6IXoKoXWOOi0ou5dh_dvDn99q7Il8Aur X-Proofpoint-ORIG-GUID: 6IXoKoXWOOi0ou5dh_dvDn99q7Il8Aur X-Authority-Analysis: v=2.4 cv=QoFTHFyd c=1 sm=1 tr=0 ts=69b0356f cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=Yq5XynenixoA:10 a=f7IdgyKtn90A:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=RzCfie-kr_QcCd8fBx8p:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=K3nGc4jhFjju3E8dwHwA:9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-10_03,2026-03-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 malwarescore=0 suspectscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603100131 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=harshpb@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -9 X-Spam_score: -1.0 X-Spam_bar: - X-Spam_report: (-1.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1773155784748154100 Content-Type: text/plain; charset="utf-8" From: Aditya Gupta Set the "Thread Register State Entry Size" that is required by firmware (OPAL), to know size of memory to allocate to capture CPU state, in the event of a crash Reviewed-by: Hari Bathini Signed-off-by: Aditya Gupta Tested-by: Shivang Upadhyay Reviewed-by: Sourabh Jain Link: https://lore.kernel.org/qemu-devel/20260310124619.3909045-7-adityag@l= inux.ibm.com Signed-off-by: Harsh Prateek Bora --- hw/ppc/pnv.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 1513575b8f..3038b1626c 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -781,6 +781,30 @@ static void pnv_reset(MachineState *machine, ResetType= type) _FDT((fdt_pack(fdt))); } =20 + if (!pnv->mpipl_state.is_next_boot_mpipl) { + /* + * Set the "Thread Register State Entry Size", so that firmware can + * allocate enough memory to capture CPU state in the event of a + * crash + */ + + MpiplProcDumpArea proc_area; + + proc_area.version =3D PROC_DUMP_AREA_VERSION_P9; + proc_area.thread_size =3D cpu_to_be32(sizeof(MpiplPreservedCPUStat= e)); + + /* These are to be allocated & assigned by the firmware */ + proc_area.alloc_addr =3D 0; + proc_area.alloc_size =3D 0; + + /* These get assigned after crash, when QEMU preserves the registe= rs */ + proc_area.dest_addr =3D 0; + proc_area.act_size =3D 0; + + cpu_physical_memory_write(PROC_DUMP_AREA_OFF, &proc_area, + sizeof(proc_area)); + } + cpu_physical_memory_write(PNV_FDT_ADDR, fdt, fdt_totalsize(fdt)); =20 /* Update machine->fdt with latest fdt */ --=20 2.52.0