]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: riscv: selftests: Refactor ISA and SBI extension sublist macros
authorYong-Xuan Wang <yongxuan.wang@sifive.com>
Mon, 1 Jun 2026 10:26:25 +0000 (03:26 -0700)
committerAnup Patel <anup@brainfault.org>
Fri, 5 Jun 2026 16:08:58 +0000 (21:38 +0530)
commit85fc710600ca44cbc90e69ee2b4fd712ae7f991a
treee762727b77551f4171021d00393e2070a4bb0d7c
parente659112a39cd93150d93c4661444a439d512e1ca
KVM: riscv: selftests: Refactor ISA and SBI extension sublist macros

Refactor the get-reg-list test to use unified sublist macros for ISA
and SBI extensions, eliminating code duplication and improving
maintainability.

Previously, each extension had its own hand-coded sublist definition
(e.g., SUBLIST_ZICBOM, SUBLIST_AIA, etc.) and the config structures
repeated the same pattern. This made the code verbose and error-prone.

Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260601-kvm-get_reg_list-v2-v5-4-415d08a2813b@sifive.com
Signed-off-by: Anup Patel <anup@brainfault.org>
tools/testing/selftests/kvm/riscv/get-reg-list.c