]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
daa8a65d84b4da8bc2493a4efe8b3769d758757b
[thirdparty/kernel/stable-queue.git] /
1 From 594a30fb12424717a41c62323d2a8bf167dbccad Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Wed, 30 Aug 2017 12:58:11 +0200
4 Subject: x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature
5
6 From: Hans de Goede <hdegoede@redhat.com>
7
8 commit 594a30fb12424717a41c62323d2a8bf167dbccad upstream.
9
10 When booting 4.13 on a VirtualBox VM on a Skylake host the following
11 error shows up in the logs:
12
13 [ 0.000000] [Firmware Bug]: TSC_DEADLINE disabled due to Errata;
14 please update microcode to version: 0xb2 (or later)
15
16 This is caused by apic_check_deadline_errata() only checking CPU model
17 and not the X86_FEATURE_TSC_DEADLINE_TIMER flag (which VirtualBox does
18 NOT export to the guest), combined with VirtualBox not exporting the
19 micro-code version to the guest.
20
21 This commit adds a check for X86_FEATURE_TSC_DEADLINE_TIMER to
22 apic_check_deadline_errata(), silencing this error on VirtualBox VMs.
23
24 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
25 Acked-by: Thomas Gleixner <tglx@linutronix.de>
26 Cc: Frank Mehnert <frank.mehnert@oracle.com>
27 Cc: Linus Torvalds <torvalds@linux-foundation.org>
28 Cc: Michael Thayer <michael.thayer@oracle.com>
29 Cc: Michal Necasek <michal.necasek@oracle.com>
30 Cc: Peter Zijlstra <peterz@infradead.org>
31 Fixes: bd9240a18e ("x86/apic: Add TSC_DEADLINE quirk due to errata")
32 Link: http://lkml.kernel.org/r/20170830105811.27539-1-hdegoede@redhat.com
33 Signed-off-by: Ingo Molnar <mingo@kernel.org>
34 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
35 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
36
37 ---
38 arch/x86/kernel/apic/apic.c | 6 +++++-
39 1 file changed, 5 insertions(+), 1 deletion(-)
40
41 --- a/arch/x86/kernel/apic/apic.c
42 +++ b/arch/x86/kernel/apic/apic.c
43 @@ -599,9 +599,13 @@ static const struct x86_cpu_id deadline_
44
45 static void apic_check_deadline_errata(void)
46 {
47 - const struct x86_cpu_id *m = x86_match_cpu(deadline_match);
48 + const struct x86_cpu_id *m;
49 u32 rev;
50
51 + if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
52 + return;
53 +
54 + m = x86_match_cpu(deadline_match);
55 if (!m)
56 return;
57