Skip to content

sync: rvck #231: 【backport】rva23特性的补充,包括zalasr等#220

Merged
xmzzz merged 16 commits into
RVCK-Project:OLK-6.6from
ieiao:PR231@rvck
Apr 30, 2026
Merged

sync: rvck #231: 【backport】rva23特性的补充,包括zalasr等#220
xmzzz merged 16 commits into
RVCK-Project:OLK-6.6from
ieiao:PR231@rvck

Conversation

@ieiao
Copy link
Copy Markdown
Contributor

@ieiao ieiao commented Apr 27, 2026

Sync commits from rvck PR 231.
Source PR: RVCK-Project/rvck#231

Alexandre Ghiti and others added 16 commits April 10, 2026 21:10
mainline inclusion
from mainline-6.16-rc1
commit 415a8c81da3dab0a585bd4f8d505a11ad5a171a7
category: feature
bugzilla: RVCK-Project/rvck#229

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

Export Zabha through the hwprobe syscall.

Reviewed-by: Clément Léger <cleger@rivosinc.com>
Link: https://lore.kernel.org/r/20250421141413.394444-1-alexghiti@rivosinc.com
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.18-rc7
commit c9651fbc6051d305765f9c7528b90ad6c88ba4f4
category: feature
bugzilla: RVCK-Project/rvck#229

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

Add parsing for Zalasr ISA extension.

Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
Link: https://patch.msgid.link/20251020042056.30283-2-luxu.kernel@bytedance.com
[pjw@kernel.org: updated to apply]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.18-rc7
commit 4640be2588713766b3141998d2e396121b337e41
category: feature
bugzilla: RVCK-Project/rvck#229

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

Add description for the Zalasr ISA extension

Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20251020042056.30283-3-luxu.kernel@bytedance.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.18-rc7
commit f4922b69165735e81752ee47d174f873e989a449
category: feature
bugzilla: RVCK-Project/rvck#229

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

Export the Zalasr extension to userspace using hwprobe.

Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
Link: https://patch.msgid.link/20251020042056.30283-4-luxu.kernel@bytedance.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.18-rc7
commit ad1bb4b8525e497c95d48a2d3fd2e81fba4b5ad7
category: feature
bugzilla: RVCK-Project/rvck#229

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

Introduce l{b|h|w|d}.{aq|aqrl} and s{b|h|w|d}.{rl|aqrl} instruction
encodings.

Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Link: https://patch.msgid.link/20251020042056.30283-5-luxu.kernel@bytedance.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.13
commit a5ea53da65c588339890c825e63c0da5baef6897
category: feature
bugzilla: RVCK-Project/rvck#229

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

Add a new hwprobe key "RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0" which
allows userspace to probe for the new RISCV_ISA_VENDOR_EXT_XTHEADVECTOR
vendor extension.

This new key will allow userspace code to probe for which thead vendor
extensions are supported. This API is modeled to be consistent with
RISCV_HWPROBE_KEY_IMA_EXT_0. The bitmask returned will have each bit
corresponding to a supported thead vendor extension of the cpumask set.
Just like RISCV_HWPROBE_KEY_IMA_EXT_0, this allows a userspace program
to determine all of the supported thead vendor extensions in one call.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Evan Green <evan@rivosinc.com>
Tested-by: Yangyu Chen <cyy@cyyself.name>
Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-10-236c22791ef9@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
…extensions

mainline inclusion
from mainline-6.15-rc6
commit e8fd215ed0eb814486d50b4835007cbc50b2c2b7
category: feature
bugzilla: RVCK-Project/rvck#229

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

Document the support for sifive vendor extensions using the key
RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0 and two vendor extensions for SiFive
Int8 Matrix Multiplication Instructions using
RISCV_HWPROBE_VENDOR_EXT_XSFVQMACCDOD and
RISCV_HWPROBE_VENDOR_EXT_XSFVQMACCQOQ.

Signed-off-by: Cyan Yang <cyan.yang@sifive.com>
Link: https://lore.kernel.org/r/20250418053239.4351-4-cyan.yang@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
…qmaccdod and xsfqmaccqoq

