[PATCH v2 5/5] dt-bindings: riscv: document vector crypto requirements

Conor Dooley posted 5 patches 1 year, 3 months ago
There is a newer version of this series
[PATCH v2 5/5] dt-bindings: riscv: document vector crypto requirements
Posted by Conor Dooley 1 year, 3 months ago
From: Conor Dooley <conor.dooley@microchip.com>

Section 35.2. Extensions Overview of [1] says:
| The Zvknhb and Zvbc Vector Crypto Extensions --and accordingly the composite extensions Zvkn and
| Zvks-- (sic) require a Zve64x base, or application ("V") base Vector Extension.
| All of the other Vector Crypto Extensions can be built on any embedded (Zve*) or application ("V") base
| Vector Extension

Apply these rules in the binding, so that invalid combinations can be
avoided.

Link: https://github.com/riscv/riscv-isa-manual/releases/tag/riscv-isa-release-698e64a-2024-09-09 [1]
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../devicetree/bindings/riscv/extensions.yaml | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml
index 20cead7d8af71..38d77043552a3 100644
--- a/Documentation/devicetree/bindings/riscv/extensions.yaml
+++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
@@ -658,6 +658,38 @@ properties:
             - contains:
                 const: zve64f
 
+      - if:
+          contains:
+            anyOf:
+              - const: zvbc
+              - const: zvkn
+              - const: zvknhb
+              - const: zvks
+        then:
+          contains:
+            anyOf:
+              - const: v
+              - const: zve64x
+
+      - if:
+          contains:
+            anyOf:
+              - const: zvbb
+              - const: zvkb
+              - const: zvkg
+              - const: zvkned
+              - const: zvknha
+              - const: zvksed
+              - const: zvksh
+              - const: zvknc
+              - const: zvkng
+              - const: zvkt
+        then:
+          contains:
+            anyOf:
+              - const: v
+              - const: zve32x
+
 allOf:
   # Zcf extension does not exist on rv64
   - if:
-- 
2.45.2
Re: [PATCH v2 5/5] dt-bindings: riscv: document vector crypto requirements
Posted by Eric Biggers 1 year, 3 months ago
On Thu, Oct 24, 2024 at 01:34:33PM +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> Section 35.2. Extensions Overview of [1] says:
> | The Zvknhb and Zvbc Vector Crypto Extensions --and accordingly the composite extensions Zvkn and
> | Zvks-- (sic) require a Zve64x base, or application ("V") base Vector Extension.
> | All of the other Vector Crypto Extensions can be built on any embedded (Zve*) or application ("V") base
> | Vector Extension
> 
> Apply these rules in the binding, so that invalid combinations can be
> avoided.

It looks like that part of the spec is wrong, though.  The Zvknhb and Zvbc are
correct, but the list of the composite extensions that at least one of them is
included in is: Zvkn, Zvknc, Zvkng, Zvksc.

- Eric
Re: [PATCH v2 5/5] dt-bindings: riscv: document vector crypto requirements
Posted by Eric Biggers 1 year, 3 months ago
On Thu, Oct 24, 2024 at 07:24:11PM -0700, Eric Biggers wrote:
> On Thu, Oct 24, 2024 at 01:34:33PM +0100, Conor Dooley wrote:
> > From: Conor Dooley <conor.dooley@microchip.com>
> > 
> > Section 35.2. Extensions Overview of [1] says:
> > | The Zvknhb and Zvbc Vector Crypto Extensions --and accordingly the composite extensions Zvkn and
> > | Zvks-- (sic) require a Zve64x base, or application ("V") base Vector Extension.
> > | All of the other Vector Crypto Extensions can be built on any embedded (Zve*) or application ("V") base
> > | Vector Extension
> > 
> > Apply these rules in the binding, so that invalid combinations can be
> > avoided.
> 
> It looks like that part of the spec is wrong, though.  The Zvknhb and Zvbc are
> correct, but the list of the composite extensions that at least one of them is
> included in is: Zvkn, Zvknc, Zvkng, Zvksc.
> 

I am attempting to fix this in
https://github.com/riscv/riscv-isa-manual/pull/1697

