x86/speculation: Use cached host SPEC_CTRL value for guest entry/exit
authorJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 14 Jun 2022 21:16:08 +0000 (23:16 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 27 Jun 2022 08:34:00 +0000 (10:34 +0200)
commitbbb69e8bee1bd882784947095ffb2bfe0f7c9470
tree64068e6d11e33c1e9024acdbb450e0efca38eb51
parent56aa4d221f1ee2c3a49b45b800778ec6e0ab73c5
x86/speculation: Use cached host SPEC_CTRL value for guest entry/exit

There's no need to recalculate the host value for every entry/exit.
Just use the cached value in spec_ctrl_current().

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