From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751383AbcL1LZ6 (ORCPT ); Wed, 28 Dec 2016 06:25:58 -0500 Received: from mail.skyhub.de ([78.46.96.112]:48174 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751338AbcL1LZ5 (ORCPT ); Wed, 28 Dec 2016 06:25:57 -0500 Date: Wed, 28 Dec 2016 12:18:30 +0100 From: Borislav Petkov To: Junichi Nomura Cc: "x86@kernel.org" , "linux-kernel@vger.kernel.org" , Andy Lutomirski , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" Subject: Re: [PATCH] x86: Fix Intel microcode revision detection Message-ID: <20161228111830.GA21788@nazgul.tnic> References: <2f771739-a617-0870-2f68-2a8ebba0bc46@ce.jp.nec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2f771739-a617-0870-2f68-2a8ebba0bc46@ce.jp.nec.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 28, 2016 at 04:39:31AM +0000, Junichi Nomura wrote: > early_init_intel() calls sync_core() before rdmsr(MSR_IA32_UCODE_REV), > assuming sync_core() is effectively CPUID(eax=1). However the assumption > no longer holds since commit c198b121b1a1 ("x86/asm: Rewrite sync_core() > to use IRET-to-self"). > > As a result, kernel fails to detect the revision of microcode, such as: > microcode: sig=0x206a7, pf=0x2, revision=0x0 > > Conversion from sync_core() to native_cpuid() has already been done in > Intel microcode driver by commit 484d0e5c7943 ("x86/microcode/intel: > Replace sync_core() with native_cpuid()"). This patch just extends the > conversion for early_init_intel(). Good catch, thanks! However, I want to do something else because we do end up needing those native CPUID variants pretty often after all so let's generalize the whole usage case and do the following (patches as reply to this message). Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --