Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp856713pxb; Sat, 16 Jan 2021 09:20:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJygMrW5+kcUhhc2+aj53o6jAPqdg6KVe+nif8DH2CziZ2o2FTLvcZVh3yWNeHHgY9wA31uF X-Received: by 2002:a17:906:c254:: with SMTP id bl20mr12426446ejb.336.1610817628689; Sat, 16 Jan 2021 09:20:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610817628; cv=none; d=google.com; s=arc-20160816; b=iAFpATl5oydm9sJr6HPXGogDB90O7axxkuZxG0V8CJtD9S4o4jU5Aa1oB8aWbzAEaL sCi4XhwA1bhtXLmc7zQVO/sow0X43YYh6r8X8WaCfM8d+lK/D5cjYlYpgvcnBEtSGTX9 RAsflLliu72fIcs3p8twmcqmwzldIA8BSxhJ0oMZISU5U8InwcgC2kupkLyCBPA/Hkr9 a/nQLHmO64MG+Am3L7doKjpoxdRSoyAgPv22ovXLCQyPdq3KT3f5xg6wUBM8bYoL8frx eKOVWiBHvnov33fH6PAMqUp8VIULyAaSU4m5QQzLZdWySUXsLzJ1SUW9yszybupNZHAe SA6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bpjKX08TY09Q5bvgC4IE0I43XWEJJ93qH6RBWET84B0=; b=pnAshHf5wV/b89LsDs2fdDMH7zpO4IREk5OlJ0RdPPGu+g2e/kug+vv53AK0WipcAh uLxGsXtDKB4N5jVHpL6bjMSEKKGNsI36F6vyUgfRGWzBrdNTAbNrYyizwkwpzK5kpiMb HcdZ0C35eJtiInp3cOpMZL9lTutX3neiVGP7puFCITw0xSedl80oH6XJcmyp9BlQph6p Ozj+rOuuAHy+yV8n7D4hb6X9F6elApbu34tuczWjTdFXwykllPu1aput4IIcaknLUUsM dkJuvw6YG5Af5lpqL8k2ZMXUNiA1156obAMDxhqbgl8owZ6Db4iojwUpIn+/jqCOTSv1 d5xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hpzZdlJm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc8si5112334ejb.346.2021.01.16.09.20.09; Sat, 16 Jan 2021 09:20:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hpzZdlJm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727089AbhAPRUH (ORCPT + 99 others); Sat, 16 Jan 2021 12:20:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:33412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726989AbhAPRUG (ORCPT ); Sat, 16 Jan 2021 12:20:06 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E93DD23382; Sat, 16 Jan 2021 16:54:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610816090; bh=aAxYMVAsUeoF4CVOhIXaZwp2MvSPjBImiW+eo3kDHKY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hpzZdlJminatwp9JlZypGE4aZswa0ekU4lJxAwzWsZI5nyCVauje3JGx1zQwZhNIU W0Mpd1jewzuL5AoV1PLvn6J9FUyw3rI24ROFETqiysFM/1wwASQ75IDVyrwr4NvUAU PoVSYOfdmrcuH51Dybs6CsTgpxq4QUg1fNn+wQHbXjSk2DBxOJxE0ww4ZlNU5af0IC pkI2VxQFSK7C77gIDZ7RikGZeqXCijpkDUFqLBNGcmPdDYnMbD2hFF5SMOcTpZyu3B pmymqh0QPRGj3AY1SJfOlzkLl0i+N17305dvfKPDUETywqmjTOYfiQ1gnyxCAu2K0A jAyQl/sJR3G/A== Received: by mail-ot1-f46.google.com with SMTP id d8so11871539otq.6; Sat, 16 Jan 2021 08:54:49 -0800 (PST) X-Gm-Message-State: AOAM530nwVCXRjcpaHBxpKYCZ/dh2FElY3m8GtnNKdlEtJA421p5VZ8Q vP72nJXYPdM7VOilnqHetOJCHRvB8RpdMTVao4s= X-Received: by 2002:a05:6830:1c24:: with SMTP id f4mr12134380ote.108.1610816089305; Sat, 16 Jan 2021 08:54:49 -0800 (PST) MIME-Version: 1.0 References: <1608325864-4033-1-git-send-email-megha.dey@intel.com> <1608325864-4033-2-git-send-email-megha.dey@intel.com> In-Reply-To: <1608325864-4033-2-git-send-email-megha.dey@intel.com> From: Ard Biesheuvel Date: Sat, 16 Jan 2021 17:54:38 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC V1 1/7] x86: Probe assembler capabilities for VAES and VPLCMULQDQ support To: Megha Dey Cc: Herbert Xu , "David S. Miller" , Linux Crypto Mailing List , Linux Kernel Mailing List , ravi.v.shankar@intel.com, tim.c.chen@intel.com, andi.kleen@intel.com, Dave Hansen , wajdi.k.feghali@intel.com, greg.b.tucker@intel.com, robert.a.kasten@intel.com, rajendrakumar.chinnaiyan@intel.com, tomasz.kantecki@intel.com, ryan.d.saffores@intel.com, ilya.albrekht@intel.com, kyung.min.park@intel.com, Tony Luck , ira.weiny@intel.com, X86 ML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, 18 Dec 2020 at 22:07, Megha Dey wrote: > > This is a preparatory patch to introduce the optimized crypto algorithms > using AVX512 instructions which would require VAES and VPLCMULQDQ support. > > Check for VAES and VPCLMULQDQ assembler support using AVX512 registers. > > Cc: x86@kernel.org > Signed-off-by: Megha Dey > --- > arch/x86/Kconfig.assembler | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/x86/Kconfig.assembler b/arch/x86/Kconfig.assembler > index 26b8c08..9ea0bc8 100644 > --- a/arch/x86/Kconfig.assembler > +++ b/arch/x86/Kconfig.assembler > @@ -1,6 +1,16 @@ > # SPDX-License-Identifier: GPL-2.0 > # Copyright (C) 2020 Jason A. Donenfeld . All Rights Reserved. > > +config AS_VAES_AVX512 > + def_bool $(as-instr,vaesenc %zmm0$(comma)%zmm1$(comma)%zmm1) && 64BIT Is the '&& 64BIT' necessary here, but not below? In any case, better to use a separate 'depends on' line, for legibility > + help > + Supported by binutils >= 2.30 and LLVM integrated assembler > + > +config AS_VPCLMULQDQ > + def_bool $(as-instr,vpclmulqdq \$0$(comma)%zmm2$(comma)%zmm6$(comma)%zmm4) > + help > + Supported by binutils >= 2.30 and LLVM integrated assembler > + > config AS_AVX512 > def_bool $(as-instr,vpmovm2b %k1$(comma)%zmm5) > help > -- > 2.7.4 >