From: Pavel Machek <pavel@ucw.cz>
To: Gu Zhimin <kookoo.gu@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Yu Chen <yu.c.chen@intel.com>,
x86@kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] x86, hibernate: Fix nosave_regions setup for hibernation
Date: Mon, 27 Aug 2018 11:48:11 +0200 [thread overview]
Message-ID: <20180827094811.GA31905@amd> (raw)
In-Reply-To: <73b18a8b87a465fc442366cccf5542307c4f1ae9.1535361949.git.kookoo.gu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 3916 bytes --]
On Mon 2018-08-27 17:42:05, Gu Zhimin wrote:
> From: Zhimin Gu <kookoo.gu@intel.com>
>
> On 32bit systems, nosave_regions(non RAM areas) located between
> max_low_pfn and max_pfn are not excluded from hibernation snapshot
> currently, which may result in a machine check exception when
> trying to access these unsafe regions during hibernation:
>
> [ 612.800453] Disabling lock debugging due to kernel taint
> [ 612.805786] mce: [Hardware Error]: CPU 0: Machine Check Exception: 5 Bank 6: fe00000000801136
> [ 612.814344] mce: [Hardware Error]: RIP !INEXACT! 60:<00000000d90be566> {swsusp_save+0x436/0x560}
> [ 612.823167] mce: [Hardware Error]: TSC 1f5939fe276 ADDR dd000000 MISC 30e0000086
> [ 612.830677] mce: [Hardware Error]: PROCESSOR 0:306c3 TIME 1529487426 SOCKET 0 APIC 0 microcode 24
> [ 612.839581] mce: [Hardware Error]: Run the above through 'mcelog --ascii'
> [ 612.846394] mce: [Hardware Error]: Machine check: Processor context corrupt
> [ 612.853380] Kernel panic - not syncing: Fatal machine check
> [ 612.858978] Kernel Offset: 0x18000000 from 0xc1000000 (relocation range: 0xc0000000-0xf7ffdfff)
>
> This is because on 32bit systems, pages above max_low_pfn are regarded
> as high memeory, and accessing unsafe pages might cause expected MCE.
> On the problematic 32bit system, there are reserved memory above low memory,
> which triggered the MCE:
>
> e820 memory mapping:
> [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
> [ 0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
> [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000d160cfff] usable
> [ 0.000000] BIOS-e820: [mem 0x00000000d160d000-0x00000000d1613fff] ACPI NVS
> [ 0.000000] BIOS-e820: [mem 0x00000000d1614000-0x00000000d1a44fff] usable
> [ 0.000000] BIOS-e820: [mem 0x00000000d1a45000-0x00000000d1ecffff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000d1ed0000-0x00000000d7eeafff] usable
> [ 0.000000] BIOS-e820: [mem 0x00000000d7eeb000-0x00000000d7ffffff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000d8000000-0x00000000d875ffff] usable
> [ 0.000000] BIOS-e820: [mem 0x00000000d8760000-0x00000000d87fffff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000d8800000-0x00000000d8fadfff] usable
> [ 0.000000] BIOS-e820: [mem 0x00000000d8fae000-0x00000000d8ffffff] ACPI data
> [ 0.000000] BIOS-e820: [mem 0x00000000d9000000-0x00000000da71bfff] usable
> [ 0.000000] BIOS-e820: [mem 0x00000000da71c000-0x00000000da7fffff] ACPI NVS
> [ 0.000000] BIOS-e820: [mem 0x00000000da800000-0x00000000dbb8bfff] usable
> [ 0.000000] BIOS-e820: [mem 0x00000000dbb8c000-0x00000000dbffffff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000dd000000-0x00000000df1fffff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed03fff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
> [ 0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
> [ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000041edfffff] usable
>
> Fix this problem by changing pfn limit from max_low_pfn to max_pfn.
> This issue should also exist on 64bits systems, if there are reserved
> regions above 4GB.
>
> Acked-by: Chen Yu <yu.c.chen@intel.com>
> Signed-off-by: Zhimin Gu <kookoo.gu@intel.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2018-08-27 9:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 9:41 [PATCH 0/3] Fixes hibernation bugs on x86-32 system Gu Zhimin
2018-08-27 9:42 ` [PATCH 1/3] x86, hibernate: Fix nosave_regions setup for hibernation Gu Zhimin
2018-08-27 9:48 ` Pavel Machek [this message]
2018-08-30 12:45 ` Thomas Gleixner
2018-09-01 15:38 ` Yu Chen
2018-08-27 9:42 ` [PATCH 2/3] x86, hibernate: Extract the common code of 64/32 bit system Gu Zhimin
2018-08-27 9:48 ` Pavel Machek
2018-08-30 12:59 ` Thomas Gleixner
2018-09-01 15:45 ` Yu Chen
2018-08-27 9:42 ` [PATCH 3/3] x86, hibernate: Backport several fixes from 64bits to 32bits hibernation Gu Zhimin
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=20180827094811.GA31905@amd \
--to=pavel@ucw.cz \
--cc=hpa@zytor.com \
--cc=kookoo.gu@intel.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.