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/[email protected]/
--
Changelog:
v3: Removing the fake entries population. Kernel handles this case by default.

v2: 
https://lore.kernel.org/qemu-devel/[email protected]/
--
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


Reply via email to