Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1665943ybl; Sat, 24 Aug 2019 01:55:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqydN0+O7dxV6YqrvSUnSiTdZOEuVsVMPyV9ZkArBO+7afKZQtuFzK1Nyi1ZpmC25tQm8vU9 X-Received: by 2002:a17:902:f216:: with SMTP id gn22mr9556862plb.59.1566636947466; Sat, 24 Aug 2019 01:55:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566636947; cv=none; d=google.com; s=arc-20160816; b=MG+VoKcjR3Ug2hZVnrShzO2iWhq3lc1PTPtIosAqY4Yv1PPWH3t9qxWIUSrxWHgIuG Xrh0gPbM4fLcYSL4MVbUPVfoit31V6qjqzCb1qryqrlHtplxKj6zLw7vwFAGx4fzEmXw BWqMzFgR/QDeDhZwpu5TO+5ioPbYT8Pwp7fk9tf8HXEZZTVn4KKLsaljWszIMq+w5GPK GLt98Dx68k70s1/GG2mh2GGhB5wQKl9TPyofoa/2BHFLn5/8VuW/naBpqBR9ZlBYhygb 5TzxCxgWEpQHDGJRvUTCblmKfRqKPobUjFzs4W4xQwwz+CGxgTeS9jcROKEXTXcfTvYs 7Abg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ax9XVr2446DKYzhDbuEl4JPufvVY1L74U+7t5fsNCv4=; b=hnKVls60Q46qcvledZjQGl0fcZ7K7k0f7enQX+yvJ5lwClBHU2m+Bzf8bGGxO6fWtC o+IqhkPgDSmCLYfGN6a+YgLfFopAmVe2KEstAe4exhpUK5Ce87gAagNqk+/aARDirxvc WLhEly7Wfc3WyPROCXhKo8jzBqMds6cUUM/8qoNovnv9uEoJWlyfbec+Ydr7XYlrio22 rjEeJ3UuDIMh4KM+BDmFhcUv50OwA6yklb/v+mVY+1kO7RfuLvplUqFlUa8gPPP1UM4L Z/wrlGfYKeKgXWEQrj5J3BIf5SuC/Ayjm+102ITBEOj5VRO/XYI8wYiHzjvJBtWDSR2p 9VXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=VyjcERP8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si3880441pgv.116.2019.08.24.01.55.32; Sat, 24 Aug 2019 01:55:47 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=VyjcERP8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727250AbfHXIxl (ORCPT + 99 others); Sat, 24 Aug 2019 04:53:41 -0400 Received: from mail.skyhub.de ([5.9.137.197]:44394 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725616AbfHXIxl (ORCPT ); Sat, 24 Aug 2019 04:53:41 -0400 Received: from zn.tnic (p200300EC2F1E9400E161D1CD3EE01E5E.dip0.t-ipconnect.de [IPv6:2003:ec:2f1e:9400:e161:d1cd:3ee0:1e5e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 750541EC0BFD; Sat, 24 Aug 2019 10:53:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1566636820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=ax9XVr2446DKYzhDbuEl4JPufvVY1L74U+7t5fsNCv4=; b=VyjcERP8D32OT3h5O7R/D74ex8GkZWAnAj89xq2OLQ3qBZvY6XGX7/Z6zpcmI1oYn6BMh8 Qv6FRGj3V8MuahhRNdSgznS9j37wa8ES+w6hhSDMk4JquQXnxhFYXJlF1zusGvr+Pnngdv JTNEU6W4ovwHUvny33mOIq71n9xeR+E= Date: Sat, 24 Aug 2019 10:53:41 +0200 From: Borislav Petkov To: Mihai Carabas 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 Message-ID: <20190824085341.GC16813@zn.tnic> References: <1566506627-16536-1-git-send-email-mihai.carabas@oracle.com> <1566506627-16536-2-git-send-email-mihai.carabas@oracle.com> <20190824085156.GA16813@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190824085156.GA16813@zn.tnic> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov 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 Cc: Ashok Raj Cc: Boris Ostrovsky Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jon Grimm Cc: kanth.ghatraju@oracle.com Cc: konrad.wilk@oracle.com Cc: Mihai Carabas Cc: patrick.colp@oracle.com Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml --- 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.