Skip to content

Add support for a few Zc* extensions, Zcmop and Zimop

Clément Léger kvm kvm-riscv linux-devicetree linux-doc linux-kselftest linux-riscv lkml 7 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest16 patches 5 repliesApplied 16/16
  2. v616 patches 0 repliesSuperseded
  3. v516 patches 19 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v411 patches15 repliesSuperseded
v311 patches3 repliesSuperseded
v212 patches18 repliesSuperseded
v110 patches13 repliesSuperseded

Changes in v7 from the cover letter

- Rebased on riscv/for-next to fix conflicts

Patches in v7 All 16 applied

#Subject and filesSizeRepliesApplied
1/16dt-bindings: riscv: add Zimop ISA extension descriptionDocumentation/devicetree/bindings/riscv/extensions.yaml+5 -01 replyApplied
2/16riscv: add ISA extension parsing for Zimoparch/riscv/include/asm/hwcap.h arch/riscv/kernel/cpufeature.c+2 -00 repliesApplied
3/16riscv: hwprobe: export Zimop ISA extensionDocumentation/arch/riscv/hwprobe.rst arch/riscv/include/uapi/asm/hwprobe.h arch/riscv/kernel/sys_hwprobe.c+6 -00 repliesApplied
4/16RISC-V: KVM: Allow Zimop extension for Guest/VMarch/riscv/include/uapi/asm/kvm.h arch/riscv/kvm/vcpu_onereg.c+3 -00 repliesApplied
5/16KVM: riscv: selftests: Add Zimop extension to get-reg-list testtools/testing/selftests/kvm/riscv/get-reg-list.c+4 -00 repliesApplied
6/16dt-bindings: riscv: add Zca, Zcf, Zcd and Zcb ISA extension descriptionDocumentation/devicetree/bindings/riscv/extensions.yaml+78 -00 repliesApplied
7/16riscv: add ISA extensions validation callbackarch/riscv/include/asm/cpufeature.h arch/riscv/kernel/cpufeature.c+136 -850 repliesApplied
8/16riscv: add ISA parsing for Zca, Zcf, Zcd and Zcbarch/riscv/include/asm/hwcap.h arch/riscv/kernel/cpufeature.c+58 -13 repliesApplied
9/16riscv: hwprobe: export Zca, Zcf, Zcd and Zcb ISA extensionsDocumentation/arch/riscv/hwprobe.rst arch/riscv/include/uapi/asm/hwprobe.h arch/riscv/kernel/sys_hwprobe.c+28 -00 repliesApplied
10/16RISC-V: KVM: Allow Zca, Zcf, Zcd and Zcb extensions for Guest/VMarch/riscv/include/uapi/asm/kvm.h arch/riscv/kvm/vcpu_onereg.c+12 -00 repliesApplied
11/16KVM: riscv: selftests: Add some Zc* extensions to get-reg-list testtools/testing/selftests/kvm/riscv/get-reg-list.c+16 -00 repliesApplied
12/16dt-bindings: riscv: add Zcmop ISA extension descriptionDocumentation/devicetree/bindings/riscv/extensions.yaml+12 -00 repliesApplied
13/16riscv: add ISA extension parsing for Zcmoparch/riscv/include/asm/hwcap.h arch/riscv/kernel/cpufeature.c+2 -00 repliesApplied
14/16riscv: hwprobe: export Zcmop ISA extensionDocumentation/arch/riscv/hwprobe.rst arch/riscv/include/uapi/asm/hwprobe.h arch/riscv/kernel/sys_hwprobe.c+6 -01 replyApplied
15/16RISC-V: KVM: Allow Zcmop extension for Guest/VMarch/riscv/include/uapi/asm/kvm.h arch/riscv/kvm/vcpu_onereg.c+3 -00 repliesApplied
16/16KVM: riscv: selftests: Add Zcmop extension to get-reg-list testtools/testing/selftests/kvm/riscv/get-reg-list.c+4 -00 repliesApplied

Reviews trailers per patch

All 16 patches have a Reviewed-by or Acked-by.

