Skip to content

【Backport】KVM 支持 SBI FWFT 扩展优化 #357

Description

@uestc-gr

这一批补丁集中在 RISC-V KVM 的 SBI FWFT 扩展与 ONE_REG 接口支持,涵盖了功能修复、接口实现、自测增强以及特性管理。通过这些改动,KVM 在 RISC-V 平台上实现了更完善的 固件特性控制,提升了 用户态可控性、测试覆盖率 和 性能优化。

主要包括:

具体如下:

新增 KVM MPXY 扩展支持及相关测试;
增加 kvm FWFT 相关支持与测试;
扩展 get-reg-list 对 ISA 和 SBI 扩展的测试覆盖;
重构 SBI/ISA 扩展测试框架及相关实现;
优化异常检查和寄存器处理逻辑;
修复并清理若干测试代码问题。
整体提升了 RISC-V KVM 对 ISA/SBI 扩展暴露、配置及管理功能的验证能力,具体测试结果如下

这些改动将使 RISC-V KVM 在 功能一致性、可测试性 和 性能优化方面更进一步,为后续扩展和用户态工具支持打下基础。补丁列表如下

4d554e0 KVM: riscv: selftests: Add senvcfg register to get-reg-list test
e1a8db0 KVM: riscv: selftests: Add smstateen registers to get-reg-list test
2b3f2b7 KVM: riscv: selftests: Add condops extensions to get-reg-list test
3279f52 KVM: riscv: selftests: Fix get-reg-list print_reg defaults
7602730 KVM: riscv: selftests: Drop SBI multi registers
b26e70d KVM: riscv: selftests: Use register subtypes
bdf6aa3 RISC-V: KVM: selftests: Treat SBI ext regs like ISA ext regs
ac39614 KVM: riscv: selftests: Add Zbc extension to get-reg-list test
14d70de KVM: riscv: selftests: Add scaler crypto extensions to get-reg-list test
2ddf790 KVM: riscv: selftests: Add vector crypto extensions to get-reg-list test
496ee21 KVM: riscv: selftests: Add Zfh[min] extensions to get-reg-list test
1a3bc50 KVM: riscv: selftests: Add Zihintntl extension to get-reg-list test
1216fdd KVM: riscv: selftests: Add Zvfh[min] extensions to get-reg-list test
4d0e8f9 KVM: riscv: selftests: Add Zfa extension to get-reg-list test
250e138 KVM: selftests: Remove redundant newlines
KVM: riscv: selftests: complete backport for change vcpu_has_ext
d9bb4ec KVM: riscv: selftests: Add Ztso extension to get-reg-list test
d8c0831 KVM: riscv: selftests: Add Zacas extension to get-reg-list test
ca54464 KVM: riscv: selftests: Add Zimop extension to get-reg-list test
d27c34a KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test
e212d92 KVM: riscv: selftests: Add Zcmop extension to get-reg-list test
f2c43c6 KVM: riscv: selftests: Add Zawrs extension to get-reg-list test
dd4a799 KVM: riscv: selftests: Fix compile error
c74bfe4 KVM: riscv: selftests: Add Svade and Svadu Extension to get-reg-list test
144dfe4 KVM: riscv: selftests: Add Svvptc/Zabha/Ziccrse exts to get-reg-list test
7a9827e KVM: riscv: selftests: Add Zaamo/Zalrsc extensions to get-reg-list test
f80e9cc KVM: riscv: selftests: Add vector extension tests
b4ab605 KVM: riscv: selftests: Add bfloat16 extension to get-reg-list test
7826c8f RISC-V: KVM: Fix inclusion of Smnpm in the guest ISA bitmap
6f576fc RISC-V: KVM: Add support for SBI_FWFT_POINTER_MASKING_PMLEN
83df1d6 RISC-V: KVM: Set initial value of hedeleg in kvm_arch_vcpu_create()
a6250b1 RISC-V: KVM: Introduce feature specific reset for SBI FWFT
699a53a RISC-V: KVM: Introduce optional ONE_REG callbacks for SBI extensions
85e7850 RISC-V: KVM: Move copy_sbi_ext_reg_indices() to SBI implementation
48d6710 RISC-V: KVM: Implement ONE_REG interface for SBI FWFT state
5c6d333 KVM: riscv: selftests: Add SBI FWFT to get-reg-list test
e2f3e2d RISC-V: KVM: Convert kvm_riscv_vcpu_sbi_forward() into extension handler
12fd6c6 RISC-V: KVM: Add separate source for forwarded SBI extensions
7050f1d RISC-V: KVM: Add SBI MPXY extension support for Guest
d1c5620 KVM: riscv: selftests: Add SBI MPXY extension to get-reg-list
671995f RISC-V: KVM: selftests: Add Zalasr extensions to get-reg-list test
63224b0 KVM: RISC-V: SBI FWFT: Mark vCPU CSRs dirty after setting feature value
86957e5 KVM: RISC-V: SBI FWFT: Add optional init() callback for hardware probing
e659112 KVM: RISC-V: SBI FWFT: Fix stale feature exposure after runtime extension changes
09bb926 KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param
e23bb06 KVM: riscv: selftests: Align the trap information wiht pt_regs
3608b17 KVM: riscv: selftests: Decode stval to identify exact exception type
85fc710 KVM: riscv: selftests: Refactor ISA and SBI extension sublist macros
64e50ab KVM: riscv: selftests: Split SBI FWFT into separate feature-specific sublists

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions