Skip to content

Add Zilsd/Zclsd support in hwprobe and KVM#305

Open
uestc-gr wants to merge 5 commits into
RVCK-Project:rvck-6.6from
uestc-gr:Zilsd
Open

Add Zilsd/Zclsd support in hwprobe and KVM#305
uestc-gr wants to merge 5 commits into
RVCK-Project:rvck-6.6from
uestc-gr:Zilsd

Conversation

@uestc-gr

Copy link
Copy Markdown
Contributor

issues: #304

为已批准的 RISC-V ISA 扩展 Zilsd(Load/Store pair)和 Zclsd(Compressed Load/Store pair)添加内核支持,使用户空间(如 glibc)能够通过 hwprobe 和运行时检测机制发现并使用这些扩展。

所有补丁均来自L0社区,并自测通过

测试方法
在qemu11.0上启动一个32bit的虚拟机(-cpu rv32,v=true,f=on,zilsd=on,zclsd=off )

cat /proc/cpuinfo
processor : 0
hart : 32
isa : rv32imafdcvh_zicbom_zicbop_zicboz_ziccrse_zicntr_zicsr_zifencei_zihintntl_zihintpause_zihpm_zaamo_zalrsc_zawrs_zfa_zca_zcd_zilsd_zba_zbb_zbc_zbs_zve32f_zve32x_smaia_ssaia_sstc_svadu_svvptc
mmu : sv32
mvendorid : 0x0
marchid : 0x0
mimpid : 0x0
hart isa : rv32imafdcvh_zicbom_zicbop_zicboz_ziccrse_zicntr_zicsr_zifencei_zihintntl_zihintpause_zihpm_zaamo_zalrsc_zawrs_zfa_zca_zcd_zilsd_zba_zbb_zbc_zbs_zve32f_zve32x_smaia_ssaia_sstc_svadu_svvptc

~ # hwprobe
TAP version 13
1..5
ok 1 NULL CPU set
ok 2 Bad CPU set
ok 3 NULL CPU set with non-zero size
ok 4 Existing key is maintained
ok 5 Unknown key overwritten with -1 and doesn't block other elements

Totals: pass:5 fail:0 xfail:0 xpass:0 skip:0 error:0

wpcwzy added 5 commits June 10, 2026 14:16
mainline inclusion
from mainline-6.19-rc2
commit 4115155
category: feature
bugzilla: RVCK-Project#304

--------------------------------

Add descriptions for the Zilsd (Load/Store pair instructions) and
Zclsd (Compressed Load/Store pair instructions) ISA extensions
which were ratified in commit f88abf1 ("Integrating load/store
pair for RV32 with the main manual") of the riscv-isa-manual.

Signed-off-by: Pincheng Wang <pincheng.plct@isrc.iscas.ac.cn>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20250826162939.1494021-2-pincheng.plct@isrc.iscas.ac.cn
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
mainline inclusion
from mainline-6.19-rc2
commit 3f0cbfb
category: feature
bugzilla: RVCK-Project#304

--------------------------------

Add parsing for Zilsd and Zclsd ISA extensions which were ratified in
commit f88abf1 ("Integrating load/store pair for RV32 with the
main manual") of the riscv-isa-manual.

Signed-off-by: Pincheng Wang <pincheng.plct@isrc.iscas.ac.cn>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Link: https://patch.msgid.link/20250826162939.1494021-3-pincheng.plct@isrc.iscas.ac.cn
[pjw@kernel.org: cleaned up checkpatch issues, whitespace; updated to apply]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
mainline inclusion
from mainline-6.19-rc2
commit 6118ebe
category: feature
bugzilla: RVCK-Project#304

--------------------------------

Export Zilsd and Zclsd ISA extensions through hwprobe.

Signed-off-by: Pincheng Wang <pincheng.plct@isrc.iscas.ac.cn>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Link: https://patch.msgid.link/20250826162939.1494021-4-pincheng.plct@isrc.iscas.ac.cn
[pjw@kernel.org: fixed whitespace; updated to apply]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
mainline inclusion
from mainline-6.19-rc2
commit f326e84
category: feature
bugzilla: RVCK-Project#304

--------------------------------

Extend the KVM ISA extension ONE_REG interface to allow KVM user space
to detect and enable Zilsd and Zclsd extensions for Guest/VM.

Signed-off-by: Pincheng Wang <pincheng.plct@isrc.iscas.ac.cn>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250826162939.1494021-5-pincheng.plct@isrc.iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
…test

mainline inclusion
from mainline-6.19-rc2
commit ab2a7b7
category: feature
bugzilla: RVCK-Project#304

--------------------------------

The KVM RISC-V allows Zilsd and Zclsd extensions for Guest/VM so add
this extension to get-reg-list test.

Signed-off-by: Pincheng Wang <pincheng.plct@isrc.iscas.ac.cn>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250826162939.1494021-6-pincheng.plct@isrc.iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/27261703212

参数解析结果
args value
repository RVCK-Project/rvck
head ref pull/305/head
base ref rvck-6.6
LAVA repo RVCK-Project/lavaci
LAVA hardware ['qemu']
LAVA Testcase path lava-testcases/common-test/ltp/ltp.yaml
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:
check result
kunit-test success
kernel-build success
check-patch success
lava-trigger-qemu success
lava-trigger-sg2042 skipped
lava-trigger-k1 skipped
lava-trigger-lpi4a skipped

Kunit Test Result

[07:58:42] Testing complete. Ran 482 tests: passed: 466, skipped: 16

Kernel Build Result

Check Patch Result

Total Errors 0
Total Warnings 5

LAVA Check (qemu)

args value
testcase_repo RVCK-Project/lavaci
lava_template lava-job-template/qemu/qemu-ltp.yaml
testcase_path lava-testcases/common-test/ltp/ltp.yaml
kernel_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck/305_27261703212_1/Image
initramfs_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck/305_27261703212_1/initramfs.img
rootfs_download_url https://fast-mirror.isrc.ac.cn/openeuler-sig-riscv/openEuler-RISC-V/RVCK/openEuler24.03-LTS-SP1/openeuler-rootfs.img.zst
testcase_ref main
testitem_name RVCK-Project_rvck_pull_request_target_305__common-test_qemu

result: Lava check done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants