Merge patch series "riscv: report more ISA extensions through hwprobe"
authorPalmer Dabbelt <palmer@rivosinc.com>
Thu, 7 Dec 2023 15:33:36 +0000 (07:33 -0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Tue, 12 Dec 2023 23:45:18 +0000 (15:45 -0800)
commitf352a28cc2fb4ee8d08c6a6362c9a861fcc84236
treedfb7ae7cda9afb97284cc286ddfaf245300d56c5
parentb85ea95d086471afb4ad062012a4d73cd328fa86
parent9726acfdfa3bbf324b305e0b32fc028c278f6d43
Merge patch series "riscv: report more ISA extensions through hwprobe"

Clément Léger <cleger@rivosinc.com> says:

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:

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

* b4-shazam-merge:
  dt-bindings: riscv: add Zfa ISA extension description
  riscv: hwprobe: export Zfa ISA extension
  riscv: add ISA extension parsing for Zfa
  dt-bindings: riscv: add Zvfh[min] ISA extension description
  riscv: hwprobe: export Zvfh[min] ISA extensions
  riscv: add ISA extension parsing for Zvfh[min]
  dt-bindings: riscv: add Zihintntl ISA extension description
  riscv: hwprobe: export Zhintntl ISA extension
  riscv: add ISA extension parsing for Zihintntl
  dt-bindings: riscv: add Zfh[min] ISA extensions description
  riscv: hwprobe: export Zfh[min] ISA extensions
  riscv: add ISA extension parsing for Zfh/Zfh[min]
  dt-bindings: riscv: add vector crypto ISA extensions description
  riscv: hwprobe: export vector crypto ISA extensions
  riscv: add ISA extension parsing for vector crypto
  dt-bindings: riscv: add scalar crypto ISA extensions description
  riscv: hwprobe: add support for scalar crypto ISA extensions
  riscv: add ISA extension parsing for scalar crypto
  riscv: hwprobe: export missing Zbc ISA extension
  riscv: add ISA extension parsing for Zbc

Link: https://lore.kernel.org/r/20231114141256.126749-1-cleger@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>