From patchwork Sat Jan 21 14:54:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 46827 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp754625wrn; Sat, 21 Jan 2023 06:57:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXvPIwSRWaYgbKJsp8KPSYantVBKfy488QbO3JmNR+Ow7zpjLNb3CofnROYw/QmCjMEbM46k X-Received: by 2002:a05:6402:38e:b0:499:bcfc:f47b with SMTP id o14-20020a056402038e00b00499bcfcf47bmr20578500edv.16.1674313050922; Sat, 21 Jan 2023 06:57:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674313050; cv=none; d=google.com; s=arc-20160816; b=M9+oqjJWm3LkI+jUcFs4cxxlvhwvY7Or8lPFTj2FDwC4wxnIucYt19vYHwx5QFUFmG G8QR+yAV0WeVSNcZ//vVBf6JrWuCI4o88guDKiF4X7t4iIfuLX4FOOy98z+/77HkzCW2 wV1jlk/ie0/i/TQ54Jh/nnkjDrjeX8Jfo6wl5rnq6NfY+pWJI6akD6DdmO9pPq4Ra7Qq 1C0VtVYRJXfg+80h7BK//0OOI1hJE8oApjzKwIaalUJZoSjxNiSzKr9UifqX5w8E8mmg 6edqx9Qs6DeeyinUPZuClpXjm29hCarEO1HFyq2oUrW4IESX3gRWCDVnEpH+n4bN4BSf RWqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=xc3e1Isd07hyMmhdJs218O+phbX8yWD6UQMKDWzBjkk=; b=Ss4AxFN1EUVxgA9+R9Xnle+MdCETQFqXAqxQaxPXM1KK2HLd47ml3d4cL5eaRPdinG HqVCfFiPCiWPbMP4bbMKFrienq/CFUYabkWO1br9dS2++4ZtKXrMu2Q8NURa9qpuJ/68 54I9eOFsHZltrG6NiR48P+4QdeD1a04mygu19lpLAXrUea2Nd/aYWjqc46qvEeer0dQq djsLud5VB9aSBz/BeVUl0PeGKxZCAbFQuQQMnZhV2t5mAO75/5B5QWtvAdFhmsib3sgg WdeC4WDzTTMZ8/IXFJnP9whMyEYhH5ySM6UKCmWj3Kmpoedea3H2I9hRoQmbEPBufdeQ xNHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bLO0ff6H; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x1-20020a056402414100b0049ee847cd67si354134eda.362.2023.01.21.06.57.07; Sat, 21 Jan 2023 06:57:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bLO0ff6H; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229888AbjAUOyd (ORCPT + 99 others); Sat, 21 Jan 2023 09:54:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbjAUOyb (ORCPT ); Sat, 21 Jan 2023 09:54:31 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A892D8A59; Sat, 21 Jan 2023 06:54:30 -0800 (PST) Date: Sat, 21 Jan 2023 14:54:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1674312868; h=from:from:sender:sender:reply-to: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:content-transfer-encoding; bh=xc3e1Isd07hyMmhdJs218O+phbX8yWD6UQMKDWzBjkk=; b=bLO0ff6HMm1bjn5UISQ4JztCD2w2XhJ5pfnRP7yiTzGMnATwgcWRTAj6KYz6JjunkjjScX Nyrz9Lx5RiOE6SSAYmqd7xtEX8u+IFnbuc6Hn4FBIro/13BopeH37C35UJRLWXqCzfbY/1 N9NeqDTfiILAGcKssk5t4Cvv/Ks7llt4uacv3ac23xXWoLwHHxZLX7ipym6jX1tDhPqCCX enRwcQcviqqRqyKzu+jruHnFNYJxixDIJvmfTFPDJcGf/esQUqLsGxTUk36isR9dVhOZcz LOdsPKVG+7FaKhBPTgX9jxeaEOwOh5Q6B3zLDrMFWCz4Pe8WbdXBThgBS4zd0g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1674312868; h=from:from:sender:sender:reply-to: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:content-transfer-encoding; bh=xc3e1Isd07hyMmhdJs218O+phbX8yWD6UQMKDWzBjkk=; b=9M2HFj6WtRrCLpx3MQ+2611fxqv/vAPDrOj58RtWpA2uzI2hKFB3Tg9ZXkUqAaMmp8ieGr Y4OE9Z4rZcVzT1DA== From: "tip-bot2 for Ashok Raj" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/microcode] x86/microcode: Adjust late loading result reporting message Cc: Thomas Gleixner , Ashok Raj , "Borislav Petkov (AMD)" , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <167431286818.4906.11374888066745069135.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755644481558392578?= X-GMAIL-MSGID: =?utf-8?q?1755644481558392578?= The following commit has been merged into the x86/microcode branch of tip: Commit-ID: 6eab3abac7043226e5375e9ead0c7607ced6767b Gitweb: https://git.kernel.org/tip/6eab3abac7043226e5375e9ead0c7607ced6767b Author: Ashok Raj AuthorDate: Mon, 09 Jan 2023 07:35:52 -08:00 Committer: Borislav Petkov (AMD) CommitterDate: Sat, 21 Jan 2023 14:55:20 +01:00 x86/microcode: Adjust late loading result reporting message During late microcode loading, the "Reload completed" message is issued unconditionally, regardless of success or failure. Adjust the message to report the result of the update. [ bp: Massage. ] Fixes: 9bd681251b7c ("x86/microcode: Announce reload operation's completion") Suggested-by: Thomas Gleixner Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tony Luck Link: https://lore.kernel.org/lkml/874judpqqd.ffs@tglx/ --- arch/x86/kernel/cpu/microcode/core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index 8ec38c1..61d57d9 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c @@ -453,11 +453,14 @@ static int microcode_reload_late(void) store_cpu_caps(&prev_info); ret = stop_machine_cpuslocked(__reload_late, NULL, cpu_online_mask); - if (ret == 0) + if (!ret) { + pr_info("Reload succeeded, microcode revision: 0x%x -> 0x%x\n", + old, boot_cpu_data.microcode); microcode_check(&prev_info); - - pr_info("Reload completed, microcode revision: 0x%x -> 0x%x\n", - old, boot_cpu_data.microcode); + } else { + pr_info("Reload failed, current microcode revision: 0x%x\n", + boot_cpu_data.microcode); + } return ret; }