linux-stable/arch
Pawan Gupta ef46005631 x86/pm: Save the MSR validity status at context setup
commit 73924ec4d5 upstream.

The mechanism to save/restore MSRs during S3 suspend/resume checks for
the MSR validity during suspend, and only restores the MSR if its a
valid MSR.  This is not optimal, as an invalid MSR will unnecessarily
throw an exception for every suspend cycle.  The more invalid MSRs,
higher the impact will be.

Check and save the MSR validity at setup.  This ensures that only valid
MSRs that are guaranteed to not throw an exception will be attempted
during suspend.

Fixes: 7a9c2dd08e ("x86/pm: Introduce quirk framework to save/restore extra MSR registers around suspend/resume")
Suggested-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Borislav Petkov <bp@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20 09:08:29 +02:00
..
alpha alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile 2021-10-06 15:05:07 +02:00
arc arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed 2021-11-12 14:28:22 +01:00
arm ARM: 9187/1: JIVE: fix return value of __setup handler 2022-04-20 09:08:26 +02:00
arm64 arm64: dts: broadcom: Fix sata nodename 2022-04-20 09:08:14 +02:00
blackfin
c6x
cris
frv
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-23 14:00:33 +01:00
hexagon hexagon: export raw I/O routines for modules 2021-11-26 11:40:40 +01:00
ia64 hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2021-12-08 08:46:52 +01:00
m32r
m68k m68k: set a default value for MEMORY_RESERVE 2021-11-26 11:40:35 +01:00
metag
microblaze microblaze: Prevent the overflow of the start 2020-02-28 16:36:08 +01:00
mips MIPS: fix fortify panic when copying asm exception handlers 2022-04-20 09:08:27 +02:00
mn10300
nios2 nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST 2021-11-02 18:25:12 +01:00
openrisc openrisc: don't printk() unconditionally 2021-09-22 11:45:26 +02:00
parisc parisc/unaligned: Fix ldw() and stw() unalignment handlers 2022-03-02 11:33:53 +01:00
powerpc powerpc: Set crashkernel offset to mid of RMA region 2022-04-20 09:08:26 +02:00
s390 s390/hypfs: include z/VM guests with access control group set 2022-02-08 18:16:23 +01:00
score
sh mips,s390,sh,sparc: gup: Work around the "COW can break either way" issue 2022-01-27 09:01:01 +01:00
sparc mips,s390,sh,sparc: gup: Work around the "COW can break either way" issue 2022-01-27 09:01:01 +01:00
tile
um um: registers: Rename function names to avoid conflicts and build problems 2022-01-27 09:00:56 +01:00
unicore32
x86 x86/pm: Save the MSR validity status at context setup 2022-04-20 09:08:29 +02:00
xtensa xtensa: fix DTC warning unit_address_format 2022-04-20 09:08:27 +02:00
.gitignore
Kconfig x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol 2021-12-22 09:17:59 +01:00