diff options
author | Andrew Jones <ajones@ventanamicro.com> | 2023-07-25 11:41:30 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2023-08-08 19:12:06 +0300 |
commit | 9177b715cdccdfd6711511440cf43b8be6e28c6c (patch) | |
tree | 0d356ec5730a027d15b97731366809c788144188 /tools/testing/selftests/kvm/include/kvm_util_base.h | |
parent | c2b5aa7aebbae018edd988e9815087abf72e526b (diff) | |
download | linux-9177b715cdccdfd6711511440cf43b8be6e28c6c.tar.xz |
KVM: arm64: selftests: Rename vcpu_config and add to kvm_util.h
Rename vcpu_config to vcpu_reg_list to be more specific and add
it to kvm_util.h. While it may not get used outside get-reg-list
tests, exporting it doesn't hurt, as long as it has a unique enough
name. This is a step in the direction of sharing most of the get-
reg-list test code between architectures.
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Haibo Xu <haibo1.xu@intel.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'tools/testing/selftests/kvm/include/kvm_util_base.h')
-rw-r--r-- | tools/testing/selftests/kvm/include/kvm_util_base.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/include/kvm_util_base.h b/tools/testing/selftests/kvm/include/kvm_util_base.h index eb1ff597bcca..b5189c7df482 100644 --- a/tools/testing/selftests/kvm/include/kvm_util_base.h +++ b/tools/testing/selftests/kvm/include/kvm_util_base.h @@ -15,6 +15,7 @@ #include <linux/kernel.h> #include <linux/kvm.h> #include "linux/rbtree.h" +#include <linux/types.h> #include <asm/atomic.h> @@ -124,6 +125,21 @@ struct kvm_vm { uint32_t memslots[NR_MEM_REGIONS]; }; +struct vcpu_reg_sublist { + const char *name; + long capability; + int feature; + bool finalize; + __u64 *regs; + __u64 regs_n; + __u64 *rejects_set; + __u64 rejects_set_n; +}; + +struct vcpu_reg_list { + char *name; + struct vcpu_reg_sublist sublists[]; +}; #define kvm_for_each_vcpu(vm, i, vcpu) \ for ((i) = 0; (i) <= (vm)->last_vcpu_id; (i)++) \ |