Message ID | 20250312-abide-pancreas-3576b8c44d2c@spud (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A5B6C28B2F for <linux-riscv@archiver.kernel.org>; Wed, 12 Mar 2025 13:41:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=D1K2c2nlyaj0k304VPMFuEIkBxA8UapkH1Lscldd5Sc=; b=mnbOS7mvrxe7s4 aCp6KP9VKJFnVITDwOlC8ohvuFjrbv6SmR26TRnnQDEj0+h+NcOgeoZMuau30FF6r8TyFWjhBqbBP WNJ23i7mKuuxp0T4jSQCmEQ6cydPmFw8PciKfyfNl9tFtnzHytd0CKaECAkNQwUaGxBS6ru6G6A6L B5dLgAbByQp0a4Di24M0nZlK/M82g87BZ379G7Lps+MgIvnobdITPui/xMA+/AVmQVVJiGY6JFwnO 7Er2Bg58Dpm4qu+5VpdeBt33PFPT8D8yAtIj8IfDV+zHlgWHXrVX/M/PQCTnyZon8R+PzjzXfE5oy nALfJjrwK/9vGcas9h9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsMKV-00000008bAe-13C9; Wed, 12 Mar 2025 13:41:03 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsLsv-00000008X20-3wDD for linux-riscv@lists.infradead.org; Wed, 12 Mar 2025 13:12:35 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 4049CA40AF9; Wed, 12 Mar 2025 13:07:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82DC2C4CEE3; Wed, 12 Mar 2025 13:12:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741785152; bh=Nb2EwrGaRlhLj2cZ1F+XA6Qs+Czq/zIJZZeXSvObuTE=; h=From:To:Cc:Subject:Date:From; b=Wn7H+CKup/hxhFVUW8COsYMrIGFjrC5FGpDmyoRDZpoMK27/PtgGWIYsYsf4gBdbb H124ET3VmW2meXGlgvtdyiSjejGD23jmdGTOueWHwbFX13y9pkalTKjZRX8yoh6hUw FsV6dlYMoR2v2xjSok3U21FGK387nbA9yLkr0yzqr04ns++R39fubbWItiPdtXYS9W xOZU2lQj+gO806dVOV54yYZfru96MrkKQsnO/FjxSCT5teVumv6XB76deSzhmxELaA FJ/vD4SkDJHSQACp9YhyiL2xiVnRCGZmPTkt3Tc1bnq8/FA0eOlcTanFeWn7RLWoZn pn/Bf4uET5mYQ== From: Conor Dooley <conor@kernel.org> To: linux-riscv@lists.infradead.org Cc: conor@kernel.org, Conor Dooley <conor.dooley@microchip.com>, Eric Biggers <ebiggers@kernel.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= <cleger@rivosinc.com>, Andy Chiu <andybnac@gmail.com>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/6] Add some validation for vector, vector crypto and fp stuff Date: Wed, 12 Mar 2025 13:11:43 +0000 Message-ID: <20250312-abide-pancreas-3576b8c44d2c@spud> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2355; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=8zYh8ffrjif+99QfRpKCRW9tNgdzrhSzvyJS1+s7Es8=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDOkXO4R8W8+/35Gj1p/BVV2o+yBzXYHg5KucBUFrIi9/+ yJTXnK4o5SFQYyDQVZMkSXxdl+L1Po/Ljuce97CzGFlAhnCwMUpABPx2cbw31NHfMFEganTes+7 7tpSlFoasTTJJo89UbDz6imuXWxBNxgZ3p95/3b7St4tU1vKWUVb9DJOz/W7afB+U847/TNRTsx beQE= X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_061234_109365_28F7ECA9 X-CRM114-Status: GOOD ( 11.25 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-riscv.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-riscv>, <mailto:linux-riscv-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-riscv/> List-Post: <mailto:linux-riscv@lists.infradead.org> List-Help: <mailto:linux-riscv-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-riscv>, <mailto:linux-riscv-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-riscv" <linux-riscv-bounces@lists.infradead.org> Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org |
Series |
Add some validation for vector, vector crypto and fp stuff
|
expand
|
From: Conor Dooley <conor.dooley@microchip.com> Yo, This series is partly leveraging Clement's work adding a validate callback in the extension detection code so that things like checking for whether a vector crypto extension is usable can be done like: has_extension(<vector crypto>) rather than has_vector() && has_extension(<vector crypto>) which Eric pointed out was a poor design some months ago. The rest of this is adding some requirements to the bindings that prevent combinations of extensions disallowed by the ISA. There's a bunch of over-long lines in here, but I thought that the over-long lines were clearer than breaking them up. Cheers, Conor. (I've been unintentionally sitting on this for a month, hope I haven't omitted anything as a result) v4: - Zvbb -> vector_crypto_validate() - remove copy-pasta section of commit messages - Add commentary justifying !EPROBE_DEFER cases - EPROBE_DEFER where possible (one instance, zve32x check) v3: - rebase on v6.14-rc1 - split vector crypto validation patch into vector validation and vector crypto validation - fix zve64x requiring extension list to match Eric's PR v2: - Fix an inverted clause Clément pointed out - Add Zvbb validation, that I had missed accidentally - Drop the todo about checking the number of validation rounds, I tried in w/ qemu's max cpu and things looked right CC: Eric Biggers <ebiggers@kernel.org> CC: Conor Dooley <conor@kernel.org> CC: Rob Herring <robh@kernel.org> CC: Krzysztof Kozlowski <krzk+dt@kernel.org> CC: Paul Walmsley <paul.walmsley@sifive.com> CC: Palmer Dabbelt <palmer@dabbelt.com> CC: "Clément Léger" <cleger@rivosinc.com> CC: Andy Chiu <andybnac@gmail.com> CC: linux-riscv@lists.infradead.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org Conor Dooley (6): RISC-V: add vector extension validation checks RISC-V: add vector crypto extension validation checks RISC-V: add f & d extension validation checks dt-bindings: riscv: d requires f dt-bindings: riscv: add vector sub-extension dependencies dt-bindings: riscv: document vector crypto requirements .../devicetree/bindings/riscv/extensions.yaml | 85 +++++++++++ arch/riscv/include/asm/cpufeature.h | 3 + arch/riscv/kernel/cpufeature.c | 140 +++++++++++++----- 3 files changed, 190 insertions(+), 38 deletions(-)