]> git.baikalelectronics.ru Git - kernel.git/commit
x86/speculation: Restore speculation related MSRs during S3 resume
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>
Tue, 5 Apr 2022 00:35:45 +0000 (17:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 Apr 2022 17:18:31 +0000 (10:18 -0700)
commit95a3ecfa35cf8d3b6ce9332c4bdc06b8c8d3683a
treeb3fd79e653f2f7a31c0eddacb8f797890e7ff35a
parent1b3e0709c9e930642986c6ceb0dcbd22d217167f
x86/speculation: Restore speculation related MSRs during S3 resume

After resuming from suspend-to-RAM, the MSRs that control CPU's
speculative execution behavior are not being restored on the boot CPU.

These MSRs are used to mitigate speculative execution vulnerabilities.
Not restoring them correctly may leave the CPU vulnerable.  Secondary
CPU's MSRs are correctly being restored at S3 resume by
identify_secondary_cpu().

During S3 resume, restore these MSRs for boot CPU when restoring its
processor state.

Fixes: a041bcfd378d ("x86/bugs/intel: Set proper CPU features and setup RDS")
Reported-by: Neelima Krishnan <neelima.krishnan@intel.com>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Tested-by: Neelima Krishnan <neelima.krishnan@intel.com>
Acked-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/power/cpu.c