Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp582242rdb; Thu, 21 Dec 2023 20:52:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3hTx5N7icYyMNsvavv3pYW0p84r9wca1hlP46YbwId0RiMopw5b3o3+u0BmAj+CayxEpo X-Received: by 2002:ae9:c118:0:b0:781:25aa:21fd with SMTP id z24-20020ae9c118000000b0078125aa21fdmr847082qki.72.1703220758360; Thu, 21 Dec 2023 20:52:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703220758; cv=none; d=google.com; s=arc-20160816; b=NgtZv0VQ2UovCMTH1qMkkDWzhdZu93rW+12tFUapG2GCtIbQUwFFXqSZid0Qy9072S S4suki/RTlaENLoZLHT/6QxE8K9fOJi19xLhCRSvcKNyvMgACgh4gGd/QKZTCCH4lwnC +Xkmy0H8AokF8bFOYlVdMwFAw8LpE3WxsqVc9fYiYJ40Jqx90b8rZAK/zpkpn58IW2Wt aIBptopWsSruG2zzk+KhtrO9NwnT1NxTBiGtJJ93m72IpSqlMd4HHgXHbGQPSolAgVJO mmqhjO25WuiqVJjg7w7+N2WL1U78YteaihbgyQ1DtXFSvXo2sILSCvmMogk89E4d4wwb o5cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XerlMiLNm3qYnJQwZjWfznRVCZw7eCuaUMtiiNbM9Uc=; fh=CRDC8CWdXgnNsGVBUkMcReuYEzqk/+PItinw5bBH6JE=; b=qYiSujHROssNeeKcfxUhi2p726AyRJWMN4Uroa58y6AVbYlEB3KeQdQLB5n9v1zJ4X 4Ejo3vEyOjOXn5OPZB3vopVFUNEe5g4yTKDfhVQAOuUYTK2QCnd3vDfy80C4yojrS42L d5VTDdewX5IsXJEc3/06jiyB1vqcpO4nVX0jirJAda8s99Sp5KIgvlNzxb9Iz3VJ48Bt IVsrApmUGTc5CjSkYhvzVsuDua1RpXbUnlmIIpBS+g5cCHbFBLxkjwXQAvkmOLxeS9hv 0LMeQsFd+tBkOZvxr8rSXeuWjcMVWeriYM2Oda3U2j6V2JwQjRXhMNwYkri08BLY6shP EEnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Rw/ooVov"; spf=pass (google.com: domain of linux-crypto+bounces-969-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-969-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j6-20020a05620a146600b0077fb4eda1f8si3498328qkl.540.2023.12.21.20.52.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 20:52:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-969-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=@kernel.org header.s=k20201202 header.b="Rw/ooVov"; spf=pass (google.com: domain of linux-crypto+bounces-969-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-969-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 D295D1C218EF for ; Fri, 22 Dec 2023 04:52:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D169C53A4; Fri, 22 Dec 2023 04:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Rw/ooVov" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9C929539A for ; Fri, 22 Dec 2023 04:52:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D633CC433C7; Fri, 22 Dec 2023 04:52:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703220753; bh=Mu4nPZC3NYzqa5KLa5exHzdEdFc25nyFrTi4UQ9rNBg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Rw/ooVoveUFs91tCBZEnBnmCofcXiScCjMUoAyRAy77AVQVTAW5nioT+cgXD1L5La btxOLV06PsPckESHWuy8zq5UzZLW+wOhTgA66qlU9HNP37JnHcLx+GnW96Zp/COekT ZH7FInFgsI+bGj7w6mkEtEvhdx5Svg5NAwCgfLzlBFMzrilXzWuECXUWA2pmywpZJ2 rbEDL9FjUbJ6tavkY1MjQqGHHqG6avYpAj6D5FGdp6sGUFw0dzALWNkJ1vhzonTBTX In1nfwt4Cl/Hd+TmYZYVCj3zXAs7VUh0owCcDx3z2Ky8FqtLNRc425L3ixGji+Ueze ZlZ2/y1wtsW9A== Date: Thu, 21 Dec 2023 22:52:27 -0600 From: Eric Biggers To: Jerry Shih Cc: linux-crypto@vger.kernel.org, linux-riscv@lists.infradead.org, Christoph Muellner Subject: Re: [PATCH] crypto: riscv - use real assembler for vector crypto extensions Message-ID: <20231222045227.GA52600@quark.localdomain> References: <20231220065648.253236-1-ebiggers@kernel.org> <3C51992F-B8F8-4023-81EE-3C95102B072A@sifive.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C51992F-B8F8-4023-81EE-3C95102B072A@sifive.com> On Fri, Dec 22, 2023 at 10:15:04AM +0800, Jerry Shih wrote: > On Dec 20, 2023, at 14:56, Eric Biggers wrote: > > From: Eric Biggers > > > > LLVM main and binutils master now both fully support v1.0 of the RISC-V > > vector crypto extensions. Therefore, delete riscv.pm and use the real > > assembler mnemonics for the vector crypto instructions. > > > > Signed-off-by: Eric Biggers > > --- > > > > Hi Jerry, this patch applies to your v3 patchset > > (https://lore.kernel.org/linux-crypto/20231205092801.1335-1-jerry.shih@sifive.com). > > Can you consider folding it into your patchset? Thanks! > > Thank you for the vector crypto asm mnemonics works. > Do you mean that fold this patch or append this one as the separated > commit into my next v4 patchset? Just fold the changes into your individual patches, please. Thanks! > > config TOOLCHAIN_HAS_ZBB > > bool > > default y > > depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb) > > depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb) > > depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900 > > depends on AS_HAS_OPTION_ARCH > > > > +# This option indicates that the toolchain supports all v1.0 vector crypto > > +# extensions, including Zvk*, Zvbb, and Zvbc. LLVM added all of these at once. > > +# binutils added all except Zvkb, then added Zvkb. So we just check for Zvkb. > > +config TOOLCHAIN_HAS_ZVK > > + def_bool $(as-instr, .option arch$(comma) +zvkb) > > + > > Could we rename to other terms like > `TOOLCHAIN_HAS_VECTOR_CRYPTO/TOOLCHAIN_HAS_V_CRYPTO `? > Some ciphers don't use `ZVK*` extensions. Yes, TOOLCHAIN_HAS_VECTOR_CRYPTO sounds good. - Eric