OSDN Git Service

powerpc/fadump: save CPU reg data in vmcore when PHYP terminates LPAR
authorHari Bathini <hbathini@linux.ibm.com>
Mon, 4 Apr 2022 18:21:37 +0000 (23:51 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 26 Apr 2022 12:36:57 +0000 (22:36 +1000)
commit6584cec0a2255ab407d047d1b135fa0aae88d6c6
tree09e82d1823d084b5e10b68bde4be920729ce011e
parentb74196af372f7cb4902179009265fe63ac81824f
powerpc/fadump: save CPU reg data in vmcore when PHYP terminates LPAR

An LPAR can be terminated by the POWER Hypervisor (PHYP) for various
reasons. If FADump was configured when PHYP terminates the LPAR,
platform-assisted dump is initiated to save the kernel dump. But CPU
register data would not be processed/saved in the vmcore in such case
because CPU mask is set in crash_fadump() at the time of kernel crash
and it remains unset in this case with LPAR being terminated by PHYP
abruptly.

To get around the problem, initialize cpu_mask to cpu_possible_mask
so as to ensure all possible CPUs' register data is processed for the
vmcore generated on PHYP terminated LPAR. Also, rename the crash info
member variable from online_mask to cpu_mask as it doesn't necessarily
have to be online CPU mask always.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Reviewed-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220404182137.59231-1-hbathini@linux.ibm.com
arch/powerpc/include/asm/fadump-internal.h
arch/powerpc/kernel/fadump.c
arch/powerpc/platforms/pseries/rtas-fadump.c