From mboxrd@z Thu Jan 1 00:00:00 1970 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 C6AC91519B1; Wed, 5 Feb 2025 16:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738771696; cv=none; b=U1qnF7qBLPaEu4HcgX5IddcDwTDHedjKKYAvXCM2X+yjM9NLruGCjDHUXF+evlJfcWx8IRThLJ4m2YV2jn8gLCx4sHbnVsXGnNqB5a5n4qGfASmheQOY3+AK3xPecxiqGOlrAexNAgryJ/xuVGQjjlWFrMWqFGW6UT0uXP45EQw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738771696; c=relaxed/simple; bh=vVgyPSLuK8V9Z8ZoAgEifbf+M3HZpZDaonS3lABhZZA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=bG2lEvy0CqlLtI/NAoNhBKO91V9Zi6KZfdtyS4GwLcDlooc6TWpfVi0usq0I7HvqFRlLQdlTXB4Ma0esDU5b8fOR/KyjsBOoFIPBZTfYV0QjJf6pQHtX7mx91+F8z+M4DCyOERKnQKWu/0Lk39x7iGo4MA8qem4vFctoL1m+qUo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=siNjltJ3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="siNjltJ3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2F42C4CED1; Wed, 5 Feb 2025 16:08:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738771695; bh=vVgyPSLuK8V9Z8ZoAgEifbf+M3HZpZDaonS3lABhZZA=; h=From:To:Cc:Subject:Date:From; b=siNjltJ3eiZzPl4eC+FZjpQopN9cXA5U6Wy+AtzLimxR+YRrGiPlN11BZhluCbtyT ZQHvsB+LpSLHMQBaizS9R1cIG0G9TDNxiAfwoykC3y8NsSJWcEQL9g6Hk6y6xX1nwI emjZnHbUlz2zioORAvQ8Y2rPxg11jtBYOFlBwj4jeajrwgcYvu3tpBLPKPM8F6q+hE 1MxEUeZBch1jkIIExxHlj8yDFO4wspGzU4GQ7wUk1ObC+Dnjgro8Vm75u1s6eDhcfu 0kx8DlSh+IJuhRAhhzGrNQnCjeI7nP7GMnlVYyQ8xU4NcAT8FDKfRQ8OsHc6uR0xrM uCcvlupTgZrvQ== From: Conor Dooley To: linux-riscv@lists.infradead.org Cc: conor@kernel.org, Conor Dooley , Eric Biggers , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Andy Chiu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/6] Add some validation for vector, vector crypto and fp stuff Date: Wed, 5 Feb 2025 16:05:06 +0000 Message-ID: <20250205-cobbler-unpadded-5580c1f5d946@spud> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=2079; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=kEfjLL/AKQiPww/DgCF2YWb+qxGGMYe1F7o2flNSwO0=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDOmLe8wCBZcIcX04ktn7hPfcxw9bHRUXnXxqvpfZbe7mU 4eUW+fe7ihlYRDjYJAVU2RJvN3XIrX+j8sO5563MHNYmUCGMHBxCsBEJnIxMpyWvxoQfi/i7U+u KgkVK9kdToWhZx+u3bb1kOQuqds7u4UYfrPLTZhkF3LfySPAUUzgiFW86nS2oBAdNpeM6uK8Jwl CjAA= X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C Content-Transfer-Encoding: 8bit From: Conor Dooley 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() rather than has_vector() && has_extension() 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. 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 CC: Conor Dooley CC: Rob Herring CC: Krzysztof Kozlowski CC: Paul Walmsley CC: Palmer Dabbelt CC: "Clément Léger" CC: Andy Chiu 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 | 133 +++++++++++++----- 3 files changed, 183 insertions(+), 38 deletions(-) -- 2.45.2