[PATCH v3 0/1] hw/ppc/fadump: Fix CPU_STATE_DATA region reported size

Shivang Upadhyay posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260825090932.1748581-1-shivangu@linux.ibm.com
Maintainers: Aditya Gupta <adityag@linux.ibm.com>, Sourabh Jain <sourabhjain@linux.ibm.com>, Hari Bathini <hbathini@linux.ibm.com>, Shivang Upadhyay <shivangu@linux.ibm.com>, Nicholas Piggin <npiggin@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Amit Machhiwal <amachhiw@linux.ibm.com>
hw/ppc/spapr_fadump.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
[PATCH v3 0/1] hw/ppc/fadump: Fix CPU_STATE_DATA region reported size
Posted by Shivang Upadhyay 1 month ago
Fadump is unable to collect dump, when qemu is started with maxcpus option.
This bug was also disucssed on linux side here [1]. But We could not find a way
to mitigate all the ambiguity around the fadump region error reporting. It is
assumed that if allocated size and dumped size dont match, then data copy must
have failed. So Replicating the Phyp's behaviour here.

The following behaviour is observed with Phyp.

 1. Registers entries are only filled for online CPUs.
 2. regNum is set as number of currently online CPUs.
 3. CPU_STATE_DATA's bytes_dumped always equals source_len.

Qemu already have, same behaviour for 1 and 2. Fixing the 3rd behaviour in this patch.

[1] https://lore.kernel.org/all/20260714173010.615682-1-shivangu@linux.ibm.com/
--
Changelog:
v3: Removing the fake entries population. Kernel handles this case by default.

v2: https://lore.kernel.org/qemu-devel/20260429065127.366813-1-shivangu@linux.ibm.com/
--
Shivang Upadhyay (1):
  hw/ppc/fadump: report CPU_STATE_DATA dumped_bytes as source_len

 hw/ppc/spapr_fadump.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

-- 
2.54.0