]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd6df290b879c9e61212c87060909581648fb7148
tree64068e6d11e33c1e9024acdbb450e0efca38eb51
parentaa323f15f0a42bca05e56cd60b7978c8761c69df
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