Skip to content

Add some validation for vector, vector crypto and fp stuff

Conor Dooley linux-devicetree linux-riscv lkml 4 versions – Applied

Status from this message: This series was applied to riscv/linux.git (for-next)

Get series with b4
b4 am 20250312-abide-pancreas-3576b8c44d2c@spud

Versions newest first · linked by author and title

  1. v4 Latest6 patches 4 repliesApplied 6/6
  2. v36 patches 15 repliesSuperseded
  3. v25 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC5 patches10 repliesSuperseded

Changes in v4 from the cover letter

- 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)

Patches in v4 All 6 applied

#Subject and filesSizeRepliesApplied
1/6RISC-V: add vector extension validation checksarch/riscv/include/asm/cpufeature.h arch/riscv/kernel/cpufeature.c+43 -201 replyApplied
2/6RISC-V: add vector crypto extension validation checksarch/riscv/kernel/cpufeature.c+33 -161 replyApplied
3/6RISC-V: add f & d extension validation checksarch/riscv/kernel/cpufeature.c+29 -21 replyApplied
4/6dt-bindings: riscv: d requires fDocumentation/devicetree/bindings/riscv/extensions.yaml+6 -00 repliesApplied
5/6dt-bindings: riscv: add vector sub-extension dependenciesDocumentation/devicetree/bindings/riscv/extensions.yaml+46 -00 repliesApplied
6/6dt-bindings: riscv: document vector crypto requirementsDocumentation/devicetree/bindings/riscv/extensions.yaml+33 -01 replyApplied

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchClément LégerKrzysztof KozlowskiAlexandre Ghiti
1/6R-b
2/6
3/6T-b R-b R-b
4/6R-b A-b
5/6R-b A-b
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/6] Add some validation for vector, vector crypto and fp stuff

From: Conor Dooley <[email protected]>

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 <[email protected]>
CC Conor Dooley <[email protected]>
CC Rob Herring <[email protected]>
CC Krzysztof Kozlowski <[email protected]>
CC Paul Walmsley <[email protected]>
CC Palmer Dabbelt <[email protected]>
CC "Clément Léger" <[email protected]>
CC Andy Chiu <[email protected]>

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(-)
Signature · 1 line
2.45.2