]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jul 2022 10:54:07 +0000 (12:54 +0200)
commit2e1a4108d1b352c5ca2b24043cc5b5cdb726f7ea
tree8c0628077dc5e0188a883c12f56f1d618ccf701d
parentc7fe3ff16b0c690363d9f45166551c3e48febbcd
x86/speculation: Use cached host SPEC_CTRL value for guest entry/exit

commit d6df290b879c9e61212c87060909581648fb7148 upstream.

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>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/bugs.c