Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp240069lqb; Tue, 16 Apr 2024 14:22:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXpglkGWgBiw5H2QCSSeuYwBcBG720TEoY9tSZzB/uw4OV0kY01m+8Ki/+jiDzrMR7P8xNQbQw5sryXaSo2j1AZPNg643wxMdUZ3JyIjA== X-Google-Smtp-Source: AGHT+IESWNKJ2Ro+eRMuEsRbgVXx3V5PKsPStvQc1wHk8XxbPGuYEIVIf/nh+VrYfo2O1PmxqAmZ X-Received: by 2002:a0c:d983:0:b0:696:a202:5f53 with SMTP id y3-20020a0cd983000000b00696a2025f53mr14090832qvj.49.1713302530068; Tue, 16 Apr 2024 14:22:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713302530; cv=pass; d=google.com; s=arc-20160816; b=Lv/ZDO3pGkFjf0QAak/NRZ5fi59wO1W6LGhDVZO7V1U477kWdtJOVoCoy1WoOckuyw VPVta4ysF7JGYr8Ap6IDVCQKir5r8CqvfCHCCTMpS0LBZjf1/PH8/mjcTR+u7sz5tV7+ d8dEQhSUwscVU8Ct4yfvu3EOYqDrVUuTy1/86hm1OT1Fl93G0UW1IvzmPAF93W4sLbnV MV72IfY/L2CK8RPr0HhgeQD7xBqlbV0BLc4khQSekqJX0pmJUIcB2d6Tpm2ZVE8YrG2R uAVNx8hZFUaOdudjfvUC4KaXv4AzUsop/vAx3wlxWrWZI8D4dPSKp1284s/uJXb3+qZY YIfQ== 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=c8QKstAB6y74XwSf5Qx+Hln6xuG6xfcYUyZ59276ESRMLp4v9RsXoNfpMYGM8fyRxg EMrqmqYwMdiTwC9Zbu4Mq880jwgrw/2hK2wgt5//7lAN2dwcnSvWT2nq8ClX5F7+bbt+ Y20qdatAF+xcYDril8r+3z0Qa4g8tZFrSWrLEDVSI30Ns5j+zWYD3o3r3WsvtiQeMUNZ L2B2ZzkpK5nB/NTDLlqdw2byRt650OCgTc93G08+e4kxFcVfLrwtDus0PizHzgN7jItp VZBuCWm54LoNEXYpyzaGAZeu7DUm/eDN70xgnZS6oJEsoj6RLiN5+IKPAFUD4kRTls6M pmHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GmH6QiZz; 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-147569-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147569-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 ef1-20020a0562140a6100b006992c8b6fb2si13247812qvb.261.2024.04.16.14.22.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 14:22:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147569-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=GmH6QiZz; 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-147569-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147569-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 C158D1C22B31 for ; Tue, 16 Apr 2024 21:21:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C4B2613AA3A; Tue, 16 Apr 2024 21:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GmH6QiZz" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 E38186E5F6 for ; Tue, 16 Apr 2024 21:20:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713302403; cv=none; b=g98N5TLnCe4C/zps98mtzOavLOTowEPe+Dv1k5r5JesApS7l60JyP+g9S5vFM23jooJxpuUqExiOGHzIs4iC9C486nJDrgW+7wmLU7IV5kWAD1Ua76tIvV5PUWvPiMw8JcsPQvU2xC66Tqc1Wxi+SiQaH2GKKJk26JwC8ckpI7M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713302403; c=relaxed/simple; bh=CwybUVe8crx1l4CZK03c9vCx8DvC8Bgt8uPcKdw9g+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t58agEVcTPk5NhdNPwKixgf1AWEuyhac56WoD2iPC2Uwps6pwBBMcyg6+x6MDZPk9Tzwio6DODB/06ABa5J/ecbOZjLqkS7BgrS/x8Gv7KKUZX956KKiFZal5VJnWXTnIjg+sMnUpUhbny2YWsfmLKnEaRYyF9gXxEmICEXmMW4= 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=GmH6QiZz; arc=none smtp.client-ip=198.175.65.13 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=1713302401; x=1744838401; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CwybUVe8crx1l4CZK03c9vCx8DvC8Bgt8uPcKdw9g+E=; b=GmH6QiZzuwu3BkgYxxFBTlF3cqB1Wk9oQagpNQUq9iOC+H6p4uCxwiK4 m4aQzbXdJSQtIMO8QYsT4+cP4h8izoEhsRR+u8tFbWM9BTY2UCctM64yO s8H7GB2wWbJO1IWTNG7vtyjEDC5NgfTVc3cd6RWxjjS5wDI3Nt+/+rkni 9LcUoBpRmvCUzWJYf3Apcdpg4zAJ9y8rbJJg9vGgXMsZu3iuTrsVszqsk SjJu1fTfaQgRiradHb4tWEICP/54obAgtZkGxgQp2HUiVhMq7xpQ5jUwj uCpvx8M2if6pLGK81EdJiWiAwjR/8bnPU3XZrGSSSEDvbZGSjU665NPO8 w==; X-CSE-ConnectionGUID: Hjt1yRTDTz6O0cJpi1azug== X-CSE-MsgGUID: gPeJIVgCT06QdOoUaTYE0Q== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="19914687" X-IronPort-AV: E=Sophos;i="6.07,207,1708416000"; d="scan'208";a="19914687" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2024 14:19:57 -0700 X-CSE-ConnectionGUID: w2qRgShKTTufJxObSaJ2zQ== X-CSE-MsgGUID: YL19oXZbR/i4bqkwfFkLPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,207,1708416000"; d="scan'208";a="22871886" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2024 14:19:57 -0700 From: Tony Luck To: Borislav Petkov Cc: x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v3 05/74] x86/cpu/vfm: Update arch/x86/crypto/twofish_glue_3way.c Date: Tue, 16 Apr 2024 14:19:07 -0700 Message-ID: <20240416211941.9369-6-tony.luck@intel.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240416211941.9369-1-tony.luck@intel.com> References: <20240416211941.9369-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