Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2460162rdb; Mon, 20 Nov 2023 11:20:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRPQgnB+vdgriwMs1BWNJvNQTlTc5zgpEKjOfIZBhv/gm2TFpBUROi5oIhotICvtTN3vHe X-Received: by 2002:a05:6a00:ad1:b0:6be:18a9:8f60 with SMTP id c17-20020a056a000ad100b006be18a98f60mr7807847pfl.16.1700508001625; Mon, 20 Nov 2023 11:20:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700508001; cv=none; d=google.com; s=arc-20160816; b=TU2DEEVvggcyamoMJgNAaIRdIfX5uZnjPPzXvI5TheoKJjUGoUE9EYMT67c6wbc7+s hvBWxqVrrnfgbHyOlyB3S29wF/R3fKZl4M7yUxWytD3y++V8pvX+ZW7UcVoq34nWrO73 MArnrlD3eaqIukePxdI+Nl4+5nOdWoujkE5bKGjCHIr9B3px/NRFOQuoJzRLBCb80o7A vc9fM49EsqCZJ1QUCx3KP7EkFvNYG5Tt8ukTyrtzzFxKELtwpGY1H5SU73fz7CcyQAgc Tv2hedf0LHds3h5WqGW1p5Kp02JD3G8LGnddFf/Lk/o9vtBYTGm25lbRL8clB2Qjju7G Ulag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0doU8cOq9kWIDHzzsBfmEcRc4BW9ulxkgrD18RyH89Y=; fh=MHwYAgf5HnsKddKoevs6W+54KYQGcsKCPBzoRF3I4bs=; b=nhff2aDbW8+nc8h48LwGdq4wr+whn+03KoKVs2MDJ3kpgWPFm7fYeuM+JAqGKePmQf R6VZ8hxOFcmSou/2dx83/OmCCDIjUOFZUX+WJcHKFHULKENhd67PXHqq5jdHGMAOdxCU OGqVt1Y0y5CdpRerRSmJeM5l5/SG1e/gFypaNIooBzvYUkmKXdD/JrXTtMe6FXYrL4YF rCRNQCoGTNU6MP53v7p0bkfMMRNc67tl0YOzelOkkAdBoBCZWeZQnZtQr1DX1YnTjiqv tAfBFfasoDrF6KX2NdFjCZNQEfdjlXGW9NOqS2R92IfPR/GoEPOHga7uEDhVkekbLbPg ZYUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nsgSdljj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id j4-20020a056a00130400b006c4ad151a62si8960552pfu.266.2023.11.20.11.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 11:20:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nsgSdljj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D20E6802401A; Mon, 20 Nov 2023 11:19:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231439AbjKTTTJ (ORCPT + 99 others); Mon, 20 Nov 2023 14:19:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232281AbjKTTTD (ORCPT ); Mon, 20 Nov 2023 14:19:03 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC27210E for ; Mon, 20 Nov 2023 11:18:58 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA452C433C8; Mon, 20 Nov 2023 19:18:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700507938; bh=8GrqBpx0HG1TFaZKdiHie469Wi/VanH3SYoEwrBLjtg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nsgSdljj2y1K4QXuI0J47MilWCgnCZU0WD/Xv3w+9CbSg+ZcuApxMhkpOdOZt1BI0 DIjT6Y8bjiNEqkZt1fHfgRZJk+hFhaGhQ6GX0DHgUrEQuVzjCe1ulUo+ORF/SRnv08 Y8i4NUJIxX8INL+TH9feVjcji1HRJ1xb7eMzp64HI/Bel7W4tyPqFAXe0aOu4pvtrc LcmwVK9q+9Gk1bkJkBnmmgNjIHkFyqX0hAlCIRY7KY/6iDAVv27vMul3n1eJwWkI33 fHAIEUPYV2vrgM2nBMzJue2p9Dow8h8rdZu2kJgg2NvmPQQTgYji09NJ/AVoNAO2FG CYORXBPpNN96g== Date: Mon, 20 Nov 2023 11:18:56 -0800 From: Eric Biggers To: Jerry Shih Cc: Paul Walmsley , palmer@dabbelt.com, Albert Ou , herbert@gondor.apana.org.au, davem@davemloft.net, andy.chiu@sifive.com, greentime.hu@sifive.com, conor.dooley@microchip.com, guoren@kernel.org, bjorn@rivosinc.com, heiko@sntech.de, ardb@kernel.org, phoebe.chen@sifive.com, hongrong.hsu@sifive.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: [PATCH 12/12] RISC-V: crypto: add Zvkb accelerated ChaCha20 implementation Message-ID: <20231120191856.GA964@sol.localdomain> References: <20231025183644.8735-1-jerry.shih@sifive.com> <20231025183644.8735-13-jerry.shih@sifive.com> <20231102054327.GH1498@sol.localdomain> <90E2B1B4-ACC1-4316-81CD-E919D3BD03BA@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <90E2B1B4-ACC1-4316-81CD-E919D3BD03BA@sifive.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 11:19:15 -0800 (PST) Hi Jerry! On Mon, Nov 20, 2023 at 10:55:15AM +0800, Jerry Shih wrote: > >> +# - RV64I > >> +# - RISC-V Vector ('V') with VLEN >= 128 > >> +# - RISC-V Vector Cryptography Bit-manipulation extension ('Zvkb') > >> +# - RISC-V Zicclsm(Main memory supports misaligned loads/stores) > > > > How is the presence of the Zicclsm extension guaranteed? > > > > - Eric > > I have the addition extension parser for `Zicclsm` in the v2 patch set. First, I can see your updated patchset at branch "dev/jerrys/vector-crypto-upstream-v2" of https://github.com/JerryShih/linux, but I haven't seen it on the mailing list yet. Are you planning to send it out? Second, with your updated patchset, I'm not seeing any of the RISC-V optimized algorithms be registered when I boot the kernel in QEMU. This is caused by the new check 'riscv_isa_extension_available(NULL, ZICCLSM)' not passing. Is checking for "Zicclsm" the correct way to determine whether unaligned memory accesses are supported? I'm using 'qemu-system-riscv64 -cpu max -machine virt', with the very latest QEMU commit (af9264da80073435), so it should have all the CPU features. - Eric