diff options
| author | Vishal Annapurve <[email protected]> | 2022-11-15 21:38:45 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2022-11-16 16:58:57 -0800 |
| commit | 2115713cfab05dd6efd48ad6bf56e67f556dcec5 (patch) | |
| tree | b02fc2bc1e4ec9ce218374da19aeca0b7ca98c09 /tools/testing/selftests/kvm/lib/kvm_util.c | |
| parent | e1ab31245c4efe973db4dcd6c82a41c2aec09b27 (diff) | |
KVM: selftests: Add arch specific post vm creation hook
Add arch specific API kvm_arch_vm_post_create to perform any required setup
after VM creation.
Suggested-by: Sean Christopherson <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Reviewed-by: Peter Gonda <[email protected]>
Signed-off-by: Vishal Annapurve <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[sean: place x86's implementation by vm_arch_vcpu_add()]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/kvm_util.c')
| -rw-r--r-- | tools/testing/selftests/kvm/lib/kvm_util.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c index db62680d5918..5ac8f207ed92 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c @@ -351,9 +351,7 @@ struct kvm_vm *__vm_create(enum vm_guest_mode mode, uint32_t nr_runnable_vcpus, slot0 = memslot2region(vm, 0); ucall_init(vm, slot0->region.guest_phys_addr + slot0->region.memory_size); -#ifdef __x86_64__ - vm_create_irqchip(vm); -#endif + kvm_arch_vm_post_create(vm); return vm; } @@ -2087,6 +2085,10 @@ void __vm_get_stat(struct kvm_vm *vm, const char *stat_name, uint64_t *data, } } +__weak void kvm_arch_vm_post_create(struct kvm_vm *vm) +{ +} + __weak void kvm_selftest_arch_init(void) { } |