LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Junichi Nomura <j-nomura@ce.jp.nec.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Baoquan He <bhe@redhat.com>,
	"kasong@redhat.com" <kasong@redhat.com>,
	"dyoung@redhat.com" <dyoung@redhat.com>,
	"fanc.fnst@cn.fujitsu.com" <fanc.fnst@cn.fujitsu.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>
Subject: Re: [PATCH v6 1/2] x86/kexec: Build identity mapping for EFI systab and ACPI tables
Date: Wed, 15 May 2019 08:58:43 +0200	[thread overview]
Message-ID: <20190515065843.GA24212@zn.tnic> (raw)
In-Reply-To: <20190515051717.GA13703@jeru.linux.bs1.fc.nec.co.jp>

On Wed, May 15, 2019 at 05:17:19AM +0000, Junichi Nomura wrote:
> Hi Kairui,
> 
> On 5/13/19 5:02 PM, Baoquan He wrote:
> > On 05/13/19 at 09:50am, Borislav Petkov wrote:
> >> On Mon, May 13, 2019 at 03:32:54PM +0800, Baoquan He wrote:
> >> So we're going to try it again this cycle and if there's no fallout, it
> >> will go upstream. If not, it will have to be fixed. The usual thing.
> >>
> >> And I don't care if Kairui's patch fixes this one problem - judging by
> >> the fragility of this whole thing, it should be hammered on one more
> >> cycle on as many boxes as possible to make sure there's no other SNAFUs.
> >>
> >> So go test it on more machines instead. I've pushed it here:
> >>
> >> https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=next-merge-window
> > 
> > Pingfan has got a machine to reproduce the kexec breakage issue, and
> > applying these two patches fix it. He planned to paste the test result.
> > I will ask him to try this branch if he has time, or I can get his
> > machine to test.
> > 
> > Junichi, also have a try on Boris's branch in NEC's test environment?
> 
> while the patch set works on most of the machines I'm testing around,
> I found kexec(1) fails to load kernel on a few machines if this patch
> is applied.  Those machines don't have IORES_DESC_ACPI_TABLES region
> and have ACPI tables in IORES_DESC_ACPI_NV_STORAGE region instead.

Why? What kind of machines are those?

Why are the ACPI tables in NV storage?

Looking at crash_setup_memmap_entries(), it already maps that type so I
guess this is needed.

+ Rafael and leaving in the rest for reference.

 
> So I think map_acpi_tables() should try to map both regions.  I tried
> following change in addition and it worked.
> 
> -- 
> Jun'ichi Nomura, NEC Corporation / NEC Solution Innovators, Ltd.
> 
> 
> diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
> index 3c77bdf..3837c4a 100644
> --- a/arch/x86/kernel/machine_kexec_64.c
> +++ b/arch/x86/kernel/machine_kexec_64.c
> @@ -56,12 +56,22 @@ static int mem_region_callback(struct resource *res, void *arg)
>  {
>  	unsigned long flags = IORESOURCE_MEM | IORESOURCE_BUSY;
>  	struct init_pgtable_data data;
> +	int ret;
>  
>  	data.info = info;
>  	data.level4p = level4p;
>  	flags = IORESOURCE_MEM | IORESOURCE_BUSY;
> -	return walk_iomem_res_desc(IORES_DESC_ACPI_TABLES, flags, 0, -1,
> -				   &data, mem_region_callback);
> +	ret = walk_iomem_res_desc(IORES_DESC_ACPI_TABLES, flags, 0, -1,
> +				  &data, mem_region_callback);
> +	if (ret && ret != -EINVAL)
> +		return ret;
> +
> +	ret = walk_iomem_res_desc(IORES_DESC_ACPI_NV_STORAGE, flags, 0, -1,
> +				  &data, mem_region_callback);
> +	if (ret && ret != -EINVAL)
> +		return ret;
> +
> +	return 0;
>  }
>  #else
>  static int map_acpi_tables(struct x86_mapping_info *info, pgd_t *level4p) { return 0; }

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

  reply	other threads:[~2019-05-15  6:58 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24  9:29 [PATCH v5 0/2] x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernel Baoquan He
2019-04-24  9:29 ` [PATCH v5 1/2] x86/kexec: Build identity mapping for EFI systab and ACPI tables Baoquan He
2019-04-27 16:11   ` Borislav Petkov
2019-04-28  5:41     ` Baoquan He
2019-04-29 12:50       ` Borislav Petkov
2019-04-29  0:23   ` [PATCH v6 " Baoquan He
2019-04-29 13:55     ` Borislav Petkov
2019-04-29 14:16       ` Baoquan He
2019-05-13  1:43       ` Baoquan He
2019-05-13  7:07         ` Borislav Petkov
2019-05-13  7:32           ` Baoquan He
2019-05-13  7:50             ` Borislav Petkov
2019-05-13  8:02               ` Baoquan He
2019-05-15  5:17                 ` Junichi Nomura
2019-05-15  6:58                   ` Borislav Petkov [this message]
2019-05-15  7:09                     ` Junichi Nomura
2019-05-21  9:02                       ` Kairui Song
2019-05-21 10:43                         ` Junichi Nomura
2019-05-21 18:09                         ` Borislav Petkov
2019-05-28  2:49                           ` Kairui Song
2019-06-06 19:20                             ` Borislav Petkov
2019-05-13  8:06               ` Baoquan He
2019-05-14  3:22                 ` Dave Young
2019-05-14  3:33                   ` Baoquan He
2019-05-21 21:53                     ` Dirk van der Merwe
2019-05-21 23:04                       ` Borislav Petkov
2019-05-14  8:48                   ` Dave Young
2019-05-14 11:18                     ` Kairui Song
2019-05-14 11:38                     ` Peter Zijlstra
2019-05-14 12:58                       ` Dave Young
2019-05-14 13:54                         ` Peter Zijlstra
2019-05-14 14:09                         ` Ingo Molnar
2019-05-15  1:08                           ` Dave Young
2019-05-15  6:43                             ` Junichi Nomura
2019-05-17 13:41                   ` Borislav Petkov
2019-05-17 13:50                     ` [PATCH] x86/boot: Call get_rsdp_addr() after console_init() Borislav Petkov
2019-05-21  9:28                       ` Baoquan He
2019-06-06 19:22     ` [tip:x86/boot] x86/kexec: Add the EFI system tables and ACPI tables to the ident map tip-bot for Kairui Song
2019-04-24  9:29 ` [PATCH v5 2/2] x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernels Baoquan He
2019-04-24  9:33   ` Baoquan He
2019-04-24  9:38 ` [PATCH v5 0/2] x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernel Borislav Petkov
2019-04-24 10:00   ` Baoquan He

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=20190515065843.GA24212@zn.tnic \
    --to=bp@alien8.de \
    --cc=bhe@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=fanc.fnst@cn.fujitsu.com \
    --cc=hpa@zytor.com \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=kasong@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --subject='Re: [PATCH v6 1/2] x86/kexec: Build identity mapping for EFI systab and ACPI tables' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).