Zhimin Gu
cc55f7537d
x86, hibernate: Fix nosave_regions setup for hibernation
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 fix does not impact 64bit system because on 64bit max_low_pfn
is the same as max_pfn.
Signed-off-by: Zhimin Gu <kookoo.gu@intel.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-10-03 11:56:33 +02:00
..
2018-08-15 00:19:38 +02:00
2018-09-08 12:12:40 +02:00
2018-09-02 14:10:54 +02:00
2018-08-05 09:53:13 +02:00
2018-06-21 17:33:42 +02:00
2018-08-30 13:02:30 +02:00
2018-03-20 10:01:57 +01:00
2018-05-13 09:00:27 -07:00
2018-01-11 15:09:24 +01:00
2018-07-16 17:59:57 +02:00
2018-07-20 01:11:36 +02:00
2018-07-20 01:11:35 +02:00
2018-07-20 01:11:37 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-27 12:01:48 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-04-13 17:10:27 -07:00
2018-04-02 16:15:32 -07:00
2017-12-17 13:59:55 +01:00
2018-03-08 12:04:59 +01:00
2018-03-08 12:04:59 +01:00
2018-09-06 14:33:12 +02:00
2018-06-28 11:16:44 -07:00
2017-11-02 11:10:55 +01:00
2018-07-20 12:29:24 +10:00
2017-11-02 11:10:55 +01:00
2017-08-31 21:34:48 +02:00
2018-04-09 18:27:33 +02:00
2018-01-12 00:14:30 +01:00
2018-01-28 12:19:23 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-06-23 14:20:37 +02:00
2018-07-20 01:11:41 +02:00
2018-07-03 09:59:29 +02:00
2018-08-05 09:53:13 +02:00
2018-06-26 09:07:55 +02:00
2018-04-27 16:44:29 +02:00
2017-11-02 11:10:55 +01:00
2018-08-05 09:53:13 +02:00
2018-08-05 09:53:13 +02:00
2017-11-02 11:10:55 +01:00
2018-04-02 20:16:12 +02:00
2018-08-05 09:53:13 +02:00
2018-08-05 09:53:13 +02:00
2017-11-02 11:10:55 +01:00
2018-08-05 09:53:13 +02:00
2018-07-03 10:56:27 +02:00
2018-08-05 09:53:13 +02:00
2017-12-12 11:32:24 +01:00
2018-05-19 14:03:14 +02:00
2018-07-20 00:02:38 +02:00
2017-07-18 11:37:58 +02:00
2018-08-16 09:57:20 -07:00
2018-06-12 16:19:22 -07:00
2018-08-23 11:56:31 -07:00
2018-08-14 09:46:06 -07:00
2018-07-20 01:11:48 +02:00
2018-07-30 13:53:48 +02:00
2018-05-19 11:56:57 +02:00
2018-07-03 10:56:27 +02:00
2017-11-02 11:10:55 +01:00
2018-02-22 09:01:10 -08:00
2018-02-14 17:02:15 -08:00
2017-11-02 11:10:55 +01:00
2017-10-25 11:01:08 +02:00
2017-11-02 11:10:55 +01:00
2018-07-03 09:59:29 +02:00
2017-11-02 11:10:55 +01:00
2018-08-23 11:56:31 -07:00
2018-03-20 10:01:58 +01:00
2018-08-24 13:10:38 -07:00
2018-08-02 14:33:19 +02:00
2018-03-20 10:01:57 +01:00
2018-07-24 09:46:42 +02:00
2018-05-25 08:11:12 +02:00
2018-04-27 16:44:29 +02:00
2017-11-07 15:35:57 +01:00
2017-11-02 11:10:55 +01:00
2018-09-06 14:33:12 +02:00
2018-09-06 14:33:12 +02:00
2018-07-20 01:11:37 +02:00
2018-04-25 10:40:51 -05:00
2018-05-19 14:03:14 +02:00
2018-06-07 22:22:12 +02:00
2017-11-02 11:10:55 +01:00
2018-02-17 11:47:45 +01:00
2018-01-31 08:39:40 +01:00
2017-11-02 11:10:55 +01:00
2018-05-19 14:03:14 +02:00
2018-03-01 09:48:27 +01:00
2018-10-03 11:56:33 +02:00
2018-04-25 10:40:56 -05:00
2018-06-22 19:04:22 +02:00
2018-08-05 09:53:13 +02:00
2018-08-05 16:39:29 +02:00
2018-06-21 16:34:56 +02:00
2017-11-02 11:10:55 +01:00
2018-04-19 13:29:54 +02:00
2018-01-11 23:36:59 +01:00
2018-08-05 09:53:13 +02:00
2017-12-23 21:13:01 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-06-22 21:20:35 +02:00
2018-07-03 13:08:21 +02:00
2017-11-13 19:07:38 -08:00
2018-09-06 14:22:01 +02:00
2018-04-25 10:40:51 -05:00
2017-10-10 12:49:49 +02:00
2017-07-26 13:18:20 +02:00
2018-06-21 16:34:56 +02:00
2018-06-21 17:11:02 +02:00
2017-09-28 09:39:03 +02:00
2018-07-20 01:11:40 +02:00
2018-07-20 01:11:44 +02:00
2017-09-25 20:51:58 +02:00
2018-07-20 00:02:44 +02:00