public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature
@ 2017-08-30 10:58 Hans de Goede
  2017-08-31  9:55 ` [tip:x86/apic] " tip-bot for Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2017-08-30 10:58 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H . Peter Anvin
  Cc: Hans de Goede, x86, linux-kernel, Peter Zijlstra, Michal Necasek,
	Frank Mehnert, Michael Thayer

When booting 4.13 on a VirtualBox VM on a skylake host the following
error shows up in the logs:

[    0.000000] [Firmware Bug]: TSC_DEADLINE disabled due to Errata;
               please update microcode to version: 0xb2 (or later)

This is caused by apic_check_deadline_errata() only checking CPU model
and not the X86_FEATURE_TSC_DEADLINE_TIMER flag (which VirtualBox does
NOT export to the guest), combined with VirtualBox not exporting the
micro-code version to the guest.

This commit adds a check for X86_FEATURE_TSC_DEADLINE_TIMER to
apic_check_deadline_errata(), silencing this error on VirtualBox VMs.

Fixes: bd9240a18e ("x86/apic: Add TSC_DEADLINE quirk due to errata")
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Michal Necasek <michal.necasek@oracle.com>
Cc: Frank Mehnert <frank.mehnert@oracle.com>
Cc: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
-Add an important missing "NOT" in a sentence in the commit message
---
 arch/x86/kernel/apic/apic.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 98b3dd8cf2bf..b3273c842850 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -599,9 +599,13 @@ static const struct x86_cpu_id deadline_match[] = {
 
 static void apic_check_deadline_errata(void)
 {
-	const struct x86_cpu_id *m = x86_match_cpu(deadline_match);
+	const struct x86_cpu_id *m;
 	u32 rev;
 
+	if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
+		return;
+
+	m = x86_match_cpu(deadline_match);
 	if (!m)
 		return;
 
-- 
2.13.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:x86/apic] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature
  2017-08-30 10:58 [PATCH v2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature Hans de Goede
@ 2017-08-31  9:55 ` tip-bot for Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Hans de Goede @ 2017-08-31  9:55 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: torvalds, hdegoede, hpa, linux-kernel, tglx, frank.mehnert,
	peterz, mingo, michael.thayer, michal.necasek

Commit-ID:  594a30fb12424717a41c62323d2a8bf167dbccad
Gitweb:     http://git.kernel.org/tip/594a30fb12424717a41c62323d2a8bf167dbccad
Author:     Hans de Goede <hdegoede@redhat.com>
AuthorDate: Wed, 30 Aug 2017 12:58:11 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 31 Aug 2017 11:17:27 +0200

x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature

When booting 4.13 on a VirtualBox VM on a Skylake host the following
error shows up in the logs:

 [    0.000000] [Firmware Bug]: TSC_DEADLINE disabled due to Errata;
                please update microcode to version: 0xb2 (or later)

This is caused by apic_check_deadline_errata() only checking CPU model
and not the X86_FEATURE_TSC_DEADLINE_TIMER flag (which VirtualBox does
NOT export to the guest), combined with VirtualBox not exporting the
micro-code version to the guest.

This commit adds a check for X86_FEATURE_TSC_DEADLINE_TIMER to
apic_check_deadline_errata(), silencing this error on VirtualBox VMs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Frank Mehnert <frank.mehnert@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Thayer <michael.thayer@oracle.com>
Cc: Michal Necasek <michal.necasek@oracle.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: bd9240a18e ("x86/apic: Add TSC_DEADLINE quirk due to errata")
Link: http://lkml.kernel.org/r/20170830105811.27539-1-hdegoede@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/apic/apic.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index eebee4c..7834f73 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -597,9 +597,13 @@ static const struct x86_cpu_id deadline_match[] = {
 
 static void apic_check_deadline_errata(void)
 {
-	const struct x86_cpu_id *m = x86_match_cpu(deadline_match);
+	const struct x86_cpu_id *m;
 	u32 rev;
 
+	if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
+		return;
+
+	m = x86_match_cpu(deadline_match);
 	if (!m)
 		return;
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-31  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-30 10:58 [PATCH v2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature Hans de Goede
2017-08-31  9:55 ` [tip:x86/apic] " tip-bot for Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox