Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2747461lqo; Mon, 20 May 2024 15:51:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWxSPQDE9S5cK2MAgVVjTENNOaTsolop8X/4g85PpXHhPiFZqa4+5JhdzPg9HQdkxmg2JZHf7xFtpNla94TTcPNywa1kl2R0zo/TZXTEw== X-Google-Smtp-Source: AGHT+IF1hQIQAhUj8xgPM71KPBjwu/qYyc8KW60E+qqDLJWjTWktLtH7dVVS5Plzzbb4+vV5Z3Ao X-Received: by 2002:ac8:590e:0:b0:43a:b5e9:7d6 with SMTP id d75a77b69052e-43dfdb4be16mr299745241cf.22.1716245505139; Mon, 20 May 2024 15:51:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716245505; cv=pass; d=google.com; s=arc-20160816; b=F8xz356s1vpouiVhSrz+pgBip4bp+xCp9uZEJ2LyhKn5OjWbjKfiBxqouKKt/S3f5V yvxhewRt2deQRze3I9PwZbuWZbpfkyOMseN7RPbgRmuAX2p7aYaE9Gq/awjAyKw8czdy ZVticW1ntKZDziiJjjfC1jlqQFSkKhqVW08zB3dyfZi4SGW+ZCUElXzTLxBMo3nUxY1M 7HXUJ90au5eKc0oJZ+rDOa/22GwEGyAw9gELu9b20vTWT1/arP51Na9vmtUBb8xq4aM4 bbKwLLYhKHui2cTr/JoN8/zGFl5bKTdkV7NqW/J5XXoenHBueHjhuHzp1rEEG42XxuZ7 qyWg== 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=TQHrAWO28SwI0+QOud3yE3bD5gDMPV1ePNiN/g63CXs=; fh=T26ksdX6UpceKBTmCjnZX4okm/RnV1G8gmRkfePNArg=; b=KP3fCHsVG//NkcER06Ck5aqb6CzPguniOKsJzyuqZ6+Nb3s3tJguC+XaWCmKUMADRE CAzj1ymtIqN7IgM4G80hKGMMdUpnRDQJAk5fDTVsydeeiqJHiZAkVdmEhx9xiRmryM1f s9PYo/r/fNX6Dknke1/+FwlzPJxr3GonfMXjxxXiQb5fWYgzBpXsiYeO9lVb8DcYVlfp LI02pRVTdNk7sb0mYPp5z/w/jX8UG8iyC6eHiGZBRo1v7gq6ZKIcFQTP+yvDNWM0TnB1 kdmZkOBph4kYfUxFf78X0Td0uCM8A4xjp1XtQQzRBdk5bs7jL/Y4J8qoFeXfWH55vo7X lT7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=E3ciYy8L; 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-184257-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184257-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. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43df56cc02fsi264089221cf.644.2024.05.20.15.51.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 15:51:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184257-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=E3ciYy8L; 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-184257-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184257-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 CB35E1C2167E for ; Mon, 20 May 2024 22:51:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25E8613CA8A; Mon, 20 May 2024 22:46:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="E3ciYy8L" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 8873B13A250 for ; Mon, 20 May 2024 22:46:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716245212; cv=none; b=npyGuWqanVzC6UsOi2NesRc1VH1ry0lGiSH0I98S786T2dE/sEiLe92O2151LYa1FWtuuMncR0skMqey6N1QJ8xqVl8wAcnwsOcm2mYswpQhbp5tNI2rRJx2qTGLvc9MMvqutzHyQMDgtnXr9489PUkodUhKnk2J6vKDU/MCs4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716245212; c=relaxed/simple; bh=3WkOU6MGepSbNzlZYklRMkoGMRR4hELasBxQk7ecM/M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OpDel/6lZC//cztkKhZgP4C8zsKGQeM7W+UI+oOmbZM0Rsza7qcJOO3/PiuEcw7q8XN/JJeIrfWqJ8CNcMISU8fnhLy6hDNts8It46ST69QKzWA0j0Szm/0zNem1rqbf7XcuUgBnr73aP6vol6zDieFPwmZTmRqi3DrBry06h2M= 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=E3ciYy8L; arc=none smtp.client-ip=192.198.163.18 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=1716245210; x=1747781210; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3WkOU6MGepSbNzlZYklRMkoGMRR4hELasBxQk7ecM/M=; b=E3ciYy8LjO434GafJB1+ZDV/eSDqUukpZjMeEDGeqbDhubk1G+hdedF4 4f3KOrbFPaGFcndZJyGFDqTTx4I2wEJCx1+OjvFZ0KXygoUA7mvKGy6Ex dOjZa0LxLnBfrxdULEFHyRzD9efyB9mV93vJ1ef98CC0GfpJE4oNeLYEq pzlE6VkTX1JvEBSa8PPGT4TPGZ3ubnBDNidIeswTdzTV7yMOnpklfGuGD xeUYrFV6zDOnsWnr8t7cdGyPxLBaA/xzFvG+UVDxe0NRJlEdA+hpwDhUh /sZI/yamzbQniGaxyvVvwpe2OYT7pccemFwv7zRlKliHZcSox5s+uQQp8 w==; X-CSE-ConnectionGUID: qVZ177c+QKW1SvH2FUoaEQ== X-CSE-MsgGUID: qz9WyzemQqWbnHqxOJ4fiw== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12199806" X-IronPort-AV: E=Sophos;i="6.08,176,1712646000"; d="scan'208";a="12199806" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2024 15:46:38 -0700 X-CSE-ConnectionGUID: jFJhqsSdRmmykK9g8P5rJQ== X-CSE-MsgGUID: 8mxoelrKRayXkmN67REZ2w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,176,1712646000"; d="scan'208";a="32593463" Received: from agluck-desk3.sc.intel.com ([172.25.222.70]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2024 15:46:38 -0700 From: Tony Luck To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "H. Peter Anvin" , "Peter Zijlstra (Intel)" , Uros Bizjak , Rick Edgecombe , Arnd Bergmann , Tony Luck , Mateusz Guzik , Thomas Renninger , Andi Kleen , linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH v6 27/49] crypto: x86/twofish - Switch to new Intel CPU model defines Date: Mon, 20 May 2024 15:45:58 -0700 Message-ID: <20240520224620.9480-28-tony.luck@intel.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240520224620.9480-1-tony.luck@intel.com> References: <20240520224620.9480-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.45.0