x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value
authorPeter Zijlstra <peterz@infradead.org>
Tue, 14 Jun 2022 21:15:52 +0000 (23:15 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 27 Jun 2022 08:33:59 +0000 (10:33 +0200)
commitcaa0ff24d5d0e02abce5e65c3d2b7f20a6617be5
tree39290109cf141e2276936764ff738924cec26c2b
parente8ec1b6e08a2102d8755ccb06fa26d540f26a2fa
x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value

Due to TIF_SSBD and TIF_SPEC_IB the actual IA32_SPEC_CTRL value can
differ from x86_spec_ctrl_base. As such, keep a per-CPU value
reflecting the current task's MSR content.

  [jpoimboe: rename]

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
arch/x86/include/asm/nospec-branch.h
arch/x86/kernel/cpu/bugs.c
arch/x86/kernel/process.c