OSDN Git Service

x86, suspend: Handle CPUs which fail to #GP on RDMSR
authorH. Peter Anvin <hpa@linux.intel.com>
Fri, 12 Jul 2013 23:48:12 +0000 (16:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 08:50:53 +0000 (16:50 +0800)
commit6d7d28443969512be95873d2fb155f4be9261ca5
treed158ae61ac6f8e5b18ea0d9da8c16e3353df9fb1
parent07221c8c2109ae56d9f83cd0644498069ed7cfed
x86, suspend: Handle CPUs which fail to #GP on RDMSR

commit 5ff560fd48d5b3d82fa0c3aff625c9da1a301911 upstream.

There are CPUs which have errata causing RDMSR of a nonexistent MSR to
not fault.  We would then try to WRMSR to restore the value of that
MSR, causing a crash.  Specifically, some Pentium M variants would
have this problem trying to save and restore the non-existent EFER,
causing a crash on resume.

Work around this by making sure we can write back the result at
suspend time.

Huge thanks to Christian Sünkenberg for finding the offending erratum
that finally deciphered the mystery.

Reported-and-tested-by: Johan Heinrich <onny@project-insanity.org>
Debugged-by: Christian Sünkenberg <christian.suenkenberg@student.kit.edu>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Link: http://lkml.kernel.org/r/51DDC972.3010005@student.kit.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/acpi/sleep.c