Linux s390 Architecture development
 help / color / mirror / Atom feed
From: lijiang <lijiang@redhat.com>
To: Philipp Rudo <prudo@linux.ibm.com>
Cc: Dave Young <dyoung@redhat.com>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	Baoquan He <bhe@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: s390x: kdump kernel can not boot if I load kernel and initrd images via the kexec_file_load syscall.
Date: Wed, 13 May 2020 11:28:36 +0800	[thread overview]
Message-ID: <426212ae-7687-87df-2275-f26ffd16fc8e@redhat.com> (raw)
In-Reply-To: <20200512193956.15ae3f23@laptop2-ibm.local>

在 2020年05月13日 01:39, Philipp Rudo 写道:
> Hi Lianbo,
> 
> stupid me obviously never tested the kdump+initrd combination...
> 
> The patch below fixed the problem for me. Could please give it a try, too.
> 

Thank you for the patch, Philipp. Kdump kernel can boot on s390x machine with this patch.

> Thanks
> Philipp
> 
> ---
> 
> From 3f77088c9139582261d2e3ee6476324fc1ded401 Mon Sep 17 00:00:00 2001
> From: Philipp Rudo <prudo@linux.ibm.com>
> Date: Tue, 12 May 2020 19:25:14 +0200
> Subject: [PATCH] s390/kexec_file: fix initrd location for kdump kernel
> 
> initrd_start must not point at the location the initrd is loaded into
> the crashkernel memory but at the location it will be after the
> crashkernel memory is swapped with the memory at 0.
> 
> Fixes: ee337f5469fd ("s390/kexec_file: Add crash support to image loader")
> Reported-by: Lianbo Jiang <lijiang@redhat.com>
> Signed-off-by: Philipp Rudo <prudo@linux.ibm.com>
> ---
>  arch/s390/kernel/machine_kexec_file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c
> index 8415ae7d2a23..f9e4baa64b67 100644
> --- a/arch/s390/kernel/machine_kexec_file.c
> +++ b/arch/s390/kernel/machine_kexec_file.c
> @@ -151,7 +151,7 @@ static int kexec_file_add_initrd(struct kimage *image,
>  		buf.mem += crashk_res.start;
>  	buf.memsz = buf.bufsz;
>  
> -	data->parm->initrd_start = buf.mem;
> +	data->parm->initrd_start = data->memsz;

Good findings.

>  	data->parm->initrd_size = buf.memsz;
>  	data->memsz += buf.memsz;
>  
> 

Tested-by: Lianbo Jiang <lijiang@redhat.com>

Thanks.
Lianbo

  reply	other threads:[~2020-05-13  3:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4d7ff4bb-f09e-7aec-964f-f5cc2412e5b7@redhat.com>
     [not found] ` <20200511111558.2d3e3db3@laptop2-ibm.local>
     [not found]   ` <20200511170146.28eaafed@laptop2-ibm.local>
     [not found]     ` <19903f1e-b3ae-730e-8a02-ed30fb47e9ba@redhat.com>
     [not found]       ` <559a3c8f-9da9-a64d-aa78-434365c4b271@redhat.com>
2020-05-12 10:03         ` s390x: kdump kernel can not boot if I load kernel and initrd images via the kexec_file_load syscall lijiang
2020-05-12 17:39           ` Philipp Rudo
2020-05-13  3:28             ` lijiang [this message]
2020-05-13  8:27             ` Christian Borntraeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=426212ae-7687-87df-2275-f26ffd16fc8e@redhat.com \
    --to=lijiang@redhat.com \
    --cc=bhe@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=prudo@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox