diff options
author | Hari Bathini <hbathini@linux.ibm.com> | 2019-09-11 16:52:32 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-09-13 16:04:44 +0200 |
commit | 6071e8f9d5ac960f0d35495f070d4d0b7ae5fc76 (patch) | |
tree | de4f5b1c849b19b4b79fe0983364d8176088c355 /arch/powerpc | |
parent | powerpc/fadump: process the crashdump by exporting it as /proc/vmcore (diff) | |
download | linux-6071e8f9d5ac960f0d35495f070d4d0b7ae5fc76.tar.xz linux-6071e8f9d5ac960f0d35495f070d4d0b7ae5fc76.zip |
powerpc/fadump: Warn before processing partial crashdump
If all kernel boot memory regions are not registered for MPIPL before
system crashes, try processing the partial crashdump but warn the user
before proceeding.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/156821352793.5656.1734051341024721407.stgit@hbathini.in.ibm.com
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/powernv/opal-fadump.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-fadump.c b/arch/powerpc/platforms/powernv/opal-fadump.c index 5ace7c4d6bc1..533adae545d8 100644 --- a/arch/powerpc/platforms/powernv/opal-fadump.c +++ b/arch/powerpc/platforms/powernv/opal-fadump.c @@ -69,6 +69,30 @@ static void opal_fadump_get_config(struct fw_dump *fadump_conf, */ fadump_conf->reserve_dump_area_start = fdm->rgn[0].dest; + /* + * Rarely, but it can so happen that system crashes before all + * boot memory regions are registered for MPIPL. In such + * cases, warn that the vmcore may not be accurate and proceed + * anyway as that is the best bet considering free pages, cache + * pages, user pages, etc are usually filtered out. + * + * Hope the memory that could not be preserved only has pages + * that are usually filtered out while saving the vmcore. + */ + if (fdm->region_cnt > fdm->registered_regions) { + pr_warn("Not all memory regions were saved!!!\n"); + pr_warn(" Unsaved memory regions:\n"); + i = fdm->registered_regions; + while (i < fdm->region_cnt) { + pr_warn("\t[%03d] base: 0x%llx, size: 0x%llx\n", + i, fdm->rgn[i].src, fdm->rgn[i].size); + i++; + } + + pr_warn("If the unsaved regions only contain pages that are filtered out (eg. free/user pages), the vmcore should still be usable.\n"); + pr_warn("WARNING: If the unsaved regions contain kernel pages, the vmcore will be corrupted.\n"); + } + opal_fadump_update_config(fadump_conf, fdm); } |