]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/speculation, KVM: Implement support for VIRT_SPEC_CTRL/LS_CFG
authorThomas Gleixner <tglx@linutronix.de>
Thu, 10 May 2018 18:42:48 +0000 (20:42 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 3 Oct 2018 03:09:48 +0000 (04:09 +0100)
commit8963b10319ec195059f8a65c049303f84cb02d38
tree254c3e6bde9e2464ab50fd8e53d2058a5af94ae1
parentfbb7b98887d4fe5e556b2146857b9c43b6c469f3
x86/speculation, KVM: Implement support for VIRT_SPEC_CTRL/LS_CFG

commit 47c61b3955cf712cadfc25635bf9bc174af030ea upstream.

Add the necessary logic for supporting the emulated VIRT_SPEC_CTRL MSR to
x86_virt_spec_ctrl().  If either X86_FEATURE_LS_CFG_SSBD or
X86_FEATURE_VIRT_SPEC_CTRL is set then use the new guest_virt_spec_ctrl
argument to check whether the state must be modified on the host. The
update reuses speculative_store_bypass_update() so the ZEN-specific sibling
coordination can be reused.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/include/asm/spec-ctrl.h
arch/x86/kernel/cpu/bugs.c