]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0290-x86-microcode-Extend-post-microcode-reload-to-suppor.patch
update ABI file
[pve-kernel.git] / patches / kernel / 0290-x86-microcode-Extend-post-microcode-reload-to-suppor.patch
CommitLineData
035dbe67
FG
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Tom Lendacky <thomas.lendacky@amd.com>
3Date: Wed, 20 Dec 2017 10:55:47 +0000
4Subject: [PATCH] x86/microcode: Extend post microcode reload to support IBPB
5 feature
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10CVE-2017-5753
11CVE-2017-5715
12
13Add an IBPB feature check to the speculative control update check after
14a microcode reload.
15
16Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
17Signed-off-by: Andy Whitcroft <apw@canonical.com>
18Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
19(cherry picked from commit 099878acd3738271fb2ade01f4649b1ed2fb72d5)
20Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
21---
22 arch/x86/kernel/cpu/microcode/core.c | 7 +++++++
23 1 file changed, 7 insertions(+)
24
25diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
26index 55086921d29e..638c08350d65 100644
27--- a/arch/x86/kernel/cpu/microcode/core.c
28+++ b/arch/x86/kernel/cpu/microcode/core.c
29@@ -546,6 +546,13 @@ static ssize_t reload_store(struct device *dev,
30 if (ibpb_inuse)
31 sysctl_ibpb_enabled = 1;
32 mutex_unlock(&spec_ctrl_mutex);
33+ } else if (boot_cpu_has(X86_FEATURE_IBPB)) {
34+ printk_once(KERN_INFO "FEATURE IBPB Present\n");
35+ mutex_lock(&spec_ctrl_mutex);
36+ set_ibpb_supported();
37+ if (ibpb_inuse)
38+ sysctl_ibpb_enabled = 1;
39+ mutex_unlock(&spec_ctrl_mutex);
40 }
41
42 mutex_unlock(&microcode_mutex);
43--
442.14.2
45