From: Borislav Petkov <bp@alien8.de>
To: Mihai Carabas <mihai.carabas@oracle.com>
Cc: linux-kernel@vger.kernel.org, ashok.raj@intel.com,
boris.ostrovsky@oracle.com, konrad.wilk@oracle.com,
patrick.colp@oracle.com, kanth.ghatraju@oracle.com,
Jon.Grimm@amd.com, Thomas.Lendacky@amd.com
Subject: [PATCH 2/2] x86/microcode/intel: Issue the revision updated message only on the BSP
Date: Sat, 24 Aug 2019 10:53:41 +0200 [thread overview]
Message-ID: <20190824085341.GC16813@zn.tnic> (raw)
In-Reply-To: <20190824085156.GA16813@zn.tnic>
From: Borislav Petkov <bp@suse.de>
Date: Sat, 24 Aug 2019 10:01:53 +0200
... in order to not pollute dmesg with a line for each updated microcode
engine.
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jon Grimm <Jon.Grimm@amd.com>
Cc: kanth.ghatraju@oracle.com
Cc: konrad.wilk@oracle.com
Cc: Mihai Carabas <mihai.carabas@oracle.com>
Cc: patrick.colp@oracle.com
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: x86-ml <x86@kernel.org>
---
arch/x86/kernel/cpu/microcode/intel.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index ce799cfe9434..6a99535d7f37 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -791,6 +791,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
{
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
struct cpuinfo_x86 *c = &cpu_data(cpu);
+ bool bsp = c->cpu_index == boot_cpu_data.cpu_index;
struct microcode_intel *mc;
enum ucode_state ret;
static int prev_rev;
@@ -836,7 +837,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
return UCODE_ERROR;
}
- if (rev != prev_rev) {
+ if (bsp && rev != prev_rev) {
pr_info("updated to revision 0x%x, date = %04x-%02x-%02x\n",
rev,
mc->hdr.date & 0xffff,
@@ -852,7 +853,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
c->microcode = rev;
/* Update boot_cpu_data's revision too, if we're on the BSP: */
- if (c->cpu_index == boot_cpu_data.cpu_index)
+ if (bsp)
boot_cpu_data.microcode = rev;
return ret;
--
2.21.0
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
next prev parent reply other threads:[~2019-08-24 8:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 20:43 [PATCH] Parallel microcode update in Linux Mihai Carabas
2019-08-22 20:43 ` [PATCH] x86/microcode: Update microcode for all cores in parallel Mihai Carabas
2019-08-24 8:51 ` Borislav Petkov
2019-08-24 8:53 ` [PATCH 1/2] x86/microcode: Update late microcode " Borislav Petkov
2019-08-26 12:53 ` Boris Ostrovsky
2019-08-26 13:03 ` Borislav Petkov
2019-08-26 20:32 ` Raj, Ashok
2019-08-27 19:43 ` Boris Ostrovsky
2019-08-27 21:24 ` Boris Ostrovsky
2019-08-28 19:16 ` Borislav Petkov
2019-08-26 20:23 ` Raj, Ashok
2019-08-27 12:25 ` Borislav Petkov
2019-08-28 0:56 ` Raj, Ashok
2019-08-28 19:13 ` Borislav Petkov
2019-08-28 19:45 ` Raj, Ashok
2019-08-24 8:53 ` Borislav Petkov [this message]
2019-08-26 13:34 ` [PATCH 2/2] x86/microcode/intel: Issue the revision updated message only on the BSP Boris Ostrovsky
2019-08-26 13:45 ` Borislav Petkov
2019-10-01 17:43 ` [tip: x86/microcode] " tip-bot2 for Borislav Petkov
2019-10-01 17:43 ` [tip: x86/microcode] x86/microcode: Update late microcode in parallel tip-bot2 for Ashok Raj
2019-09-01 17:25 ` [PATCH] Parallel microcode update in Linux Pavel Machek
2019-09-02 7:27 ` Mihai Carabas
2019-09-02 7:39 ` Pavel Machek
2019-09-02 11:10 ` Mihai Carabas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190824085341.GC16813@zn.tnic \
--to=bp@alien8.de \
--cc=Jon.Grimm@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=ashok.raj@intel.com \
--cc=boris.ostrovsky@oracle.com \
--cc=kanth.ghatraju@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mihai.carabas@oracle.com \
--cc=patrick.colp@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome