Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1334180rda; Mon, 23 Oct 2023 09:22:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEyao3enk1GhsWjenmixXebRF4S92TwmqcriIH7ihLZd3Cu2FBjowLP9W52x4xEdiqVwrHV X-Received: by 2002:a17:902:ef92:b0:1ca:b26a:9715 with SMTP id iz18-20020a170902ef9200b001cab26a9715mr6521203plb.6.1698078139964; Mon, 23 Oct 2023 09:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698078139; cv=none; d=google.com; s=arc-20160816; b=F6iixo1AcnQEqBbyR6k6tnuZ91JUCQq6YF6aZmvkBsdTcK9UhGHXHQ+wqGUqeCpzCX UArtS2nQuFQx5mMUyp0r5J5sDIHpnGC5OdlxNd6vjH0k1XbNE7uqQClaJyygDHaIhdvR XMV1o6pnpsycBkt25HagReEmcnui5hmM85+BdEOj/j/f1UOwRCd/My+RPvApFJfWTnxK pl3GVSkGI9GcjeHZqn2ck4cmuOXVMqHMwT8fLnzDMfA0nYMgl74bmjlriMRHFT0bTbmZ e+R0ZQOlFLwX8l03ygNSxPbPngmzOmjFoBaQ/Sgnmn9r7m4JM+Rs0Qg8LFzV74U3xf4B QApQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CvcxBfUwTMvPmDC6TsZGUmIpxz3bHu9zv5qH2J4V6xE=; fh=LKOgaatMymrAI1hXwhdsJM0a1t5ZOur2BKt/SX1r10c=; b=Tkvk/BMnDQiqMcrisRqfvCF5cgO5oWcKpK58UTZR87K5SKzTkB0JSZK4hG9fJXRUag JvNFUvIpZSs/0UW/HgcmDFv7cP7RZqr9O5PiFgjJ4CvBrLVKdZ5K/3THHrhDDGREhNUb tjuq5KHGd+3l92abMUoN/RwMpHkCeRwX/svSMtn/LBuEzvaS/IpkrQCLSrkM4RDLCwRK 5YKthIk8ldRX8d3uSM8KmYPxjdKDqV1rA7xpIuEidRZXLLB45cbZifm4h3XSiLxCi0i7 hxo3EcyWFFUAgzqyTKl1alpTq+XTVU9ISwINBYDFAwA5Tet1+RzzCOmvozr4oymspyjt EQZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="WsdJ0m/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id q9-20020a170902dac900b001c9ca0a03e8si6872088plx.68.2023.10.23.09.22.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 09:22:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="WsdJ0m/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 3AC3D8099241; Mon, 23 Oct 2023 09:22:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231827AbjJWQWK (ORCPT + 99 others); Mon, 23 Oct 2023 12:22:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbjJWQWI (ORCPT ); Mon, 23 Oct 2023 12:22:08 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78C9DC1 for ; Mon, 23 Oct 2023 09:22:06 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2c50ec238aeso50334231fa.0 for ; Mon, 23 Oct 2023 09:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1698078125; x=1698682925; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CvcxBfUwTMvPmDC6TsZGUmIpxz3bHu9zv5qH2J4V6xE=; b=WsdJ0m/9057wlCFWmBJ6lPP86MRukuAKGIeWJGUp4DUjgUpbxGIMUb/sfUpFhglHSO f6VUGRgeBAVGrs04iqxf87cz/NSx+f2XfsuEVQIbxt2oWGgu/5/AaoteU1ZQ6gOr1dUo JEDanuO48q9oEH9gQRUDA7nzSOZq0lAB6g/MxMYMZFuo7ImymieUmO0lcJVeTnT1gWu6 QhbL7TrYKklauvNC7CmTxii9TzxbOk3MYMKvpcaAzqGD3YZ6u+qWROJb1i8wAYoZtEae aIDFPRnV5ocbCRFG1XneochKjDFzO045DGP5Bpcp6PlwnOCJczBJ1bfl/fGPOGe5un4P 255w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698078125; x=1698682925; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CvcxBfUwTMvPmDC6TsZGUmIpxz3bHu9zv5qH2J4V6xE=; b=bnup6tiJodZAlMMrlxq8GmfEHly9XRQAThNbL2PPXo6jv/Ufjuma3ODf6TF+VFXqrT 6lb+xSrz3oqlliSy5892GYZWb2CjHSNDRE0hHj0c+r/eeSfiB4vbic5ijbF2ITd+JxiO 25kiuntVaVr0FXG9UzN9PUVnQ17vW7tC1IsIorKdLsC1VvD/4jbCOxq1wMVr11vbKWMu Df6A8i2hIj7amrUGXMdXg0qWgp6Q70wrhPjFN6M6WfryZcNCNTt5AOtIQBv6DLkn8ezO T9BQ2FQk5e51Z0psNnrNq4agm/Y82pngL2+t5Lz5WQN9B2DnYZ/k7Qr9rRxx3yCVLHJV 9S6Q== X-Gm-Message-State: AOJu0YwaN/oi6sl+IhpaQ3QFM373taoDBCA6j61o/WtPeFa5KpXl3FJM sncraEEgzGUYcKaYpqY/5ZASfq69NOAaPineqyIxF22Ma7rXDajd X-Received: by 2002:a05:651c:1038:b0:2c5:1bd9:f95c with SMTP id w24-20020a05651c103800b002c51bd9f95cmr6122574ljm.53.1698078124702; Mon, 23 Oct 2023 09:22:04 -0700 (PDT) MIME-Version: 1.0 References: <20231017131456.2053396-1-cleger@rivosinc.com> <20231017131456.2053396-3-cleger@rivosinc.com> In-Reply-To: <20231017131456.2053396-3-cleger@rivosinc.com> From: Evan Green Date: Mon, 23 Oct 2023 09:21:28 -0700 Message-ID: Subject: Re: [PATCH v2 02/19] riscv: add ISA extension parsing for scalar crypto To: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Rob Herring , Krzysztof Kozlowski , Albert Ou , Jonathan Corbet , Andrew Jones , Conor Dooley , Samuel Ortiz , Conor Dooley Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Mon, 23 Oct 2023 09:22:17 -0700 (PDT) On Tue, Oct 17, 2023 at 6:15=E2=80=AFAM Cl=C3=A9ment L=C3=A9ger wrote: > > From: Evan Green > > The Scalar Crypto specification defines Zk as a shorthand for the > Zkn, Zkr and Zkt extensions. The same follows for both Zkn, Zks and Zbk, > which are all shorthands for various other extensions. The detailed > breakdown can be found in their dt-binding entries. > > Since Zkn also implies the Zbkb, Zbkc and Zbkx extensions, simply passing > "zk" through a DT should enable all of Zbkb, Zbkc, Zbkx, Zkn, Zkr and Zkt= . > For example, setting the "riscv,isa" DT property to "rv64imafdc_zk" > should generate the following cpuinfo output: > "rv64imafdc_zicntr_zicsr_zifencei_zihpm_zbkb_zbkc_zbkx_zknd_zkne_zknh_zkr= _zkt" > > riscv_isa_ext_data grows a pair of new members, to permit setting the > relevant bits for "bundled" extensions, both while parsing the ISA string > and the new dedicated extension properties > > Co-developed-by: Conor Dooley > Signed-off-by: Conor Dooley > Signed-off-by: Evan Green > Signed-off-by: Cl=C3=A9ment L=C3=A9ger My tree might be out of sync, but in my search for riscv_isa_ext, I also found a use in print_isa() (cpu.c) where we're reaching into riscv_isa_ext[].id and assuming it's always valid. If that's still in there we'll want to fix up that spot too, since now with bundles .id may or may not be valid. -Evan