Home
last modified time | relevance | path

Searched refs:vcpu_id (Results 1 – 17 of 17) sorted by relevance

/tools/testing/selftests/kvm/
Dkvm_page_table_test.c50 int vcpu_id; member
95 static void guest_code(int vcpu_id) in guest_code() argument
98 struct vcpu_args *vcpu_args = &p->vcpu_args[vcpu_id]; in guest_code()
104 GUEST_ASSERT(vcpu_args->vcpu_id == vcpu_id); in guest_code()
199 int vcpu_id = vcpu_args->vcpu_id; in vcpu_worker() local
205 vcpu_args_set(vm, vcpu_id, 1, vcpu_id); in vcpu_worker()
206 run = vcpu_state(vm, vcpu_id); in vcpu_worker()
216 ret = _vcpu_run(vm, vcpu_id); in vcpu_worker()
220 TEST_ASSERT(get_ucall(vm, vcpu_id, NULL) == UCALL_SYNC, in vcpu_worker()
224 pr_debug("Got sync event from vCPU %d\n", vcpu_id); in vcpu_worker()
[all …]
Ddirty_log_perf_test.c45 int vcpu_id = vcpu_args->vcpu_id; in vcpu_worker() local
47 run = vcpu_state(vm, vcpu_id); in vcpu_worker()
53 ret = _vcpu_run(vm, vcpu_id); in vcpu_worker()
57 TEST_ASSERT(get_ucall(vm, vcpu_id, NULL) == UCALL_SYNC, in vcpu_worker()
61 pr_debug("Got sync event from vCPU %d\n", vcpu_id); in vcpu_worker()
62 vcpu_last_completed_iteration[vcpu_id] = current_iteration; in vcpu_worker()
64 vcpu_id, vcpu_last_completed_iteration[vcpu_id]); in vcpu_worker()
70 vcpu_id, current_iteration, ts_diff.tv_sec, in vcpu_worker()
74 vcpu_id, current_iteration, ts_diff.tv_sec, in vcpu_worker()
82 avg = timespec_div(total, vcpu_last_completed_iteration[vcpu_id]); in vcpu_worker()
[all …]
Dmemslot_modification_stress_test.c44 int vcpu_id = vcpu_args->vcpu_id; in vcpu_worker() local
48 run = vcpu_state(vm, vcpu_id); in vcpu_worker()
52 ret = _vcpu_run(vm, vcpu_id); in vcpu_worker()
55 if (get_ucall(vm, vcpu_id, NULL) == UCALL_SYNC) in vcpu_worker()
105 int vcpu_id; in run_test() local
123 for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++) in run_test()
124 pthread_create(&vcpu_threads[vcpu_id], NULL, vcpu_worker, in run_test()
125 &perf_test_args.vcpu_args[vcpu_id]); in run_test()
135 for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++) in run_test()
136 pthread_join(vcpu_threads[vcpu_id], NULL); in run_test()
Ddemand_paging_test.c49 int vcpu_id = vcpu_args->vcpu_id; in vcpu_worker() local
55 run = vcpu_state(vm, vcpu_id); in vcpu_worker()
60 ret = _vcpu_run(vm, vcpu_id); in vcpu_worker()
62 if (get_ucall(vm, vcpu_id, NULL) != UCALL_SYNC) { in vcpu_worker()
69 PER_VCPU_DEBUG("vCPU %d execution time: %ld.%.9lds\n", vcpu_id, in vcpu_worker()
292 int vcpu_id; in run_test() local
324 for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++) { in run_test()
333 (vcpu_id * guest_percpu_mem_size); in run_test()
340 vcpu_id, vcpu_gpa, vcpu_gpa + vcpu_mem_size); in run_test()
350 r = pipe2(&pipefds[vcpu_id * 2], in run_test()
[all …]
Daccess_tracking_perf_test.c130 static void mark_vcpu_memory_idle(struct kvm_vm *vm, int vcpu_id) in mark_vcpu_memory_idle() argument
132 uint64_t base_gva = perf_test_args.vcpu_args[vcpu_id].gva; in mark_vcpu_memory_idle()
133 uint64_t pages = perf_test_args.vcpu_args[vcpu_id].pages; in mark_vcpu_memory_idle()
141 if (overlap_memory_access && vcpu_id) in mark_vcpu_memory_idle()
173 vcpu_id, no_pfn, pages); in mark_vcpu_memory_idle()
186 vcpu_id, still_idle, pages); in mark_vcpu_memory_idle()
192 static void assert_ucall(struct kvm_vm *vm, uint32_t vcpu_id, in assert_ucall() argument
196 uint64_t actual_ucall = get_ucall(vm, vcpu_id, &uc); in assert_ucall()
222 int vcpu_id = vcpu_args->vcpu_id; in vcpu_thread_main() local
228 vcpu_run(vm, vcpu_id); in vcpu_thread_main()
[all …]
Dkvm_binary_stats_test.c179 static void vcpu_stats_test(struct kvm_vm *vm, int vcpu_id) in vcpu_stats_test() argument
184 stats_fd = vcpu_get_stats_fd(vm, vcpu_id); in vcpu_stats_test()
/tools/testing/selftests/kvm/lib/
Dperf_test_util.c25 static void guest_code(uint32_t vcpu_id) in guest_code() argument
27 struct perf_test_vcpu_args *vcpu_args = &perf_test_args.vcpu_args[vcpu_id]; in guest_code()
33 GUEST_ASSERT(vcpu_args->vcpu_id == vcpu_id); in guest_code()
133 int vcpu_id; in perf_test_setup_vcpus() local
135 for (vcpu_id = 0; vcpu_id < vcpus; vcpu_id++) { in perf_test_setup_vcpus()
136 vcpu_args = &perf_test_args.vcpu_args[vcpu_id]; in perf_test_setup_vcpus()
138 vcpu_args->vcpu_id = vcpu_id; in perf_test_setup_vcpus()
141 (vcpu_id * vcpu_memory_bytes); in perf_test_setup_vcpus()
145 (vcpu_id * vcpu_memory_bytes); in perf_test_setup_vcpus()
153 vcpu_args_set(vm, vcpu_id, 1, vcpu_id); in perf_test_setup_vcpus()
[all …]
Dkvm_util.c129 int vcpu_enable_cap(struct kvm_vm *vm, uint32_t vcpu_id, in vcpu_enable_cap() argument
132 struct vcpu *vcpu = vcpu_find(vm, vcpu_id); in vcpu_enable_cap()
135 TEST_ASSERT(vcpu, "cannot find vcpu %d", vcpu_id); in vcpu_enable_cap()
/tools/testing/selftests/kvm/lib/x86_64/
Ducall.c38 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc) in get_ucall() argument
40 struct kvm_run *run = vcpu_state(vm, vcpu_id); in get_ucall()
49 vcpu_regs_get(vm, vcpu_id, &regs); in get_ucall()
53 vcpu_run_complete_io(vm, vcpu_id); in get_ucall()
Dvmx.c46 int vcpu_enable_evmcs(struct kvm_vm *vm, int vcpu_id) in vcpu_enable_evmcs() argument
55 vcpu_ioctl(vm, vcpu_id, KVM_ENABLE_CAP, &enable_evmcs_cap); in vcpu_enable_evmcs()
/tools/testing/selftests/kvm/x86_64/
Dxapic_ipi_test.c83 uint32_t vcpu_id; member
209 params->vcpu_id, r); in vcpu_thread()
211 fprintf(stderr, "vCPU thread running vCPU %u\n", params->vcpu_id); in vcpu_thread()
212 vcpu_run(params->vm, params->vcpu_id); in vcpu_thread()
213 exit_reason = vcpu_state(params->vm, params->vcpu_id)->exit_reason; in vcpu_thread()
217 params->vcpu_id, exit_reason, exit_reason_str(exit_reason)); in vcpu_thread()
219 if (get_ucall(params->vm, params->vcpu_id, &uc) == UCALL_ABORT) { in vcpu_thread()
227 params->vcpu_id, (const char *)uc.args[0], in vcpu_thread()
239 static void cancel_join_vcpu_thread(pthread_t thread, uint32_t vcpu_id) in cancel_join_vcpu_thread() argument
247 vcpu_id, r); in cancel_join_vcpu_thread()
[all …]
/tools/testing/selftests/kvm/lib/s390x/
Ducall.c36 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc) in get_ucall() argument
38 struct kvm_run *run = vcpu_state(vm, vcpu_id); in get_ucall()
53 vcpu_run_complete_io(vm, vcpu_id); in get_ucall()
/tools/testing/selftests/kvm/lib/aarch64/
Ducall.c91 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc) in get_ucall() argument
93 struct kvm_run *run = vcpu_state(vm, vcpu_id); in get_ucall()
108 vcpu_run_complete_io(vm, vcpu_id); in get_ucall()
/tools/testing/selftests/kvm/include/
Dperf_test_util.h25 int vcpu_id; member
Dkvm_util.h86 int vcpu_enable_cap(struct kvm_vm *vm, uint32_t vcpu_id,
371 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc);
/tools/perf/
Dbuiltin-kvm.c143 int vcpu_id; member
186 static bool kvm_event_expand(struct kvm_event *event, int vcpu_id) in kvm_event_expand() argument
191 if (vcpu_id < event->max_vcpu) in kvm_event_expand()
194 while (event->max_vcpu <= vcpu_id) in kvm_event_expand()
269 static double kvm_event_rel_stddev(int vcpu_id, struct kvm_event *event) in kvm_event_rel_stddev() argument
273 if (vcpu_id != -1) in kvm_event_rel_stddev()
274 kvm_stats = &event->vcpu[vcpu_id]; in kvm_event_rel_stddev()
280 static bool update_kvm_event(struct kvm_event *event, int vcpu_id, in update_kvm_event() argument
283 if (vcpu_id == -1) { in update_kvm_event()
288 if (!kvm_event_expand(event, vcpu_id)) in update_kvm_event()
[all …]
/tools/testing/selftests/kvm/include/x86_64/
Devmcs.h225 int vcpu_enable_evmcs(struct kvm_vm *vm, int vcpu_id);