- Eric
Re: [PATCH v2 5/5] dt-bindings: riscv: document vector crypto requirements
Posted by Conor Dooley 1 year, 3 months ago
On Thu, Oct 24, 2024 at 07:42:24PM -0700, Eric Biggers wrote:
> On Thu, Oct 24, 2024 at 07:24:11PM -0700, Eric Biggers wrote:
> > On Thu, Oct 24, 2024 at 01:34:33PM +0100, Conor Dooley wrote:
> > > From: Conor Dooley <conor.dooley@microchip.com>
> > > 
> > > Section 35.2. Extensions Overview of [1] says:
> > > | The Zvknhb and Zvbc Vector Crypto Extensions --and accordingly the composite extensions Zvkn and
> > > | Zvks-- (sic) require a Zve64x base, or application ("V") base Vector Extension.
> > > | All of the other Vector Crypto Extensions can be built on any embedded (Zve*) or application ("V") base
> > > | Vector Extension
> > > 
> > > Apply these rules in the binding, so that invalid combinations can be
> > > avoided.
> > 
> > It looks like that part of the spec is wrong, though.  The Zvknhb and Zvbc are
> > correct, but the list of the composite extensions that at least one of them is
> > included in is: Zvkn, Zvknc, Zvkng, Zvksc.
> > 
> 
> I am attempting to fix this in
> https://github.com/riscv/riscv-isa-manual/pull/1697

Looks like at least one person agrees with you, but I'll wait til that's
merged before submitting another version. Thanks for reporting it.
Re: [PATCH v2 5/5] dt-bindings: riscv: document vector crypto requirements
Posted by Charlie Jenkins 1 year ago
On Fri, Oct 25, 2024 at 05:53:49PM +0100, Conor Dooley wrote:
> On Thu, Oct 24, 2024 at 07:42:24PM -0700, Eric Biggers wrote:
> > On Thu, Oct 24, 2024 at 07:24:11PM -0700, Eric Biggers wrote:
> > > On Thu, Oct 24, 2024 at 01:34:33PM +0100, Conor Dooley wrote:
> > > > From: Conor Dooley <conor.dooley@microchip.com>
> > > > 
> > > > Section 35.2. Extensions Overview of [1] says:
> > > > | The Zvknhb and Zvbc Vector Crypto Extensions --and accordingly the composite extensions Zvkn and
> > > > | Zvks-- (sic) require a Zve64x base, or application ("V") base Vector Extension.
> > > > | All of the other Vector Crypto Extensions can be built on any embedded (Zve*) or application ("V") base
> > > > | Vector Extension
> > > > 
> > > > Apply these rules in the binding, so that invalid combinations can be
> > > > avoided.
> > > 
> > > It looks like that part of the spec is wrong, though.  The Zvknhb and Zvbc are
> > > correct, but the list of the composite extensions that at least one of them is
> > > included in is: Zvkn, Zvknc, Zvkng, Zvksc.
> > > 
> > 
> > I am attempting to fix this in
> > https://github.com/riscv/riscv-isa-manual/pull/1697
> 
> Looks like at least one person agrees with you, but I'll wait til that's
> merged before submitting another version. Thanks for reporting it.

It's been merged now :)

> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v2 5/5] dt-bindings: riscv: document vector crypto requirements
Posted by Conor Dooley 1 year ago
On Fri, Jan 17, 2025 at 04:54:52PM -0800, Charlie Jenkins wrote:
> On Fri, Oct 25, 2024 at 05:53:49PM +0100, Conor Dooley wrote:
> > On Thu, Oct 24, 2024 at 07:42:24PM -0700, Eric Biggers wrote:
> > > On Thu, Oct 24, 2024 at 07:24:11PM -0700, Eric Biggers wrote:
> > > > On Thu, Oct 24, 2024 at 01:34:33PM +0100, Conor Dooley wrote:
> > > > > From: Conor Dooley <conor.dooley@microchip.com>
> > > > > 
> > > > > Section 35.2. Extensions Overview of [1] says:
> > > > > | The Zvknhb and Zvbc Vector Crypto Extensions --and accordingly the composite extensions Zvkn and
> > > > > | Zvks-- (sic) require a Zve64x base, or application ("V") base Vector Extension.
> > > > > | All of the other Vector Crypto Extensions can be built on any embedded (Zve*) or application ("V") base
> > > > > | Vector Extension
> > > > > 
> > > > > Apply these rules in the binding, so that invalid combinations can be
> > > > > avoided.
> > > > 
> > > > It looks like that part of the spec is wrong, though.  The Zvknhb and Zvbc are
> > > > correct, but the list of the composite extensions that at least one of them is
> > > > included in is: Zvkn, Zvknc, Zvkng, Zvksc.
> > > > 
> > > 
> > > I am attempting to fix this in
> > > https://github.com/riscv/riscv-isa-manual/pull/1697
> > 
> > Looks like at least one person agrees with you, but I'll wait til that's
> > merged before submitting another version. Thanks for reporting it.
> 
> It's been merged now :)

Ye, I actually respun this last week, but opted to wait until after the
merge window to send another revision.