devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/19] riscv: report more ISA extensions through hwprobe
@ 2023-10-17 13:14 Clément Léger
  2023-10-17 13:14 ` [PATCH v2 01/19] riscv: hwprobe: factorize hwprobe ISA extension reporting Clément Léger
                   ` (18 more replies)
  0 siblings, 19 replies; 57+ messages in thread
From: Clément Léger @ 2023-10-17 13:14 UTC (permalink / raw)
  To: linux-riscv, devicetree, linux-kernel, linux-doc
  Cc: Clément Léger, Palmer Dabbelt, Paul Walmsley,
	Rob Herring, Krzysztof Kozlowski, Albert Ou, Jonathan Corbet,
	Andrew Jones, Evan Green, Conor Dooley, Samuel Ortiz

In order to be able to gather more information about the supported ISA
extensions from userspace using the hwprobe syscall, add more ISA extensions
report. This series adds the following ISA extensions parsing support:

- Zfh[min]
- Zvfh[min]
- Zihintntl
- Zbc
- Zvbb
- Zvbc
- Zvkb
- Zvkg
- Zvkned
- Zvknh[ab]
- Zvksed
- Zvksh
- Zvkn
- Zvknc
- Zvkng
- Zvks
- Zvksc
- Zvksg
- Zvkt
- Zfa
- Zbkb
- Zbkc
- Zbkx
- Zknd
- Zkne
- Zknh
- Zkr
- Zksed
- Zksh
- Zkt

Some of these extensions are actually shorthands for other "sub"
extensions. This series includes a patch from Conor/Evan that adds a way
to specify such "bundled" extensions. When exposing these bundled
extensions to userspace through hwprobe, only the "sub" extensions are
exposed.

In order to test it, one can use qemu and the small hwprobe utility
provided[1]. Run qemu by specifying additional ISA extensions, for
instance:

$ qemu-system-riscv64 -cpu rv64,v=true,zk=true,zvksh=true,zvkned=true
  <whatever options you want>

Then, run hwprobe_dump:

$ ./hwprobe_dump
Base system ISA:
 - IMA_FD
 - C
 - V
Supported extensions:
 - Zba
 - Zbb
 - Zbs
 - Zbc
 - Zbkb
 - Zbkc
 - Zbkx
 - Zknd
 - Zkne
 - Zknh
 - Zkt
 - Zvkned
 - Zvksh
 - Zihintntl
 - Zfa

Link: https://github.com/clementleger/hwprobe_dump [1]

---

Changes in V2:
 - Fix typo in first commit title (fatorize->factorize)
 - Add Zfa support
 - Fix missing uppercase for Zvkt naming in dt-bindings
 - Add Conor Acked-by on dt-bindings commits
 - Add scalar crypto support from Conor/Evan.
 - Use reporting of bunbled extensions for vector crypto

Clément Léger (18):
  riscv: hwprobe: factorize hwprobe ISA extension reporting
  riscv: hwprobe: add support for scalar crypto ISA extensions
  dt-bindings: riscv: add scalar crypto ISA extensions description
  riscv: add ISA extension parsing for vector crypto extensions
  riscv: hwprobe: export vector crypto ISA extensions
  dt-bindings: riscv: add vector crypto ISA extensions description
  riscv: add ISA extension parsing for Zfh/Zfhmin
  riscv: hwprobe: export Zfh/Zfhmin ISA extensions
  dt-bindings: riscv: add Zfh[min] ISA extensions description
  riscv: add ISA extension parsing for Zihintntl
  riscv: hwprobe: export Zhintntl ISA extension
  dt-bindings: riscv: add Zihintntl ISA extension description
  riscv: add ISA extension parsing for Zvfh[min]
  riscv: hwprobe: export Zvfh[min] ISA extensions
  dt-bindings: riscv: add Zvfh[min] ISA extension description
  riscv: add ISA extension parsing for Zfa
  riscv: hwprobe: export Zfa ISA extension
  dt-bindings: riscv: add Zfa ISA extension description

Evan Green (1):
  riscv: add ISA extension parsing for scalar crypto

 .../devicetree/bindings/riscv/extensions.yaml | 210 ++++++++++++++++++
 Documentation/riscv/hwprobe.rst               |  81 +++++++
 arch/riscv/include/asm/hwcap.h                |  33 ++-
 arch/riscv/include/uapi/asm/hwprobe.h         |  26 +++
 arch/riscv/kernel/cpufeature.c                | 165 ++++++++++++--
 arch/riscv/kernel/sys_riscv.c                 |  64 ++++--
 6 files changed, 543 insertions(+), 36 deletions(-)

-- 
2.42.0


