All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.13 0/2] Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors
@ 2017-10-18  9:15 Paolo Bonzini
  2017-10-18  9:15 ` [PATCH for-4.13 1/2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2017-10-18  9:15 UTC (permalink / raw)
  To: stable, kvm

Both fixes cherry pick nicely, but only the second patch was submitted for
stable and therefore didn't apply; I'm sending out both now.

Paolo

Hans de Goede (1):
  x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs
    without the feature

Paolo Bonzini (1):
  x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on
    hypervisors

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

-- 
2.14.2

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

* [PATCH for-4.13 1/2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature
  2017-10-18  9:15 [PATCH for-4.13 0/2] Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors Paolo Bonzini
@ 2017-10-18  9:15 ` Paolo Bonzini
  2017-10-18  9:15 ` [PATCH for-4.13 2/2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors Paolo Bonzini
  2017-10-19  9:31 ` [PATCH for-4.13 0/2] " Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2017-10-18  9:15 UTC (permalink / raw)
  To: stable, kvm
  Cc: Hans de Goede, Thomas Gleixner, Frank Mehnert, Linus Torvalds,
	Michael Thayer, Michal Necasek, Peter Zijlstra, Ingo Molnar

From: Hans de Goede <hdegoede@redhat.com>

[ upstream commit 594a30fb12424717a41c62323d2a8bf167dbccad ]

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>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 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.14.2

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

* [PATCH for-4.13 2/2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors
  2017-10-18  9:15 [PATCH for-4.13 0/2] Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors Paolo Bonzini
  2017-10-18  9:15 ` [PATCH for-4.13 1/2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature Paolo Bonzini
@ 2017-10-18  9:15 ` Paolo Bonzini
  2017-10-19  9:31 ` [PATCH for-4.13 0/2] " Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2017-10-18  9:15 UTC (permalink / raw)
  To: stable, kvm; +Cc: Thomas Gleixner, Peter Zijlstra, Hans de Goede

[ upstream commit cc6afe2240298049585e86b1ade85efc8a7f225d ]

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 b3273c842850..a7be1b4283a0 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -602,7 +602,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);
-- 
2.14.2

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

* Re: [PATCH for-4.13 0/2] Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors
  2017-10-18  9:15 [PATCH for-4.13 0/2] Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors Paolo Bonzini
  2017-10-18  9:15 ` [PATCH for-4.13 1/2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature Paolo Bonzini
  2017-10-18  9:15 ` [PATCH for-4.13 2/2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors Paolo Bonzini
@ 2017-10-19  9:31 ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2017-10-19  9:31 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: stable, kvm

On Wed, Oct 18, 2017 at 11:15:47AM +0200, Paolo Bonzini wrote:
> Both fixes cherry pick nicely, but only the second patch was submitted for
> stable and therefore didn't apply; I'm sending out both now.
> 
> Paolo
> 
> Hans de Goede (1):
>   x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs
>     without the feature
> 
> Paolo Bonzini (1):
>   x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on
>     hypervisors

Thanks, now applied.

greg k-h

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18  9:15 [PATCH for-4.13 0/2] Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors Paolo Bonzini
2017-10-18  9:15 ` [PATCH for-4.13 1/2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature Paolo Bonzini
2017-10-18  9:15 ` [PATCH for-4.13 2/2] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors Paolo Bonzini
2017-10-19  9:31 ` [PATCH for-4.13 0/2] " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.