mainline inclusion
from mainline-6.15-rc6
commit 1a6274f035346e76835d46096136dd3e6cca9575
category: feature
bugzilla: RVCK-Project/rvck#229

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

Add a new hwprobe key "RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0" which allows
userspace to probe for the new vendor extensions from SiFive. Also, add
new hwprobe for SiFive "xsfvqmaccdod" and "xsfvqmaccqoq" vendor
extensions.

Signed-off-by: Cyan Yang <cyan.yang@sifive.com>
Link: https://lore.kernel.org/r/20250418053239.4351-5-cyan.yang@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.17-rc7
commit bb4b0f8a1bcbf8f4e3a0841aaefb3fd580d12fc9
category: feature
bugzilla: RVCK-Project/rvck#229

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

Add a new hwprobe key "RISCV_HWPROBE_KEY_VENDOR_EXT_MIPS_0" which allows
userspace to probe for the new xmipsexectl vendor extension.

Signed-off-by: Aleksa Paunovic <aleksa.paunovic@htecgroup.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20250724-p8700-pause-v5-4-a6cbbe1c3412@htecgroup.com
[pjw@kernel.org: fixed some checkpatch issues]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.18-rc7
commit e0a504984a88a2f1c0131aca5115fd529fc9974a
category: feature
bugzilla: RVCK-Project/rvck#229

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

- Add `RISCV_HWPROBE_EXT_ZICBOP` to report the presence of the
  Zicbop extension.
- Add `RISCV_HWPROBE_KEY_ZICBOP_BLOCK_SIZE` to expose the block
  size (in bytes) when Zicbop is supported.
- Update hwprobe.rst to document the new extension bit and block
  size key, following the existing Zicbom/Zicboz style.

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Yao Zihong <zihong.plct@isrc.iscas.ac.cn>
Link: https://patch.msgid.link/20251118162436.15485-2-zihong.plct@isrc.iscas.ac.cn
[pjw@kernel.org: updated to apply]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.17-rc7
commit eca26eadd27e59d6d673308d2a28416dd741513e
category: feature
bugzilla: RVCK-Project/rvck#229

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

The zicbom/zicboz block size registers should depend on the host's isa,
the reason is that we otherwise create an ioctl order dependency on the VMM.

Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviwed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Link: https://lore.kernel.org/r/fef5907425455ecd41b224e0093f1b6bc4067138.1754646071.git.zhouquan@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.17-rc7
commit 48e2febcda745150b4e05a8f6e6d8fd2e14e25ec
category: feature
bugzilla: RVCK-Project/rvck#229

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

We're about to allow guests to use the Zicbop extension.
KVM userspace needs to know the cache block size in order to
properly advertise it to the guest. Provide a virtual config
register for userspace to get it with the GET_ONE_REG API, but
setting it cannot be supported, so disallow SET_ONE_REG.

Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/befd8403cd76d7adb97231ac993eaeb86bf2582c.1754646071.git.zhouquan@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.17-rc7
commit 0efd9a29c52d357088e190d0bf6c33dc8ed53d2d
category: feature
bugzilla: RVCK-Project/rvck#229

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

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

Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Reviewed-by: Nutty Liu <liujingqi@lanxincomputing.com>
Link: https://lore.kernel.org/r/db4a9b679cc653bb6f5f5574e4196de7a980e458.1754646071.git.zhouquan@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.17-rc7
commit 44c3d084e4c8737cbef6fed262af21965d6adfb1
category: feature
bugzilla: RVCK-Project/rvck#229

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

Extend the KVM ISA extension ONE_REG interface to allow KVM user space
to detect and enable Zfbfmin/Zvfbfmin/Zvfbfwma extension for Guest/VM.

Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Reviewed-by: Nutty Liu <liujingqi@lanxincomputing.com>
Link: https://lore.kernel.org/r/f846cecd330ab9fc88211c55bc73126f903f8713.1754646071.git.zhouquan@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.17-rc7
commit e677fab86502e7c716dc893299965cffec57b9f5
category: feature
bugzilla: RVCK-Project/rvck#229

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