^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2023-10-24 18:11 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17 13:14 [PATCH v2 00/19] riscv: report more ISA extensions through hwprobe Clément Léger
2023-10-17 13:14 ` [PATCH v2 01/19] riscv: hwprobe: factorize hwprobe ISA extension reporting Clément Léger
2023-10-18 17:24   ` Evan Green
2023-10-18 17:33     ` Conor Dooley
2023-10-18 17:36       ` Conor Dooley
2023-10-18 17:45         ` Evan Green
2023-10-19  9:46           ` Clément Léger
2023-10-19 10:24             ` Conor Dooley
2023-10-19 15:58               ` Evan Green
2023-10-19  7:26         ` Clément Léger
2023-10-19 10:22           ` Conor Dooley
2023-10-19 12:29             ` Clément Léger
2023-10-20 10:27             ` Andrew Jones
2023-10-17 13:14 ` [PATCH v2 02/19] riscv: add ISA extension parsing for scalar crypto Clément Léger
2023-10-23 16:21   ` Evan Green
2023-10-24  7:18     ` Clément Léger
2023-10-24  9:30       ` Clément Léger
2023-10-24 16:37         ` Evan Green
2023-10-24 18:11           ` Clément Léger
2023-10-17 13:14 ` [PATCH v2 03/19] riscv: hwprobe: add support for scalar crypto ISA extensions Clément Léger
2023-10-18 17:24   ` Evan Green
2023-10-19  7:21     ` Clément Léger
2023-10-17 13:14 ` [PATCH v2 04/19] dt-bindings: riscv: add scalar crypto ISA extensions description Clément Léger
2023-10-17 13:14 ` [PATCH v2 05/19] riscv: add ISA extension parsing for vector crypto extensions Clément Léger
2023-10-18  1:45   ` Jerry Shih
2023-10-18 12:52     ` Clément Léger
2023-10-18 17:26       ` Evan Green
2023-10-19  9:35         ` Clément Léger
2023-10-19 15:33           ` Conor Dooley
2023-10-19 16:19             ` Evan Green
2023-10-23  7:24               ` Clément Léger
2023-10-23 16:18                 ` Evan Green
2023-10-20  2:43           ` Jerry Shih
2023-10-23  7:14             ` Clément Léger
2023-10-17 13:14 ` [PATCH v2 06/19] riscv: hwprobe: export vector crypto ISA extensions Clément Léger
2023-10-18 17:27   ` Evan Green
2023-10-17 13:14 ` [PATCH v2 07/19] dt-bindings: riscv: add vector crypto ISA extensions description Clément Léger
2023-10-17 13:14 ` [PATCH v2 08/19] riscv: add ISA extension parsing for Zfh/Zfhmin Clément Léger
2023-10-18 17:28   ` Evan Green
2023-10-17 13:14 ` [PATCH v2 09/19] riscv: hwprobe: export Zfh/Zfhmin ISA extensions Clément Léger
2023-10-18 17:28   ` Evan Green
2023-10-17 13:14 ` [PATCH v2 10/19] dt-bindings: riscv: add Zfh[min] ISA extensions description Clément Léger
2023-10-17 13:14 ` [PATCH v2 11/19] riscv: add ISA extension parsing for Zihintntl Clément Léger
2023-10-18 17:28   ` Evan Green
2023-10-17 13:14 ` [PATCH v2 12/19] riscv: hwprobe: export Zhintntl ISA extension Clément Léger
2023-10-18 17:28   ` Evan Green
2023-10-17 13:14 ` [PATCH v2 13/19] dt-bindings: riscv: add Zihintntl ISA extension description Clément Léger
2023-10-17 13:14 ` [PATCH v2 14/19] riscv: add ISA extension parsing for Zvfh[min] Clément Léger
2023-10-18 17:28   ` Evan Green
2023-10-17 13:14 ` [PATCH v2 15/19] riscv: hwprobe: export Zvfh[min] ISA extensions Clément Léger
2023-10-18 17:28   ` Evan Green
2023-10-17 13:14 ` [PATCH v2 16/19] dt-bindings: riscv: add Zvfh[min] ISA extension description Clément Léger
2023-10-17 13:14 ` [PATCH v2 17/19] riscv: add ISA extension parsing for Zfa Clément Léger
2023-10-18 17:28   ` Evan Green
2023-10-17 13:14 ` [PATCH v2 18/19] riscv: hwprobe: export Zfa ISA extension Clément Léger
2023-10-18 17:28   ` Evan Green
2023-10-17 13:14 ` [PATCH v2 19/19] dt-bindings: riscv: add Zfa ISA extension description Clément Léger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).