From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-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 smtp.subspace.kernel.org (Postfix) with ESMTPS id 183233537F5 for ; Wed, 22 Jul 2026 09:11:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784711515; cv=none; b=cjv9jvcEMF//zOOE10tDYiDGf0xrBMMA0/E8l3ffDx48JBUvzANLDOu7/tLwjZtojQRxHs0lSecVInFkEMlCamEzcSugTd+yvmH+EUJw1FEURAkszV6Ti112st/0smtGc5eaZH4wN0zg4Cy+nA9yhDlFjhGR5KeKfaWzToFHKd0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784711515; c=relaxed/simple; bh=ErpyCp0lhAIVLrbbsePmwK+5kkAUdy2IOzR5ghV1jYE=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=I2ic2ookyniK3XHs+sFG5rkycwmkTyBrxQlhx7vwj1zoHMEvUMHOfDH91bGD6KkXEtaVhXoYeiBvFK78m0qGWWp1GvAzetPK9ruj3D1r4oapsKlZ6aJSmzfaTlvzu63g4v/9Bd10dHJxludwKqkhXH9V2Sa2ZAAhqU/f9trGTXw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=MdTkrZFe; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="MdTkrZFe" 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 66M5CFq93153884; Wed, 22 Jul 2026 09:11:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=FA+/rx UijKPrvOIWo26LQdgmHtPKosAfeWskdjkpZqo=; b=MdTkrZFeODCCsCIDNLQ857 xkMDcdOnmN3X6Mn9QacMOT+9U0gmJ9FIDftdIGWIXkOltxAqbi/xpB3H6DaVk/vs yzANWrGtFtoe6H13brPb8hO9KOvB/HCj/wPeXwcxs4mGjkoo0TGdG+bVsmfCSJtw vHMDhFXY9IkEjVBZ6NH/bkLrvcdtjNSX/Ro0UpFPbxqc/UIVfiXU6YNekDTS8DIZ q8UQslLrowmzzmLYIf39Zl0C13EfxZU9nQ8B9kd3DFZAGoGhN6MGg7rXBjYva2RO BMgKtHSA5+XjfqwDojydI/r3B9a++41pQr45gRYX57mHqqgEBIzI/ywXiK6GwqDQ == Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4fg7ah8u9q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jul 2026 09:11:31 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 66M952N7006043; Wed, 22 Jul 2026 09:11:30 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4fgpgye9yk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jul 2026 09:11:30 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 66M9BQkE50856356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Jul 2026 09:11:26 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8AE7F2011B; Wed, 22 Jul 2026 09:11:26 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 96D5120116; Wed, 22 Jul 2026 09:11:23 +0000 (GMT) Received: from shivang.upadyay (unknown [9.123.12.247]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 22 Jul 2026 09:11:23 +0000 (GMT) Message-ID: Subject: Re: [PATCH] ppc/fadump: collect dump if the collected size is lesser than reserved From: Shivang Upadhyay To: Sourabh Jain , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org, adri.vero.dev@gmail.com, adityag@linux.ibm.com, anushree.mathur@linux.vnet.ibm.com Date: Wed, 22 Jul 2026 14:41:22 +0530 In-Reply-To: <446c84c2-8639-4ecb-8a46-1e203a166e46@linux.ibm.com> References: <20260714173010.615682-1-shivangu@linux.ibm.com> <446c84c2-8639-4ecb-8a46-1e203a166e46@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-ORIG-GUID: QvUS0EuO8yGxrysIgsZQhtdex877iRZR X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIyMDA4MSBTYWx0ZWRfX+dUMXNs19/zR SmmDWnHqqooEGht4aoLP1IpKHbzTblWsIemaayAR6xcR0fRl2ZwspBv8jfkt465q3MeGD4DwAG+ T/DW79lvxHFW5x2PaLDYn/Cg+rJb+m+Wp26ickyMTevw6oeaAANK+x0LposTwUxpE/EhrFtwRMn zsmCM0gCZrsvJ2o7ne4TjYSj6OXuCqqHeiQ4UaijxJf+tI6FksQ5OVmAFiY9LqD6jlC2mWR+yzD xMdbLTU4KUQXIyktqpmoEt7jkSCzf7iBZUecB+Yg/YKQoYobMhA1hL5PVvF0REEt1THasrLWA5J +uqdhYI/8zZI3Qy7zVddAxYhz2mpcQ1bvh6d3THI/qUBVAO7LLLpJoC2RAYnQGLLdqekb7HHPIb Un0Q/0PJv8x46chlJjZec95/4kNXQWx8EixNMu8ByGrfHz4IEwGv/IQz7SFYxybFb0XpvFRXkH3 KcseoHXz0lfXqKZLhvg== X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIyMDA4MSBTYWx0ZWRfX9emwXLSrzACk qjGHUZHW8rRrZM/SfqZa5McW1A0cb7gq/dEa3ZXGNPvBau7W9lM4ZM9lEpvbhw4uDu+2TbT4py8 +EVtHz930uveI7L75YswAN1WOX9zXZw= X-Proofpoint-GUID: wH7Ju42W9jRrKcxCDuuz2Ys3qGyXm7RN X-Authority-Analysis: v=2.4 cv=SM5ykuvH c=1 sm=1 tr=0 ts=6a608943 cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=RzCfie-kr_QcCd8fBx8p:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=8Fid4Lw7F1ng2p3Qk_oA:9 a=QEXdDO2ut3YA:10 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-22_02,2026-07-21_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 suspectscore=0 adultscore=0 spamscore=0 malwarescore=0 priorityscore=1501 phishscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607220081 On Sun, 2026-07-19 at 12:39 +0530, Sourabh Jain wrote: > Could you please reword the commit title to make it a bit clearer? >=20 >=20 > On 14/07/26 23:00, Shivang Upadhyay wrote: > > When a machine is subjected to CPUs add/remove, using dlpar > > operations, the number of collected CPU_NOTES can change. > > As per PAPR, collected dump size should not be more than > > allocated size. Reflecting the same in source. >=20 > Can you add more details about the problem you are trying to solve > with this patch and how. >=20 > Adding the error message and scenario would be really helpful in > understanding the problem. >=20 Hi Sourabh, When a qemu ppc machine is booted with fadump=3Don and `- smp=3Dx,maxcpus=3Dy`, on the panic kernel, /proc/vmcore is not generated because dump_bytes and source_len does'nt match for CPU_STATE_DATA region in fadump, then we just give up on parsing rest of the data. > Can you add Closes tag if it is reported upstream and if possible > fixes=20 > tag too. >=20 > > Signed-off-by: Shivang Upadhyay > > --- > > =C2=A0 arch/powerpc/platforms/pseries/rtas-fadump.c | 3 ++- > > =C2=A0 1 file changed, 2 insertions(+), 1 deletion(-) > >=20 > > diff --git a/arch/powerpc/platforms/pseries/rtas-fadump.c > > b/arch/powerpc/platforms/pseries/rtas-fadump.c > > index 3bb4ac2ab6cc..19a5adaf326b 100644 > > --- a/arch/powerpc/platforms/pseries/rtas-fadump.c > > +++ b/arch/powerpc/platforms/pseries/rtas-fadump.c > > @@ -469,7 +469,8 @@ static int __init rtas_fadump_process(struct > > fw_dump *fadump_conf) > > =C2=A0=C2=A0 pr_err("Dump taken by platform is > > not valid (%d)\n", i); > > =C2=A0=C2=A0 rc =3D -EINVAL; > > =C2=A0=C2=A0 } > > - if (fdm_active->rgn[i].bytes_dumped !=3D > > fdm_active->rgn[i].source_len) { > > + if (be64_to_cpu(fdm_active- > > >rgn[i].bytes_dumped) > > + =C2=A0=C2=A0=C2=A0 > be64_to_cpu(fdm_active- > > >rgn[i].source_len)) { >=20 > Can you please share your observations about `bytes_dump` for both > QEMU=20 > and a > real system (LPAR) where the number of online CPUs is not equal to > the=20 > maximum I have the following observation. I booted LPAR with 8 cpus. After crashing it I saw that fadump CPU_STATE_DATA has notes for total 16 cpus, and only top 8 notes have valid entries. when trying with 16, I see all NOTES have entried filled. I previously proposed this fake entries fix in qemu [1]. But that is not compliant with PAPR, which states that cpu notes should be collected for current_cpus only.=20 As per current states of things, reservation is always done for maxcpus, (LPAR and QEMU both), NOTES collections is done for current cpus on QEMU, and maxcpus on LPARs. My proposal here is that we make the check for bytes_dumped and source_len, less restrictive to let QEMU also generate /proc/vmcore, when current_cpus !=3D maxcpus. Regards=20 ~Shivang. [1] https://lore.kernel.org/qemu-devel/20260520092857.1079193-1-shivangu@linux.= ibm.com/