The KVM RISC-V allows Zicbop extension for Guest/VM
so add them to get-reg-list test.

Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Link: https://lore.kernel.org/r/076908690c15070f907f43d2ff81ba7e95582ec7.1754646071.git.zhouquan@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion
from mainline-6.19
commit 655d330c058f4e16de46d5c9b203008c630b59c8
category: feature
bugzilla: RVCK-Project/rvck#229

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

Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20251020042457.30915-5-luxu.kernel@bytedance.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Gao Rui <gao.rui@zte.com.cn>
[sync from rvck.]
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 27, 2026


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

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

测试完成

详细结果:

RVCK result

check result
kunit-test failure
kernel-build success
lava-trigger success
check-patch success

Kunit Test Result

kunit test failed

Kernel Build Result

Kernel build succeeded: RVCK-Project/rvck-olk/220_24977510314_1/

64b635527907b35197d86ae3a05ec762 /srv/guix_result/36e8cd9e1621fad9b5ed7a4603409aa3748edf44/Image
023ac7494f28657a700af913f71bd40b /root/initramfs.img

LAVA Check

args value
testcase_repo RVCK-Project/lavaci
testcase_ref main
lava_template lava-job-template/qemu/qemu-ltp.yaml
testcase_path lava-testcases/common-test/ltp/ltp.yaml
testitem_name RVCK-Project_rvck-olk_pull_request_target_220__common-test_qemu
kernel_download_url https://repo.tarsier-infra.isrc.ac.cn/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck-olk/220_24977510314_1/Image
initramfs_download_url https://repo.tarsier-infra.isrc.ac.cn/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck-olk/220_24977510314_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

result: Lava check done!

Check Patch Result

Total Errors 0
Total Warnings 9

@xmzzz xmzzz merged commit 36e8cd9 into RVCK-Project:OLK-6.6 Apr 30, 2026
48 of 50 checks passed
@wangliu-iscas
Copy link
Copy Markdown
Collaborator

wangliu-iscas commented May 6, 2026

/check


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

参数解析结果
args value
repository RVCK-Project/rvck-olk
head ref pull/220/head
base ref OLK-6.6
LAVA repo RVCK-Project/lavaci
LAVA hardware ['qemu', 'lpi4a', 'sg2042', 'k1']
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 failure
kernel-build success
check-patch success
lava-trigger-qemu success
lava-trigger-sg2042 failure
lava-trigger-k1 failure
lava-trigger-lpi4a success

Kunit Test Result

kunit test failed

Kernel Build Result

Check Patch Result

Total Errors 0
Total Warnings 0

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-olk/220_25413603863_1/Image
initramfs_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck-olk/220_25413603863_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-olk_issue_comment_220__4384691960_common-test_qemu

result: Lava check done!

LAVA Check (sg2042)

args value
testcase_repo RVCK-Project/lavaci
lava_template lava-job-template/sg2042/sg2042-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-olk/220_25413603863_1/Image
initramfs_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck-olk/220_25413603863_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.tar.gz
testcase_ref main
testitem_name RVCK-Project_rvck-olk_issue_comment_220__4384691960_common-test_sg2042

result: Lava check fail!

LAVA Check (spacemit-k1-bananapi-f3)

args value
testcase_repo RVCK-Project/lavaci
lava_template lava-job-template/spacemit-k1-bananapi-f3/k1-bpif3-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-olk/220_25413603863_1/Image
initramfs_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck-olk/220_25413603863_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.tar.gz
testcase_ref main
testitem_name RVCK-Project_rvck-olk_issue_comment_220__4384691960_common-test_spacemit-k1-bananapi-f3

result: Lava check fail!

LAVA Check (lpi4a)

args value
testcase_repo RVCK-Project/lavaci
lava_template lava-job-template/lpi4a/lpi4a-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-olk/220_25413603863_1/Image
initramfs_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck-olk/220_25413603863_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.tar.gz
testcase_ref main
testitem_name RVCK-Project_rvck-olk_issue_comment_220__4384691960_common-test_lpi4a

result: Lava check done!

@ieiao ieiao deleted the PR231@rvck branch May 11, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants