Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2566984rwb; Mon, 7 Nov 2022 15:05:46 -0800 (PST) X-Google-Smtp-Source: AMsMyM7SZskXBjjkjZR9/HDEOIYqLx0QyzwW/5dKst4sZIv1mHeNr0+sBH2+iy6Cq8jzc7w+psoQ X-Received: by 2002:aa7:d553:0:b0:463:18d3:195c with SMTP id u19-20020aa7d553000000b0046318d3195cmr48388312edr.235.1667862346003; Mon, 07 Nov 2022 15:05:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667862345; cv=none; d=google.com; s=arc-20160816; b=XGv5FEL0a6pI6ZS2CKOsYur+ERfu/ZFztZLINr13TbuE9VhZOV3cjwS7/n8m/Cn8QY 7I4k5zECoLBS0FNFfuH7m4Ad7x6+AJbBX+nPDbUeIcmPHZZMLysdNSvOtTPc/h0Z9rWV DsnAE/hWCnAIX6WDoC9eVJz2Ombr7MIGZuZtkG5xH3GMz1Q6luDriW9+8YZmq0XvlyXG C5opKdWVRbTuhWkmE/FnpKGfygdMv798ZIthx8vlbO0c1eJEKfRa5NgTkhRdHmKslzVH b28BYyfCFciCmsI9qs4aOv3AWLRJINKcHTXbI/cEY1cMPWwAeeUqdJtCgw7EK+DTRjEa nMiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=j5H8M+cA+CkvWF5iLU0Qrc7bid1MXokJaGSnV7WPdQU=; b=MlKe5IhRWHexyZmK3sHNUoiAWieK1zGeMMcoWB2knVDnbtNhAfxnjB7SA/KRqMQ970 iO+VUF6vS69lmlWETFqMng9nOTwzojvs6yn7oLSTKyha2v9EpUAVLoHaVZeu9/tfqaIZ N9k4DAIDaHf1o+C/m6akbICtQxy7m8CWi+hON9gk6ru+IRmvU6inxhI9/fkcPVNnDrr1 b1LcqQtw97NCKgEh8b11PMixo9BxpztHoT1u6XHUYEyfAPQweZ+u2kYYTctPDOC+6nop +aZ3m2nXQr21x7SuBdN+K2hfSmzEtWUnAQcZGjRJ0mohrBi1rkOoqDi7L54AdYOx229H X/cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P6V42g0k; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd14-20020a1709076e0e00b0073dcb2ec4d2si10233200ejc.889.2022.11.07.15.05.22; Mon, 07 Nov 2022 15:05:45 -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=@intel.com header.s=Intel header.b=P6V42g0k; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232547AbiKGWyr (ORCPT + 91 others); Mon, 7 Nov 2022 17:54:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbiKGWyp (ORCPT ); Mon, 7 Nov 2022 17:54:45 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0291CE0D; Mon, 7 Nov 2022 14:54:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667861685; x=1699397685; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FWqtQaOUoNuwvnHOwhlHlDzFxkPzHGkNFafMl7HFA1U=; b=P6V42g0kIBlylydpdKnZ0jP27c/LwOLqDjszUUpHEsxiA0h881Ln0IHj rZpn5Zde04LsHHuUhwBwV3U1qLB+dZ6ClpqBqeU11i/gVtn8s5BxxJy0g WUIJl9CeiN6yNNnVtOOQh+/tZC4jbZ5r/6RzvE9NHw7G6ebApQ0W6jdjf OBt/x8P4BBE+n612wZe94cBEdJ5HuEBJ0yfuHfgZDtIpqo6l6H2du9bsX JcQurnQwhH1D4ZiUaWh8Zrdji+CGItIoJBO/wqtT3tWIxGHxlMwIu/yHS tn0XTdDbqNEhaXyW3KfEQ/8ofrV+YjVAaGVdgTluvYCbAGEOj9Ye79Rpl w==; X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="293911818" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="293911818" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 14:54:44 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="811012948" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="811012948" Received: from jithujos.sc.intel.com ([172.25.103.66]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 14:54:44 -0800 From: Jithu Joseph To: hdegoede@redhat.com, markgross@kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, gregkh@linuxfoundation.org, jithu.joseph@intel.com, ashok.raj@intel.com, tony.luck@intel.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, patches@lists.linux.dev, ravi.v.shankar@intel.com, thiago.macieira@intel.com, athenas.jimenez.gonzalez@intel.com, sohil.mehta@intel.com Subject: [PATCH v2 00/14] IFS multi test image support and misc changes Date: Mon, 7 Nov 2022 14:53:09 -0800 Message-Id: <20221107225323.2733518-1-jithu.joseph@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221021203413.1220137-1-jithu.joseph@intel.com> References: <20221021203413.1220137-1-jithu.joseph@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE 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 Changes in v2 - Rebased ontop of v6.1-rc4 Boris - Moved exported functions (microcode_sanity_check(), find_matching_signature ) from microcode/intel.c to cpu/intel.c (patch4,6) - Removed microcode metadata specific code changes to microcode_sanity_check() (patch6) - Moved find_meta_data() from common to IFS driver (Patch 8) Sohil - Dropped portions of Patch2 from v1 and folded remaining to Patch12 - Rewording multiple commits - Avoid meta prefix in fields of metadata_header (patch8) - Defining MICROCODE_HEADER_VER* into common location (patch6, 9) - Elaborating error messages w.r.t processor flags (patch9) - Changed sysfs_emit() parameter (patch 11) v1 patches available from Link: https://lore.kernel.org/lkml/20221021203413.1220137-1-jithu.joseph@intel.com/ Initial implementation of IFS driver assumed a single IFS test image file with a fixed name. Subsequently, it became evident that supporting more than one test image file is needed to provide more comprehensive test coverage. (Test coverage in this scenario refers to testing more transistors in the core to identify faults). This series makes the driver aware of multiple scan test image files, modifies IFS test image file headers to make it fully compatible with microcode headers and adds a few other bug fixes and changes. Patch organization: Patches 1, and 2: bug fixes Patch 3: Removes image loading during init path Patch 4, 5 and 6: exports a couple of microcode/intel.c functions for use by driver Rest of them are IFS driver changes Patches 9: IFS header format changes to make it fully compatible to intel microcode header format Patch 7,8 and 10: microcode/IFS metadata section related Patches 11, 12 and 13: native support for multiple scan test image files Patch 14: reverts the broken flag Ashok Raj (1): platform/x86/intel/ifs: Add metadata support Jithu Joseph (13): 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 x86/microcode/intel: Expose find_matching_signature() for IFS x86/microcode/intel: Use appropriate type in microcode_sanity_check() x86/microcode/intel: Expose 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" arch/x86/include/asm/cpu.h | 2 + arch/x86/include/asm/microcode_intel.h | 5 +- drivers/platform/x86/intel/ifs/ifs.h | 27 ++- arch/x86/kernel/cpu/intel.c | 129 +++++++++++ arch/x86/kernel/cpu/microcode/intel.c | 146 +------------ drivers/platform/x86/intel/ifs/core.c | 7 +- drivers/platform/x86/intel/ifs/load.c | 205 ++++++++++-------- drivers/platform/x86/intel/ifs/runtest.c | 10 +- drivers/platform/x86/intel/ifs/sysfs.c | 41 ++-- .../ABI/testing/sysfs-platform-intel-ifs | 30 +-- drivers/platform/x86/intel/ifs/Kconfig | 4 - 11 files changed, 330 insertions(+), 276 deletions(-) base-commit: f0c4d9fc9cc9462659728d168387191387e903cc -- 2.25.1