From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751408AbdH3K4O (ORCPT ); Wed, 30 Aug 2017 06:56:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52176 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751263AbdH3K4N (ORCPT ); Wed, 30 Aug 2017 06:56:13 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 31FA9C0587DB Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=hdegoede@redhat.com From: Hans de Goede To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: Hans de Goede , x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Michal Necasek , Frank Mehnert , Michael Thayer Subject: [PATCH] x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature Date: Wed, 30 Aug 2017 12:56:09 +0200 Message-Id: <20170830105609.27442-1-hdegoede@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 30 Aug 2017 10:56:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 Cc: Michal Necasek Cc: Frank Mehnert Cc: Michael Thayer Signed-off-by: Hans de Goede --- 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