PatchCharlie JenkinsAnup PatelConor DooleyEvan Green
1/16R-b A-b
2/16R-b
3/16R-b
4/16R-b A-b
5/16R-b A-b
6/16R-b R-b
7/16R-b
8/16R-b
9/16R-b
10/16R-b A-b
11/16R-b A-b
12/16A-b
13/16R-b R-b
14/16R-b
15/16R-b A-b
16/16R-b A-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 4 reviewers.

Read the v7 thread

Cover letter [PATCH v7 00/16] Add support for a few Zc* extensions, Zcmop and Zimop

Add support for (yet again) more RVA23U64 missing extensions. Add support for Zimop, Zcmop, Zca, Zcf, Zcd and Zcb extensions ISA string parsing, hwprobe and kvm support. Zce, Zcmt and Zcmp extensions have been left out since they target microcontrollers/embedded CPUs and are not needed by RVA23U64.

Since Zc* extensions states that C implies Zca, Zcf (if F and RV32), Zcd (if D), this series modifies the way ISA string is parsed and now does it in two phases. First one parses the string and the second one validates it for the final ISA description.

---

v7:
- Rebased on riscv/for-next to fix conflicts

v6:
- Rebased on riscv/for-next
- Remove ternary operator to use 'if()' instead in extension checks
- v5: https://lore.kernel.org/all/20240517145302.971019-1-cleger at rivosinc.com/

v5:
- Merged in Zimop to avoid any uneeded series dependencies
- Rework dependency resolution loop to loop on source isa first rather than on all extension.
- Disabled extensions in source isa once set in resolved isa
- Rename riscv_resolve_isa() parameters
- v4: https://lore.kernel.org/all/20240429150553.625165-1-cleger at rivosinc.com/

v4:
- Modify validate() callbacks to return 0, -EPROBEDEFER or another error.
- v3: https://lore.kernel.org/all/20240423124326.2532796-1-cleger at rivosinc.com/

v3:
- Fix typo "exists" -> "exist"
- Remove C implies Zca, Zcd, Zcf, dt-bindings rules
- Rework ISA string resolver to handle dependencies
- v2: https://lore.kernel.org/all/20240418124300.1387978-1-cleger at rivosinc.com/

v2:
- Add Zc* dependencies validation in dt-bindings
- v1: https://lore.kernel.org/lkml/20240410091106.749233-1-cleger at rivosinc.com/

Cl?ment L?ger (16):
dt-bindings: riscv: add Zimop ISA extension description
riscv: add ISA extension parsing for Zimop
riscv: hwprobe: export Zimop ISA extension
RISC-V: KVM: Allow Zimop extension for Guest/VM
KVM: riscv: selftests: Add Zimop extension to get-reg-list test
dt-bindings: riscv: add Zca, Zcf, Zcd and Zcb ISA extension
description
riscv: add ISA extensions validation callback
riscv: add ISA parsing for Zca, Zcf, Zcd and Zcb
riscv: hwprobe: export Zca, Zcf, Zcd and Zcb ISA extensions
RISC-V: KVM: Allow Zca, Zcf, Zcd and Zcb extensions for Guest/VM
KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test
dt-bindings: riscv: add Zcmop ISA extension description
riscv: add ISA extension parsing for Zcmop
riscv: hwprobe: export Zcmop ISA extension
RISC-V: KVM: Allow Zcmop extension for Guest/VM
KVM: riscv: selftests: Add Zcmop extension to get-reg-list test

 Documentation/arch/riscv/hwprobe.rst          |  28 ++
 .../devicetree/bindings/riscv/extensions.yaml |  95 ++++++
 arch/riscv/include/asm/cpufeature.h           |   1 +
 arch/riscv/include/asm/hwcap.h                |   6 +
 arch/riscv/include/uapi/asm/hwprobe.h         |   6 +
 arch/riscv/include/uapi/asm/kvm.h             |   6 +
 arch/riscv/kernel/cpufeature.c                | 277 ++++++++++++------
 arch/riscv/kernel/sys_hwprobe.c               |   6 +
 arch/riscv/kvm/vcpu_onereg.c                  |  12 +
 .../selftests/kvm/riscv/get-reg-list.c        |  24 ++
 10 files changed, 375 insertions(+), 86 deletions(-)
Signature · 1 line
2.45.2