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)
committerH. Peter Anvin <hpa@linux.intel.com>
Mon, 15 Jul 2013 20:50:54 +0000 (13:50 -0700)
commit5ff560fd48d5b3d82fa0c3aff625c9da1a301911
tree074ea5f9b708d54589fd04451488a588d75683e8
parentff5599816711d2e67da2d7561fd36ac48debd433
x86, suspend: Handle CPUs which fail to #GP on RDMSR

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
Cc: <stable@vger.kernel.org> # v3.7+
arch/x86/kernel/acpi/sleep.c