Skip to content

crashdump: Add print_crashkernel_region_size() function

Eric DeVolder kexec 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest12 patches 9 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12crashdump/x86: Add print_crashkernel_region_size() functionkexec/arch/i386/crashdump-x86.c+12 -01 reply
2/12crashdump/arm: Add print_crashkernel_region_size() functionkexec/arch/arm/crashdump-arm.c+10 -00 replies
3/12crashdump/cris: Add print_crashkernel_region_size() functionkexec/arch/cris/kexec-cris.c+5 -01 reply
4/12crashdump/ia64: Add print_crashkernel_region_size() functionkexec/arch/ia64/crashdump-ia64.c+10 -00 replies
5/12crashdump/m68k: Add print_crashkernel_region_size() functionkexec/arch/m68k/kexec-m68k.c+5 -01 reply
6/12crashdump/mips: Add print_crashkernel_region_size() functionkexec/arch/mips/crashdump-mips.c+9 -00 replies
7/12crashdump/ppc: Add print_crashkernel_region_size() functionkexec/arch/ppc/crashdump-powerpc.c kexec/arch/ppc/kexec-ppc.c kexec/arch/ppc/kexec-ppc.h+51 -71 reply
8/12crashdump/ppc64: Add print_crashkernel_region_size() functionkexec/arch/ppc64/crashdump-ppc64.c kexec/arch/ppc64/kexec-ppc64.c kexec/arch/ppc64/kexec-ppc64.h+52 -62 replies
9/12crashdump/s390: Add print_crashkernel_region_size() functionkexec/arch/s390/kexec-s390.c+10 -00 replies
10/12crashdump/sh: Add print_crashkernel_region_size() functionkexec/arch/sh/crashdump-sh.c+10 -00 replies
11/12kexec: Add option to get crash kernel region sizekexec/kexec.h+4 -10 replies
12/12kexec: Add option to get crash kernel region sizekexec/kexec.8 kexec/kexec.c+7 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/12] crashdump: Add print_crashkernel_region_size() function

Crash kernel region size is available via sysfs on Linux running on bare metal. However, this does not work when Linux runs as Xen dom0. In this case Xen crash kernel region size should be established using __HYPERVISOR_kexec_op hypercall (Linux kernel kexec functionality does not make a lot of sense in Xen dom0). Sadly hypercalls are not easily accessible using shell scripts or something like that. Potentially we can check "xl dmesg" output for crashkernel option but this is not nice. So, let's add this functionality, for Linux running on bare metal and as Xen dom0, to kexec-tools. This way kdump scripts may establish crash kernel region size in one way regardless of platform. All burden of platform detection lies on kexec-tools.

Figure (and unit) displayed by this new kexec-tools functionality is the same as one taken from /sys/kernel/kexec_crash_size.

This patch just adds print_crashkernel_region_size() function, which prints crash kernel region size, for x86 arch. Next patches will add same named function for other archs supported by kexec-tools. Last patch of this series will export this functionality to the userspace via separate kexec utility option.

---
v0: Interal version.
v1: Posted to kexec-tools mailing list
v2: Incorporated feedback:
- utilize the is_crashkernel_mem_reserved() function common in all archs
- for ppc and ppc64, utilize device-tree values to print size
- for unsupported architectures, print appropriate message

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec