From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751550AbdHaJ7d (ORCPT ); Thu, 31 Aug 2017 05:59:33 -0400 Received: from terminus.zytor.com ([65.50.211.136]:45487 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751025AbdHaJ7c (ORCPT ); Thu, 31 Aug 2017 05:59:32 -0400 Date: Thu, 31 Aug 2017 02:55:50 -0700 From: tip-bot for Hans de Goede Message-ID: Cc: torvalds@linux-foundation.org, hdegoede@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, frank.mehnert@oracle.com, peterz@infradead.org, mingo@kernel.org, michael.thayer@oracle.com, michal.necasek@oracle.com Reply-To: hpa@zytor.com, hdegoede@redhat.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, frank.mehnert@oracle.com, mingo@kernel.org, michael.thayer@oracle.com, michal.necasek@oracle.com In-Reply-To: <20170830105811.27539-1-hdegoede@redhat.com> References: <20170830105811.27539-1-hdegoede@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/apic] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature Git-Commit-ID: 594a30fb12424717a41c62323d2a8bf167dbccad X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 594a30fb12424717a41c62323d2a8bf167dbccad Gitweb: http://git.kernel.org/tip/594a30fb12424717a41c62323d2a8bf167dbccad Author: Hans de Goede AuthorDate: Wed, 30 Aug 2017 12:58:11 +0200 Committer: Ingo Molnar 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 Acked-by: Thomas Gleixner Cc: Frank Mehnert Cc: Linus Torvalds Cc: Michael Thayer Cc: Michal Necasek Cc: Peter Zijlstra 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 --- 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;