From: Sean Christopherson Date: Tue, 19 Apr 2022 00:35:33 +0000 (-0700) Subject: KVM: selftests: Use vm_create() in tsc_scaling_sync X-Git-Tag: v6.1-rc5~719^2~6^2~258 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46647c65e1e618cc75961ef4d887f90ba7e18431;p=platform%2Fkernel%2Flinux-starfive.git KVM: selftests: Use vm_create() in tsc_scaling_sync Use vm_create() instead of vm_create_default_with_vcpus() in tsc_scaling_sync. The existing call doesn't create any vCPUs, and the guest_code() entry point is set when vm_vcpu_add_default() is invoked. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini --- diff --git a/tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c b/tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c index 2411215..728b252 100644 --- a/tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c +++ b/tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c @@ -98,7 +98,7 @@ int main(int argc, char *argv[]) exit(KSFT_SKIP); } - vm = vm_create_default_with_vcpus(0, DEFAULT_STACK_PGS * NR_TEST_VCPUS, 0, guest_code, NULL); + vm = vm_create(DEFAULT_GUEST_PHY_PAGES + DEFAULT_STACK_PGS * NR_TEST_VCPUS); vm_ioctl(vm, KVM_SET_TSC_KHZ, (void *) TEST_TSC_KHZ); pthread_spin_init(&create_lock, PTHREAD_PROCESS_PRIVATE);