Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2173420lqa; Tue, 30 Apr 2024 09:56:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV6ROv+dMrIBz7zwWOF2dkp05RjNRPcPnDYcLd12TsdOB+7hweeGh+jZ93DTN2HaxLEGOiyVpKhl5udyo0x5IfSJanlvJSweCQ0PlvnDA== X-Google-Smtp-Source: AGHT+IGxhITDZ603HgWPCcqo3fs4bNnddDgat2z5at3m8focrHBHSEsWQJcDh1NhRntgazNc2huh X-Received: by 2002:a05:620a:201a:b0:790:f465:f66 with SMTP id c26-20020a05620a201a00b00790f4650f66mr3429121qka.59.1714496181511; Tue, 30 Apr 2024 09:56:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714496181; cv=pass; d=google.com; s=arc-20160816; b=NtivCylGz4Wc/dBEumsAhZlallDH9ir4sFT+Ol0CO4MwB1S1WF0+cvmURCM6Mxq5GB vgEfSF/rw3pDnXuWRDASWhwg0/raqU0woqRbTEDkl5zxONFN55pQBcmwEeayriVqCXsL fRilrUTJQk85OP3HK+skMgJtSC0J+NJNm4xLy7HgCN4qKJzwNZ/l/BwAjOgiMw56df8J qvUc2CN7RsrY4QrlZgQ9N7WjytTAMM8A9fJFrT9bCfxtXCHf5yWx1NQrozqQlFdZUBVZ RRLV5x9QYjrDIQM6cokINZ89USnZF6SzIhRYRptWoCgEjeBytmUJ4hPHPreUBxm4sI5A wHjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5EjWRTbl/5QwEC76Z8bBhi8Ra3bb8abjny/WEKI3yG8=; fh=fCCNFvJbPqqXo45yXdlgqaDimb/JVSzwDZSVTcpWFog=; b=X/CD7R18fLFPmSLyjzqUowjU5KltFL2yUxs64dcFcyf+3nX7y8LU7h16WGCGXO9Bbc wx5z0kmfnlx6E468waCcG87BY3tydb0YqhgSi0EyiJlWAoXZ3r0VvjtDuhOeKruyKZPo YOLwjwI9OAk3G4b6IIrX6JrxChw+Bu9E4yv4kRi/HfiH1amPZ0xcW8adM3n63/syCAlD r9wSkSj0StKwWwi10/cIBAQows6SpjeWdhx1o1W3d/nfs6eJj41+TRKh52jwP7vu+M/k qYffkxAPTa72tVMNW2ePTd8UJI3lDOFBSSfWDnUSTOzZo8ubn40rnoP/9Ry8c/9Ttb7S CexQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fDzLU6am; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-164456-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164456-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z11-20020a05620a08cb00b0078ede305e4dsi28003312qkz.167.2024.04.30.09.56.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 09:56:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164456-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fDzLU6am; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-164456-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164456-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3C9CF1C23B66 for ; Tue, 30 Apr 2024 16:56:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B06D1C8FAC; Tue, 30 Apr 2024 16:51:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fDzLU6am" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2D471C0DF5 for ; Tue, 30 Apr 2024 16:51:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714495908; cv=none; b=RMvSGAx8nxafofj5FPQqDo8SLfvUOj9j14R2jqLDd8gCt3tPwryruTOnfq+ifi5D3YvD5hIDXNM8Aot9WqreRDqAO+Ph/Ol8Wki68twGgivGhl1yhfcautP9QesI3l03Xq+6qGGt3r/3u4E8Lb7oXlRfmtzNHxoykCApUkCNbrI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714495908; c=relaxed/simple; bh=CwybUVe8crx1l4CZK03c9vCx8DvC8Bgt8uPcKdw9g+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n2MXzUzfZEIe65aTy77ErvQG4p3n76R6REwsobSGHDoac+JovyodaqNyRVOpxX9Pds1HmHfCTfvsDBYx7a1CvnSTfP4/vtd4Dnz4jVW1CK+SOBFdnYK7WrM8KO5EbfcHI9ErlT+1KMP+7QO/pDnjULnHfNQu758s+ehKw9yaKhQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=fDzLU6am; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714495907; x=1746031907; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CwybUVe8crx1l4CZK03c9vCx8DvC8Bgt8uPcKdw9g+E=; b=fDzLU6amLDhtEIsxxyE9BJwfj+oEJpThvYWOaRm1+CkMwmjHFcCUpQ0o LSdNgToNnedX+PIpiXckd178xi3XOBAqVo+l3HpDRRD4mxlki4YLmsTDO fxRWV6VLMLu2j1O178cBUj8Z4EPvaFlqYkcoehobv+mcddE+MNH7DcLgT dq2Sc08uSotgE4sK2sA7PaMLprjN3bGYM+w45BURz3gosxd2zKq5oRdun mEOCH9Z2ZSzW91h8NgVlYqhUN+3hiz9Tjz3bm9TNE/qzEMU21YT76D+B5 GNDQ2WkhAYSJTuQJYDpabE6XNE01zwu7N+dYPivMo5JRRgaglsxaAo8V8 Q==; X-CSE-ConnectionGUID: m5ZmpxQ9SC2a4/jQ4apk5A== X-CSE-MsgGUID: QOITeEqxSsWW8164PAfCzg== X-IronPort-AV: E=McAfee;i="6600,9927,11060"; a="10075761" X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="10075761" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2024 09:51:23 -0700 X-CSE-ConnectionGUID: l22Hf+hSQt6UpTh1JmRqeg== X-CSE-MsgGUID: S7Wpuq2jRpWwH77gv07HXA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="26515483" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2024 09:51:18 -0700 From: Tony Luck To: Borislav Petkov Cc: x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v5 25/47] crypto: x86/twofish - Switch to new Intel CPU model defines Date: Tue, 30 Apr 2024 09:50:38 -0700 Message-ID: <20240430165100.73491-25-tony.luck@intel.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240430165100.73491-1-tony.luck@intel.com> References: <20240430164913.73473-1-tony.luck@intel.com> <20240430165100.73491-1-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck --- arch/x86/crypto/twofish_glue_3way.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/crypto/twofish_glue_3way.c b/arch/x86/crypto/twofish_glue_3way.c index 90454cf18e0d..82311249048f 100644 --- a/arch/x86/crypto/twofish_glue_3way.c +++ b/arch/x86/crypto/twofish_glue_3way.c @@ -12,6 +12,8 @@ #include #include +#include + #include "twofish.h" #include "ecb_cbc_helpers.h" @@ -107,10 +109,10 @@ static bool is_blacklisted_cpu(void) if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) return false; - if (boot_cpu_data.x86 == 0x06 && - (boot_cpu_data.x86_model == 0x1c || - boot_cpu_data.x86_model == 0x26 || - boot_cpu_data.x86_model == 0x36)) { + switch (boot_cpu_data.x86_vfm) { + case INTEL_ATOM_BONNELL: + case INTEL_ATOM_BONNELL_MID: + case INTEL_ATOM_SALTWELL: /* * On Atom, twofish-3way is slower than original assembler * implementation. Twofish-3way trades off some performance in -- 2.44.0