]> www.infradead.org Git - users/jedix/linux-maple.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)
committerBrian Maly <brian.maly@oracle.com>
Mon, 4 Jun 2018 17:35:39 +0000 (13:35 -0400)
commit8ad7f8d507816c5d5b757c2708b41f9ed2126c77
treef7275bef198b32c56f0b13f6c68d7be3f8a96b72
parent320ad90d75f24396fa65ac5cf7ec275a74dfabb0
x86/speculation, KVM: Implement support for VIRT_SPEC_CTRL/LS_CFG

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>
Orabug: 28063992
CVE: CVE-2018-3639

(cherry picked from commit 47c61b39)
Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
arch/x86/include/asm/spec-ctrl.h
arch/x86/kernel/cpu/bugs.c
[
bugs.c: different file name
spec-ctrl.h: contextual changes. Diff couldn't be applied
]

Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/include/asm/spec-ctrl.h
arch/x86/kernel/cpu/bugs_64.c