mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors
@ 2017-10-10 10:12 Paolo Bonzini
  2017-10-12 15:12 ` [tip:x86/urgent] " tip-bot for Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2017-10-10 10:12 UTC (permalink / raw)
  To: linux-kernel, kvm; +Cc: x86, Hans de Goede, Peter Zijlstra, stable

Commit 594a30fb1242 ("x86/apic: Silence "FW_BUG TSC_DEADLINE disabled
due to Errata" on CPUs without the feature", 2017-08-30) was also about
silencing the warning on VirtualBox; however, KVM does expose the TSC
deadline time, and it's virtualized so that it is immune from CPU errata.

Therefore, booting 4.13 with "-cpu Haswell" shows this in the logs:

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

Even if you had a hypervisor that does _not_ virtualize the TSC deadline
and rather exposes the hardware one, it should be the hypervisor's task
to update microcode and possibly hide the flag from CPUID.  So just
hide the message when running on _any_ hypervisor, not just those that
do not support the TSC deadline timer.

The older check still makes sense, so keep it.

Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Fixes: bd9240a18e ("x86/apic: Add TSC_DEADLINE quirk due to errata")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arch/x86/kernel/apic/apic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index d705c769f77d..50109eae8cd7 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -600,7 +600,8 @@ static void apic_check_deadline_errata(void)
 	const struct x86_cpu_id *m;
 	u32 rev;
 
-	if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
+	if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER) ||
+	    boot_cpu_has(X86_FEATURE_HYPERVISOR))
 		return;
 
 	m = x86_match_cpu(deadline_match);
-- 
1.8.3.1

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

* [tip:x86/urgent] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors
  2017-10-10 10:12 [PATCH] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors Paolo Bonzini
@ 2017-10-12 15:12 ` tip-bot for Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Paolo Bonzini @ 2017-10-12 15:12 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: hdegoede, linux-kernel, pbonzini, mingo, tglx, peterz, hpa

Commit-ID:  cc6afe2240298049585e86b1ade85efc8a7f225d
Gitweb:     https://git.kernel.org/tip/cc6afe2240298049585e86b1ade85efc8a7f225d
Author:     Paolo Bonzini <pbonzini@redhat.com>
AuthorDate: Tue, 10 Oct 2017 12:12:57 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 12 Oct 2017 17:10:10 +0200

x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors

Commit 594a30fb1242 ("x86/apic: Silence "FW_BUG TSC_DEADLINE disabled
due to Errata" on CPUs without the feature", 2017-08-30) was also about
silencing the warning on VirtualBox; however, KVM does expose the TSC
deadline timer, and it's virtualized so that it is immune from CPU errata.

Therefore, booting 4.13 with "-cpu Haswell" shows this in the logs:

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

Even if you had a hypervisor that does _not_ virtualize the TSC deadline
and rather exposes the hardware one, it should be the hypervisors task
to update microcode and possibly hide the flag from CPUID.  So just
hide the message when running on _any_ hypervisor, not just those that
do not support the TSC deadline timer.

The older check still makes sense, so keep it.

Fixes: bd9240a18e ("x86/apic: Add TSC_DEADLINE quirk due to errata")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: kvm@vger.kernel.org
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1507630377-54471-1-git-send-email-pbonzini@redhat.com

---
 arch/x86/kernel/apic/apic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index d705c76..50109ea 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -600,7 +600,8 @@ static void apic_check_deadline_errata(void)
 	const struct x86_cpu_id *m;
 	u32 rev;
 
-	if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
+	if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER) ||
+	    boot_cpu_has(X86_FEATURE_HYPERVISOR))
 		return;
 
 	m = x86_match_cpu(deadline_match);

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

end of thread, other threads:[~2017-10-12 15:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 10:12 [PATCH] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors Paolo Bonzini
2017-10-12 15:12 ` [tip:x86/urgent] " tip-bot for Paolo Bonzini

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

Powered by JetHome