Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1364148imm; Tue, 3 Jul 2018 09:50:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc78PgZ3l7tc/7hQDc/LmwEIlvcUj4C5i5rO7cfi7y46gDB9liXSA8xhFh5LBeFPpFI0gYj X-Received: by 2002:a65:66d7:: with SMTP id c23-v6mr5583074pgw.427.1530636617434; Tue, 03 Jul 2018 09:50:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530636617; cv=none; d=google.com; s=arc-20160816; b=asP2Uh+PXyuKJlH+o6Kob1O+7plWP2J9pWYqKbTJjm/RdSMnwZD4mRhK9dzCSvIbGb 734E7pHVNtkVREUmXtoSKRFA/gtYbT5E5nmv6P+M8yEigsmM8aUlAiosuM+/uOL5SFbh mUV6cY9PNvBA32mSrZHCKSK7BsuaoaVr+V8qUf4yu2cIXaXqyfzw5nzZv4usUOy6aLqh FSNs7kbiQ2a9sdPLBClFv7GQIoDF80EiyklL3RFqLGqhNFDYKa4weZX3p06q46PxAyI9 2d/k3ZLR/NAbpNKrG9m9c+D2FQ4neR6iiQsPWp8dc1GBMRmrKnuQvMukkdhuetTkNEuu 4usA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ja5AGfwh3eyGdFLRuUQhNNhXvx04kNfU5Ch3GZuoot0=; b=vnWX4xWARcLBC0VnK8dIWMjGldDvNAKhITz9nuLLcw2bV34ZktaKSfBlGX74fqCrl7 7wPDXJ0fcAKMv6DkDaGnakvlVEUEf9mxbXtnruXJmK82P00IpR5J16iuluuqc9M5Qxwg kZZf7RiJdsyME2zSZhb+VL0mMGw9EVddn8SPjOFXl+80KbFwCOTOwA0ie1YrDwS8s4bi XKCvH0WIFvPxl4nUw+PPfCEOJqdZcK44ZbwHY5/nsyv6/2t7BUDuQJzGf+ITh8kGI0K4 sF1hMtrppyf164KQD6s0LLeDB3amifEE3KwVh3NwwGeNES79rjWtGJ81LPL47nrD21Jt ywMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m18-v6si1340024pgi.688.2018.07.03.09.50.02; Tue, 03 Jul 2018 09:50:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934253AbeGCQsw (ORCPT + 99 others); Tue, 3 Jul 2018 12:48:52 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52974 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933637AbeGCQsv (ORCPT ); Tue, 3 Jul 2018 12:48:51 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1C559DFD4; Tue, 3 Jul 2018 16:48:51 +0000 (UTC) Received: from prarit.bos.redhat.com (prarit-guest.khw.lab.eng.bos.redhat.com [10.16.186.145]) by smtp.corp.redhat.com (Postfix) with ESMTP id A95882156880; Tue, 3 Jul 2018 16:48:50 +0000 (UTC) From: Prarit Bhargava To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Tony Luck , Borislav Petkov , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-edac@vger.kernel.org Subject: [PATCH] x86/MCE: Fix CPU microcode version output Date: Tue, 3 Jul 2018 12:48:44 -0400 Message-Id: <20180703164844.9742-1-prarit@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 03 Jul 2018 16:48:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 03 Jul 2018 16:48:51 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'prarit@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On systems where a runtime microcode update has occurred the microcode version is wrong because boot_cpu_data.microcode is not updated during runtime. Use the per-CPU microcode version in the MCE message. Signed-off-by: Prarit Bhargava Cc: Tony Luck Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-edac@vger.kernel.org --- arch/x86/kernel/cpu/mcheck/mce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index c102ad51025e..64fee27433e9 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -134,7 +134,7 @@ void mce_setup(struct mce *m) if (this_cpu_has(X86_FEATURE_INTEL_PPIN)) rdmsrl(MSR_PPIN, m->ppin); - m->microcode = boot_cpu_data.microcode; + m->microcode = cpu_data(m->extcpu).microcode; } DEFINE_PER_CPU(struct mce, injectm); -- 2.14.4