diff options
| author | Vishal Annapurve <vannapurve@google.com> | 2022-11-15 21:38:44 +0000 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2022-11-16 16:58:57 -0800 |
| commit | e1ab31245c4efe973db4dcd6c82a41c2aec09b27 (patch) | |
| tree | 721cc7e3fb8ffd09bbc9f6014df9ced40e83965d /tools/testing/selftests/kvm/lib/kvm_util.c | |
| parent | KVM: selftests: move common startup logic to kvm_util.c (diff) | |
| download | linux-e1ab31245c4efe973db4dcd6c82a41c2aec09b27.tar.gz linux-e1ab31245c4efe973db4dcd6c82a41c2aec09b27.zip | |
KVM: selftests: Add arch specific initialization
Introduce arch specific API: kvm_selftest_arch_init to allow each arch to
handle initialization before running any selftest logic.
Suggested-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
Reviewed-by: Peter Gonda <pgonda@google.com>
Signed-off-by: Vishal Annapurve <vannapurve@google.com>
Link: https://lore.kernel.org/r/20221115213845.3348210-3-vannapurve@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/kvm_util.c')
| -rw-r--r-- | tools/testing/selftests/kvm/lib/kvm_util.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c index 575a0c38d1c0..db62680d5918 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c @@ -2087,8 +2087,14 @@ void __vm_get_stat(struct kvm_vm *vm, const char *stat_name, uint64_t *data, } } +__weak void kvm_selftest_arch_init(void) +{ +} + void __attribute((constructor)) kvm_selftest_init(void) { /* Tell stdout not to buffer its content. */ setbuf(stdout, NULL); + + kvm_selftest_arch_init(); } |
