Skip to content

Comments

sync: rvck89: KVM RISC-V report more ISA extensions through ONE_REG#140

Open
xmzzz wants to merge 20 commits intoRVCK-Project:OLK-6.6from
xmzzz:sync-rvck-89-fix-author
Open

sync: rvck89: KVM RISC-V report more ISA extensions through ONE_REG#140
xmzzz wants to merge 20 commits intoRVCK-Project:OLK-6.6from
xmzzz:sync-rvck-89-fix-author

Conversation

@xmzzz
Copy link
Contributor

@xmzzz xmzzz commented Nov 24, 2025

avpatel and others added 20 commits November 24, 2025 12:10
mainline inclusion
from Linux 6.6-rc6
commit df68f4d8cb496ea31fa42cf2620366571c05376b
category: feature
bugzilla: RVCK-Project/rvck#79

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

We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable Zicond extension for Guest/VM.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit 367188297254e7f81e3c3c94e6d6a623f757c4cb
category: feature
bugzilla: RVCK-Project/rvck#79

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

We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable Zbc extension for Guest/VM.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit f370b4e668f017f523968f7490163fa922dcd92e
category: feature
bugzilla: RVCK-Project/rvck#79

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

We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable scalar crypto extensions for
Guest/VM. This includes extensions Zbkb, Zbkc, Zbkx, Zknd, Zkne,
Zknh, Zkr, Zksed, Zksh, and Zkt.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit afd1ef3adfbc36e35fcf4f742fd90aea6480a276
category: feature
bugzilla: RVCK-Project/rvck#79

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

We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable vector crypto extensions for
Guest/VM. This includes extensions Zvbb, Zvbc, Zvkb, Zvkg,
Zvkned, Zvknha, Zvknhb, Zvksed, Zvksh, and Zvkt.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit f3901ece5b3894177d1816208d0fb06b295617e0
category: feature
bugzilla: RVCK-Project/rvck#79

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

We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable Zfh[min] extensions for Guest/VM.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit ab6da9cdc3f3d1d091d657219fb6e98f710ee098
category: feature
bugzilla: RVCK-Project/rvck#79

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

We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable Zihintntl extension for Guest/VM.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit f46300285926c2b0d0c79bf40c87d45e169cecb6
category: feature
bugzilla: RVCK-Project/rvck#79

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

We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable Zvfh[min] extensions for Guest/VM.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit 41182cc6f507011a2e6c82657779e451ed9942bb
category: feature
bugzilla: RVCK-Project/rvck#79

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

We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable Zfa extension for Guest/VM.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc5
commit d808f0b1be4888a87524164bc7dad2242734de38
category: feature
bugzilla: RVCK-Project/rvck#79

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

The SEED CSR access from VS/VU mode (guest) will always trap to
HS-mode (KVM) when Zkr extension is available to the Guest/VM.
Forward this CSR access to KVM user space so that it can be
emulated based on the method chosen by VMM.
Fixes: f370b4e668f0 ("RISC-V: KVM: Allow scalar crypto extensions for Guest/VM")

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit f943ebe2ec26272d71f9c7643ec667c616419bb1
category: feature
bugzilla: RVCK-Project/rvck#79

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

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

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit 77fc0bfa43f83c1080b35a4915c767cf2c4979ff
category: feature
bugzilla: RVCK-Project/rvck#79

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

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

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit fb2a3d63efefe6bd3718201daba479f4339bb4bf
category: feature
bugzilla: RVCK-Project/rvck#79

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

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

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit d964e8f2ae65dcc088345332d479d4fcc5a1d757
category: feature
bugzilla: RVCK-Project/rvck#79

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

Extend the KVM ISA extension ONE_REG interface to allow KVM user space
to detect and enable Zca, Zcf, Zcd and Zcb extensions for Guest/VM.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit 29cf9b803e6e9f1421f090478e624ca4c637c835
category: feature
bugzilla: RVCK-Project/rvck#79

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

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

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.6-rc6
commit 86d6a86e59e3aa425d829a935c0d92388e4fe55b
category: feature
bugzilla: RVCK-Project/rvck#79

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

When a guest traps on wrs.nto, call kvm_vcpu_on_spin() to attempt
to yield to the lock holding VCPU. Also extend the KVM ISA extension
ONE_REG interface to allow KVM userspace to detect and enable the
Zawrs extension for the Guest/VM.

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.12-rc5
commit 1851e7836212c76bebb6944bb1541ddcccbea535
category: feature
bugzilla: RVCK-Project/rvck#79

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

The interface for controlling pointer masking in VS-mode is henvcfg.PMM,
which is part of the Ssnpm extension, even though pointer masking in
HS-mode is provided by the Smnpm extension. As a result, emulating Smnpm
in the guest requires (only) Ssnpm on the host.
The guest configures Smnpm through the SBI Firmware Features extension,
which KVM does not yet implement, so currently the ISA extension has no
visible effect on the guest, and thus it cannot be disabled. Ssnpm is
configured using the senvcfg CSR within the guest, so that extension
cannot be hidden from the guest without intercepting writes to the CSR.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.13-rc1
commit 97eccf7db4f2e5e59d16bca45f7803ae3aeff6e1
category: feature
bugzilla: RVCK-Project/rvck#79

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

We extend the KVM ISA extension ONE_REG interface to allow VMM tools to
detect and enable Svade and Svadu extensions for Guest/VM. Since the
henvcfg.ADUE is read-only zero if the menvcfg.ADUE is zero, the Svadu
extension is available for Guest/VM and the Svade extension is allowed
to disabledonly when arch_has_hw_pte_young() is true.

Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.13-rc5
commit 0f891585971648a07e8b0c155e5b3eb697601d9d
category: feature
bugzilla: RVCK-Project/rvck#79

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

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

Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.13-rc6
commit 679e132c0ae2c34b425f32fb1a59fc04c6dc87cb
category: feature
bugzilla: RVCK-Project/rvck#79

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

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

Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
mainline inclusion
from Linux 6.13-rc6
commit 79be257b579e72ae7c5aeb942700a449d467405f
category: feature
bugzilla: RVCK-Project/rvck#79

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

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

Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: yechao-w <wang.yechao255@zte.com.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
@github-actions
Copy link

github-actions bot commented Nov 24, 2025


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

参数解析结果
args value
repository RVCK-Project/rvck-olk
head ref pull/140/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 success
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/140/

e936bfe1c23182bd2e761cedf0e2922f /srv/guix_result/06079e996e9d840a0ab47181e9a7b1f429a42e9c/Image
cdfd9675ef689b8877ddccc84fef8aca /root/initramfs.img

LAVA Check

args:

result:

Lava check done! lava log: https://lava.oerv.ac.cn/scheduler/job/931

lava result count: [fail]: 18, [pass]: 1588, [skip]: 293

Check Patch Result

Total Errors 0
Total Warnings 0

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.

6 participants