From patchwork Tue Dec 13 14:42:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 32846 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp164419wrn; Tue, 13 Dec 2022 06:50:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf4RNhC892PBfpZKLbegZwqHKR/ZUL2g8pYGe0vHH9oDUpo6E7SdP3+qy7lcil5pWycSoXpD X-Received: by 2002:a17:907:c241:b0:7c1:79f5:9545 with SMTP id tj1-20020a170907c24100b007c179f59545mr6976943ejc.42.1670943040727; Tue, 13 Dec 2022 06:50:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670943040; cv=none; d=google.com; s=arc-20160816; b=ExNj8Paquj/EXmtoXmjSBOAuGlORxSjpj8qYIt6GutRoRQYYJOcitILsbocBFOZIif halXSVNtX44bvYUUWh7+pZPRYQGYpC2eaN2v9uxTl3uounnii4ZA3oMtZj8oDEjBmbyY JgNgkAFLhMH7l4DkVbET8jmfZtSTlOw5151+jmnpRkKZC2qhrPuj/YLtbGib+dhcxbRU yr1fMMFU2YzaXG/99qgBuyfLXH/gNrsc1mWWeQU37w8uwYUuweC4y8kiAThioAAiaKie Hi74/irugskTjMmf7FLNVsdn5XTcDZ+Q0uhbev/9+9sbOquA9M9TQG3Xs/6gpUPkiRUn lwhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=2/YHTH1z8aQnJmokEIXMyvC5DfxjhIA5wP2OyBsYsKU=; b=Ra7MSWSrDxIB1Z04ruEOk98iub/sbY32/+rnjZIJ9dRNYqr/EhUjaji4c9HLjY2wKx +fgxuXH7kdOx4e3RA79QEOBDag52ukxUU9R6nHW9pYKHQ0oGgcolbiLp28NkveMS1CQ1 nr56q0Mer8amNOAd/SNSKLIFGNlwSk5j55pQMzsg9QLBYCKz8XFsqAnc+fKMn4zn++K6 YzR+3gNXQkeXYibd2RH/RXhONAb37NeaEdQNYSB2e707XC2hvxi60Y2N/O4JjlX6RCW0 VSLTu8Sw4LAgjz7M/6GuM0SgA3GqFBtywngsSnfzgd0OCZ0syxeWVNLdQwOG7avoWwWW OlDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=oXKPGCII; 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=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xb4-20020a170907070400b0078e1e77f443si8857130ejb.418.2022.12.13.06.50.16; Tue, 13 Dec 2022 06:50:40 -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=@alien8.de header.s=dkim header.b=oXKPGCII; 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=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235753AbiLMOmg (ORCPT + 99 others); Tue, 13 Dec 2022 09:42:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234027AbiLMOma (ORCPT ); Tue, 13 Dec 2022 09:42:30 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5884F2035C for ; Tue, 13 Dec 2022 06:42:29 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (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 EB9881EC06D9; Tue, 13 Dec 2022 15:42:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1670942548; 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:references; bh=2/YHTH1z8aQnJmokEIXMyvC5DfxjhIA5wP2OyBsYsKU=; b=oXKPGCIImKZ0U+2HCiepeE1+9JVCKBz7Qx4z9QwMOV099oE9ROlNvSHVyl7nofTo26Y+rQ zFoPmYLswV11soxwWb7VHSQkGS7L4VotMcYD/6yv/Bb5P8vgj+HRPF036uh5p2uRjtHkoK q1RlPppT5iKcKAH2FVcJugd3lNpPBew= Date: Tue, 13 Dec 2022 15:42:23 +0100 From: Borislav Petkov To: Linus Torvalds Cc: x86-ml , lkml Subject: [GIT PULL] x86/microcode for v6.2 Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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?1752110769990209875?= X-GMAIL-MSGID: =?utf-8?q?1752110769990209875?= Hi Linus, please pull a pile of x86/microcode fixes for 6.2. The IFS stuff goes through tip because the IFS driver uses the same structures and similar functionality as the microcode loader and it made sense to route it all through this branch so that there are no conflicts. Thx. --- The following changes since commit 9abf2313adc1ca1b6180c508c25f22f9395cc780: Linux 6.1-rc1 (2022-10-16 15:36:24 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tags/x86_microcode_for_v6.2 for you to fetch changes up to be1b670f61443aa5d0d01782e9b8ea0ee825d018: x86/microcode/intel: Do not retry microcode reloading on the APs (2022-12-05 21:22:21 +0100) ---------------------------------------------------------------- - Add support for multiple testing sequences to the Intel In-Field Scan driver in order to be able to run multiple different test patterns. Rework things and remove the BROKEN dependency so that the driver can be enabled (Jithu Joseph) - Remove the subsys interface usage in the microcode loader because it is not really needed - A couple of smaller fixes and cleanups ---------------------------------------------------------------- Ashok Raj (3): platform/x86/intel/ifs: Add metadata support x86/microcode/intel: Do not print microcode revision and processor flags x86/microcode/intel: Do not retry microcode reloading on the APs Borislav Petkov (5): x86/microcode: Rip out the subsys interface gunk x86/microcode: Simplify init path even more x86/microcode: Kill refresh_fw x86/microcode: Do some minor fixups x86/microcode: Drop struct ucode_cpu_info.valid Jithu Joseph (16): platform/x86/intel/ifs: Remove unused selection platform/x86/intel/ifs: Return a more appropriate error code platform/x86/intel/ifs: Remove image loading during init platform/x86/intel/ifs: Remove memory allocation from load path x86/microcode/intel: Reuse find_matching_signature() x86/microcode/intel: Use appropriate type in microcode_sanity_check() x86/microcode/intel: Reuse microcode_sanity_check() x86/microcode/intel: Add hdr_type to intel_microcode_sanity_check() x86/microcode/intel: Use a reserved field for metasize platform/x86/intel/ifs: Use generic microcode headers and functions platform/x86/intel/ifs: Add metadata validation platform/x86/intel/ifs: Remove reload sysfs entry platform/x86/intel/ifs: Add current_batch sysfs entry Documentation/ABI: Update IFS ABI doc Revert "platform/x86/intel/ifs: Mark as BROKEN" platform/x86/intel/ifs: Add missing kernel-doc entry Documentation/ABI/testing/sysfs-platform-intel-ifs | 30 +-- arch/x86/include/asm/cpu.h | 2 + arch/x86/include/asm/microcode.h | 4 +- arch/x86/include/asm/microcode_intel.h | 5 +- arch/x86/kernel/cpu/intel.c | 144 +++++++++++++- arch/x86/kernel/cpu/microcode/amd.c | 5 +- arch/x86/kernel/cpu/microcode/core.c | 205 ++++--------------- arch/x86/kernel/cpu/microcode/intel.c | 165 ++-------------- drivers/platform/x86/intel/ifs/Kconfig | 4 - drivers/platform/x86/intel/ifs/core.c | 23 ++- drivers/platform/x86/intel/ifs/ifs.h | 30 ++- drivers/platform/x86/intel/ifs/load.c | 218 ++++++++++++--------- drivers/platform/x86/intel/ifs/runtest.c | 10 +- drivers/platform/x86/intel/ifs/sysfs.c | 41 ++-- 14 files changed, 410 insertions(+), 476 deletions(-)