Skip to content

Commit 4770693

Browse files
xiaobo55xavpatel
authored andcommitted
KVM: riscv: selftests: Add get-reg-list test
get-reg-list test is used to check for KVM registers regressions during VM migration which happens when destination host kernel missing registers that the source host kernel has. The blessed list registers was created by running on v6.5-rc3 Signed-off-by: Haibo Xu <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Signed-off-by: Anup Patel <[email protected]>
1 parent 031f9ef commit 4770693

File tree

3 files changed

+876
-0
lines changed

3 files changed

+876
-0
lines changed

tools/testing/selftests/kvm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ TEST_GEN_PROGS_s390x += kvm_binary_stats_test
176176

177177
TEST_GEN_PROGS_riscv += demand_paging_test
178178
TEST_GEN_PROGS_riscv += dirty_log_test
179+
TEST_GEN_PROGS_riscv += get-reg-list
179180
TEST_GEN_PROGS_riscv += kvm_create_max_vcpus
180181
TEST_GEN_PROGS_riscv += kvm_page_table_test
181182
TEST_GEN_PROGS_riscv += set_memory_region_test

tools/testing/selftests/kvm/include/riscv/processor.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ static inline uint64_t __kvm_reg_id(uint64_t type, uint64_t idx,
3838
KVM_REG_RISCV_TIMER_REG(name), \
3939
KVM_REG_SIZE_U64)
4040

41+
#define RISCV_ISA_EXT_REG(idx) __kvm_reg_id(KVM_REG_RISCV_ISA_EXT, \
42+
idx, KVM_REG_SIZE_ULONG)
43+
4144
/* L3 index Bit[47:39] */
4245
#define PGTBL_L3_INDEX_MASK 0x0000FF8000000000ULL
4346
#define PGTBL_L3_INDEX_SHIFT 39

0 commit comments

Comments
 (0)