From: rruigrok@codeaurora.org (Richard Ruigrok)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3.1 0/4] arm64: kexec, kdump: fix boot failures on acpi-only system
Date: Thu, 12 Jul 2018 15:47:10 -0600 [thread overview]
Message-ID: <a27fc15c-89ea-8e01-b39c-a5bae6326439@codeaurora.org> (raw)
In-Reply-To: <20180709234229.20181-1-takahiro.akashi@linaro.org>
Hi Akashi,
On 7/9/2018 5:42 PM, AKASHI Takahiro wrote:
> This patch series is a set of bug fixes to address kexec/kdump
> failures which are sometimes observed on ACPI-only system and reported
> in LAK-ML before.
>
> In short, the phenomena are:
> 1. kexec'ed kernel can fail to boot because some ACPI table is corrupted
> by a new kernel (or other data) being loaded into System RAM. Currently
> kexec may possibly allocate space ignoring such "reserved" regions.
> We will see no messages after "Bye!"
>
> 2. crash dump (kdump) kernel can fail to boot and get into panic due to
> an alignment fault when accessing ACPI tables. This can happen because
> those tables are not always properly aligned while they are mapped
> non-cacheable (ioremap'ed) as they are not recognized as part of System
> RAM under the current implementation.
>
> After discussing several possibilities to address those issues,
> the agreed approach, in my understanding, is
> * to add resource entries for every "reserved", i.e. memblock_reserve(),
> regions to /proc/iomem.
> (NOMAP regions, also marked as "reserved," remains at top-level for
> backward compatibility. User-space can tell the difference between
> reserved-system-ram and reserved-address-space.)
> * For case (1), user space (kexec-tools) should rule out such regions
> in searching for free space for loaded data.
> * For case (2), the kernel should access ACPI tables by mapping
> them with appropriate memory attributes described in UEFI memory map.
> (This means that it doesn't require any changes in /proc/iomem, and
> hence user space.)
>
> Please find past discussions about /proc/iomem in [1].
> --- more words from James ---
> Our attempts to fix this just in the kernel reached a dead end, because Kdump
> needs to include reserved-system-ram, whereas kexec has to avoid it. User-space
> needs to be able to tell reserved-system-ram and reserved-address-space apart.
> Hence we need to expose that information, and pick it up in user-space.
>
> Patched-kernel and unpatch-user-space will work the same way it does today, as
> the additional reserved regions are ignored by user-space.
>
> Unpatched-kernel and patched-user-space will also work the same way it does
> today as the additional reserved regions are missing.
> --->8---
>
> Patch#1 addresses kexec case, for which you are also required to update
> user space. See necessary patches in [2]. If you want to review Patch#1,
> please also take a look at and review [2].
>
> Patch#2, #3 and #4 address the kdump case above.
>
>
> Changes in v3.1 (2018, July 10, 2018)
> * add Ard's patch[4] to this patch set
>
> Changes in v3 (2018, July 9, 2018)
> * drop the v2's patch#3, preferring [4]
>
> Changes in v2 (2018, June 19, 2018)
> * re-organise v1's patch#2 and #3 into v2's #2, #3 and #4
> not to break bisect
>
> [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-March/565980.html
> [2] https://git.linaro.org/people/takahiro.akashi/kexec-tools.git arm64/resv_mem
> [3] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-April/573655.html
> [4] https://marc.info/?l=linux-efi&m=152930773507524&w=2
>
> AKASHI Takahiro (2):
> efi/arm: map UEFI memory map even w/o runtime services enabled
> arm64: acpi: fix alignment fault in accessing ACPI
>
> Ard Biesheuvel (1):
> efi/arm: preserve early mapping of UEFI memory map longer for BGRT
>
> James Morse (1):
> arm64: export memblock_reserve()d regions via /proc/iomem
>
> arch/arm64/include/asm/acpi.h | 23 ++++++++++++------
> arch/arm64/kernel/acpi.c | 11 +++------
> arch/arm64/kernel/setup.c | 38 ++++++++++++++++++++++++++++++
> drivers/firmware/efi/arm-init.c | 1 -
> drivers/firmware/efi/arm-runtime.c | 16 +++++++------
> 5 files changed, 66 insertions(+), 23 deletions(-)
>
Please add my tested-by <rruigrok@codeaurora.org>
Tested this patch series on top of v4.17 on Centriq ARM64 system with the kexec-tool as specified : https://git.linaro.org/people/takahiro.akashi/kexec-tools.git? branch arm64/resv_mem
Prior to this patch set and Kexec tool update, we were seeing the ESRT region being over-written, it showed as a mangled region in a kexec'ed kernel.
- ex: [??? 0.000000] esrt: Unsupported ESRT version 5681331550117508106.
With this patchset and tool upadate, the ESRT region appears correct
[??? 0.000000] esrt: Reserving ESRT space from 0x000000000b6c8d18 to 0x000000000b6c8df0.
Thanks for fixing this!
Richard
--
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
prev parent reply other threads:[~2018-07-12 21:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 23:42 [PATCH v3.1 0/4] arm64: kexec, kdump: fix boot failures on acpi-only system AKASHI Takahiro
2018-07-09 23:42 ` [PATCH v3.1 1/4] arm64: export memblock_reserve()d regions via /proc/iomem AKASHI Takahiro
2018-07-09 23:42 ` [PATCH v3.1 2/4] efi/arm: preserve early mapping of UEFI memory map longer for BGRT AKASHI Takahiro
2018-07-10 17:57 ` James Morse
2018-07-10 18:39 ` Ard Biesheuvel
2018-07-12 13:32 ` Will Deacon
2018-07-12 14:14 ` Ard Biesheuvel
2018-07-09 23:42 ` [PATCH v3.1 3/4] efi/arm: map UEFI memory map even w/o runtime services enabled AKASHI Takahiro
2018-07-09 23:42 ` [PATCH v3.1 4/4] arm64: acpi: fix alignment fault in accessing ACPI AKASHI Takahiro
2018-07-12 16:49 ` [PATCH v3.1 0/4] arm64: kexec,kdump: fix boot failures on acpi-only system Will Deacon
2018-07-13 0:34 ` AKASHI Takahiro
2018-07-13 5:49 ` Ard Biesheuvel
2018-07-17 5:12 ` AKASHI Takahiro
2018-07-23 13:35 ` Will Deacon
2018-07-24 5:19 ` Bhupesh Sharma
2018-07-12 21:47 ` Richard Ruigrok [this message]
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=a27fc15c-89ea-8e01-b39c-a5bae6326439@codeaurora.org \
--to=rruigrok@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).