[Makedumpfile PATCH] book3s/ppc64: Lower the max real address to 53 bits for kernels >= v4.11
Dave Young
dyoung at redhat.com
Sun Sep 10 18:35:22 PDT 2017
Cc more people.
On 09/08/17 at 10:10am, Bhupesh Sharma wrote:
> Kernel commit 2f18d533757da3899f4bedab0b2c051b080079dc lowered the
> max real address on ppc64 to 53 bits.
>
> Make similar changes in makedumpfile (on basis of the underlying kernel
> version), without which the makedumpfile will fail to create a dumpfile
> and instead throw a SEGV fault as shown below on kernels >= v4.11:
>
> # makedumpfile --split -d 31 -x vmlinux vmcore dumpfile_{1,2,3} 2>&1
>
> The kernel version is not supported.
> The makedumpfile operation may be incomplete.
> [ 1196.252094] makedumpfile[2367]: unhandled signal 11 at
> 00000100f7011ca8 nip 000000001001eecc lr 000000001001f3c0 code 30001
> Segmentation fault
>
> Signed-off-by: Bhupesh Sharma <bhsharma at redhat.com>
> ---
> makedumpfile.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/makedumpfile.h b/makedumpfile.h
> index 7d81bbcf2234..142753d84e8d 100644
> --- a/makedumpfile.h
> +++ b/makedumpfile.h
> @@ -684,8 +684,9 @@ unsigned long get_kvbase_arm64(void);
> #define PMD_MASKED_BITS_64K_4_6 0xc0000000000000ffUL
>
> #define PTE_RPN_MASK_DEFAULT 0xffffffffffffffffUL
> -#define PTE_RPN_SIZE_L4_4_6 (info->page_size == 65536 ? 41 : 45)
> -#define PTE_RPN_MASK_L4_4_6 (((1UL << PTE_RPN_SIZE_L4_4_6) - 1) << info->page_shift)
> +#define PAGE_PA_MAX_L4_4_6 (info->kernel_version >= KERNEL_VERSION(4,11,0) ? 53 : 57)
> +#define PTE_RPN_MASK_L4_4_6 \
> + (((1UL << PAGE_PA_MAX_L4_4_6) - 1) & ~((1UL << info->page_shift) - 1))
> #define PTE_RPN_SHIFT_L4_4_6 info->page_shift
>
> #define PGD_MASKED_BITS_4_7 0xc0000000000000ffUL
> --
> 2.7.4
>
More information about the kexec
mailing list