Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp938435iob; Wed, 4 May 2022 11:04:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9mGHoXyiKhuD275Gx4DXguRDr/QKh8GjCACyGirCuWU+jB30hWAlk+bdNddDjTIX2ZGnR X-Received: by 2002:a17:907:7ea9:b0:6f3:de9c:c6fb with SMTP id qb41-20020a1709077ea900b006f3de9cc6fbmr21701172ejc.304.1651687488112; Wed, 04 May 2022 11:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651687488; cv=none; d=google.com; s=arc-20160816; b=R5YnMg0HQZWr0KAJk5iGgN/g8TpuhvO//k2cQJAVt6FEql9dF0r87wlOuuXpcktQ88 Mx0duxq9FXJHTUUg33fkosgx0bah+dF/Yz3ii4HW82DP44jnUEqudxdokAvsk/NdV1Tg PxMMu3pAc6/hYNxmwpD+Me0GQ6t0szfrXXXHBRhbqOJimYUP2/3OE2g1pVaK4NdvdHn5 FtxV4w40/GNKvGkirluK3sGziYHwcFFC8TRbhd9T90iT9864UbwsTTgIGmR+0rne2bQM ED9XH8xywvQCSpjE+r9Y5SnODxpcc/+XpmhKJsMgG2o5u3jTYPu9YBMeoFCqGhqni1v2 BZfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-version:dlp-reaction:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=kdy4oAlFhOpRIHtjdxDUMWZ15d/IKZzyMvO58Hy5xmU=; b=rw4lEDAymDTPZb66DrYmEbH1eXoJk3P5xryxOMlYPLb/J4pVx6wvb7dx6AGAsOuwxK oU4j6eGX5bAMae71FLtsbov8HzJhf55QdlVDXiGpeUs+S0+GvyaD2rjjHd0bEnHXkLzo StLcowHzgTfIGa2wxMsxcmgUBGGfXBMsaA46uWgMg2RF0/ytAoj4Jlvm8WLI6ch9Bff0 8ttV4vOEVR7ylKH+UsROiYGrIFZ6GmRxdF5LmOkf7OQkGEaX3eB/Cifhn3YGo7Ep9Pir 3M8EgJ2EhdQR5xpCYV3nkyq2SRu/Gf2X1k0F+Ohv6UFR5lB5wBu7QrTqxaw6xVHGA+nr nfiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gExUBy8e; 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 u11-20020aa7db8b000000b00424085b80c5si2182395edt.215.2022.05.04.11.04.24; Wed, 04 May 2022 11:04:48 -0700 (PDT) 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=gExUBy8e; 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 S1349669AbiEDQ2a (ORCPT + 99 others); Wed, 4 May 2022 12:28:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233593AbiEDQ23 (ORCPT ); Wed, 4 May 2022 12:28:29 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC6F146675; Wed, 4 May 2022 09:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651681492; x=1683217492; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=lIZS8L9hUURotYWnPIQEjJsG5uiWV1waq7GDXPVIqcc=; b=gExUBy8e2Cihm/6XjCUMw7vxfEqmclF77qKJoR3k0GbAblzfMm/VX3tV /19mYH11fGepyzx0wbCkvWVz5xyctii3eWJRWkPexTyqaQ+bRuB3I3myr c8qCIvrF/joHyr83Dp2czBNZi7aFDdIL97M+z70Sd/kpflcfYqP4N8dvz 5u/lUA5aL3ZnbNNW5iMSrdr5+Q6ny72G4RLl7tU/viLk8YWYTmj9+vmNm 2O/4dn6QpnfD/JgsfHSzUWCyzSFc4cnUfRaSW8L9+57c09WNGsg6V+ROn uMNCF/8nOPidkU69grdbB7RPngkIzbZoINEfsmkt171pb/mPVFAS4VofM w==; X-IronPort-AV: E=McAfee;i="6400,9594,10337"; a="293004702" X-IronPort-AV: E=Sophos;i="5.91,198,1647327600"; d="scan'208";a="293004702" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2022 09:24:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,198,1647327600"; d="scan'208";a="599597736" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga001.jf.intel.com with ESMTP; 04 May 2022 09:24:51 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 4 May 2022 09:24:51 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 4 May 2022 09:24:50 -0700 Received: from fmsmsx610.amr.corp.intel.com ([10.18.126.90]) by fmsmsx610.amr.corp.intel.com ([10.18.126.90]) with mapi id 15.01.2308.027; Wed, 4 May 2022 09:24:50 -0700 From: "Luck, Tony" To: Thomas Gleixner , "hdegoede@redhat.com" , "markgross@kernel.org" CC: "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "corbet@lwn.net" , "gregkh@linuxfoundation.org" , "andriy.shevchenko@linux.intel.com" , "Joseph, Jithu" , "Raj, Ashok" , "rostedt@goodmis.org" , "Williams, Dan J" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "patches@lists.linux.dev" , "Shankar, Ravi V" Subject: RE: [PATCH v5 03/10] platform/x86/intel/ifs: Add stub driver for In-Field Scan Thread-Topic: [PATCH v5 03/10] platform/x86/intel/ifs: Add stub driver for In-Field Scan Thread-Index: AQHYWxYWmJjf7gsCY0aglBAPDxFRY60PBIYA///pJDA= Date: Wed, 4 May 2022 16:24:50 +0000 Message-ID: References: <20220422200219.2843823-1-tony.luck@intel.com> <20220428153849.295779-1-tony.luck@intel.com> <20220428153849.295779-4-tony.luck@intel.com> <87zgjxk2kt.ffs@tglx> In-Reply-To: <87zgjxk2kt.ffs@tglx> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 x-originating-ip: [10.1.200.100] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 >> +static const struct x86_cpu_id ifs_cpu_ids[] __initconst =3D { >> + X86_MATCH(SAPPHIRERAPIDS_X), > > Why do we need a model match here? The core capabilities MSR is only > available when X86_FEATURE_CORE_CAPABILITIES is set: > > "If CPUID.(EAX=3D07H, ECX=3D0):EDX[30] =3D 1. > This MSR provides an architectural enumeration > function for model-specific behavior." > > So checking for Intel Fam6 ANYMODEL and X86_FEATURE_CORE_CAPABILITIES is > sufficient, no? IA32_CORE_CAPABILITES is a nightmare. Although it is an architectural register, the bits inside it are model specific. In particular bit 2 (which we check here for the existence of the INTEGRITY MSR) has been assigned for other use on other models. See SDM volume 4 table 2-45 where bit 2 means FUSA supported on 06_8C and 06_8D (Tigerlake mobile and desktop). Ditto in table 2-46 (Alderlake and Raptorlake). > We really don't need more match id tables with gazillions of CPU models. Sadly we do :-( -Tony