Home
last modified time | relevance | path

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

123

/Linux-v5.15/arch/x86/kvm/
Dtrace.h22 __field( unsigned int, vcpu_id )
27 __entry->vcpu_id = vcpu->vcpu_id;
31 TP_printk("vcpu %u, rip 0x%lx", __entry->vcpu_id, __entry->rip)
302 __field( unsigned int, vcpu_id ) \
309 __entry->vcpu_id = vcpu->vcpu_id; \
318 __entry->vcpu_id, \
551 __entry->apicid = apic->vcpu->vcpu_id;
568 __entry->apicid = apic->vcpu->vcpu_id;
840 TP_PROTO(unsigned int vcpu_id, __u64 previous_tsc_offset,
842 TP_ARGS(vcpu_id, previous_tsc_offset, next_tsc_offset),
[all …]
Dioapic.c124 old_val = test_bit(vcpu->vcpu_id, dest_map->map); in __rtc_irq_eoi_tracking_restore_one()
130 __set_bit(vcpu->vcpu_id, dest_map->map); in __rtc_irq_eoi_tracking_restore_one()
131 dest_map->vectors[vcpu->vcpu_id] = e->fields.vector; in __rtc_irq_eoi_tracking_restore_one()
134 __clear_bit(vcpu->vcpu_id, dest_map->map); in __rtc_irq_eoi_tracking_restore_one()
168 if (test_bit(vcpu->vcpu_id, dest_map->map) && in rtc_irq_eoi()
169 (vector == dest_map->vectors[vcpu->vcpu_id]) && in rtc_irq_eoi()
170 (test_and_clear_bit(vcpu->vcpu_id, in rtc_irq_eoi()
289 if (test_bit(vcpu->vcpu_id, dest_map->map)) in kvm_ioapic_scan_entry()
290 __set_bit(dest_map->vectors[vcpu->vcpu_id], in kvm_ioapic_scan_entry()
/Linux-v5.15/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 …]
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 …]
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()
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 …]
/Linux-v5.15/arch/powerpc/kvm/
Dtrace_hv.h226 __field(int, vcpu_id)
233 __entry->vcpu_id = vcpu->vcpu_id;
240 __entry->vcpu_id,
250 __field(int, vcpu_id)
258 __entry->vcpu_id = vcpu->vcpu_id;
266 __entry->vcpu_id,
280 __field(int, vcpu_id)
291 __entry->vcpu_id = vcpu->vcpu_id;
302 __entry->vcpu_id,
314 __field(int, vcpu_id)
[all …]
/Linux-v5.15/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 …]
/Linux-v5.15/arch/arm64/kvm/vgic/
Dtrace.h11 TP_PROTO(unsigned long vcpu_id, __u32 irq, bool level),
12 TP_ARGS(vcpu_id, irq, level),
15 __field( unsigned long, vcpu_id )
21 __entry->vcpu_id = vcpu_id;
27 __entry->vcpu_id, __entry->irq, __entry->level)
Dvgic-debug.c30 int vcpu_id; member
45 ++iter->vcpu_id < iter->nr_cpus) in iter_next()
78 iter->vcpu_id == iter->nr_cpus && in end_of_vgic()
169 id = vcpu->vcpu_id; in print_header()
215 (irq->target_vcpu) ? irq->target_vcpu->vcpu_id : -1, in print_irq_state()
227 (irq->vcpu) ? irq->vcpu->vcpu_id : -1); in print_irq_state()
246 if (iter->vcpu_id < iter->nr_cpus) in vgic_debug_show()
247 vcpu = kvm_get_vcpu(kvm, iter->vcpu_id); in vgic_debug_show()
/Linux-v5.15/arch/arm64/kvm/
Dtrace_arm.h181 TP_PROTO(unsigned long vcpu_id, __u32 irq, int level),
182 TP_ARGS(vcpu_id, irq, level),
185 __field( unsigned long, vcpu_id )
191 __entry->vcpu_id = vcpu_id;
197 __entry->vcpu_id, __entry->irq, __entry->level)
201 TP_PROTO(unsigned long vcpu_id, struct timer_map *map),
202 TP_ARGS(vcpu_id, map),
205 __field( unsigned long, vcpu_id )
212 __entry->vcpu_id = vcpu_id;
221 __entry->vcpu_id,
/Linux-v5.15/samples/acrn/
Dvm-sample.c49 int vcpu_id, ret; in main() local
86 regs.vcpu_id = 0; in main()
112 for (vcpu_id = 0; vcpu_id < vcpu_num; vcpu_id++) { in main()
113 io_req = &io_req_buf[vcpu_id]; in main()
125 notify.vcpu = vcpu_id; in main()
/Linux-v5.15/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 …]
/Linux-v5.15/drivers/virt/nitro_enclaves/
Dne_misc_dev.c517 int core_id, u32 vcpu_id) in ne_set_enclave_threads_per_core() argument
521 if (core_id < 0 && vcpu_id == 0) { in ne_set_enclave_threads_per_core()
530 "CPU %d is not in NE CPU pool\n", vcpu_id); in ne_set_enclave_threads_per_core()
562 static int ne_get_cpu_from_cpu_pool(struct ne_enclave *ne_enclave, u32 *vcpu_id) in ne_get_cpu_from_cpu_pool() argument
577 *vcpu_id = cpu; in ne_get_cpu_from_cpu_pool()
590 rc = ne_set_enclave_threads_per_core(ne_enclave, core_id, *vcpu_id); in ne_get_cpu_from_cpu_pool()
594 *vcpu_id = cpumask_any(ne_enclave->threads_per_core[core_id]); in ne_get_cpu_from_cpu_pool()
615 static int ne_get_vcpu_core_from_cpu_pool(u32 vcpu_id) in ne_get_vcpu_core_from_cpu_pool() argument
621 if (cpumask_test_cpu(vcpu_id, ne_cpu_pool.avail_threads_per_core[i])) { in ne_get_vcpu_core_from_cpu_pool()
641 static int ne_check_cpu_in_cpu_pool(struct ne_enclave *ne_enclave, u32 vcpu_id) in ne_check_cpu_in_cpu_pool() argument
[all …]
/Linux-v5.15/include/trace/events/
Dkvm.h348 TP_PROTO(bool grow, unsigned int vcpu_id, unsigned int new,
350 TP_ARGS(grow, vcpu_id, new, old),
354 __field(unsigned int, vcpu_id)
361 __entry->vcpu_id = vcpu_id;
367 __entry->vcpu_id,
373 #define trace_kvm_halt_poll_ns_grow(vcpu_id, new, old) \ argument
374 trace_kvm_halt_poll_ns(true, vcpu_id, new, old)
375 #define trace_kvm_halt_poll_ns_shrink(vcpu_id, new, old) \ argument
376 trace_kvm_halt_poll_ns(false, vcpu_id, new, old)
431 __field(int, vcpu_id)
[all …]
/Linux-v5.15/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()
/Linux-v5.15/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()
/Linux-v5.15/arch/s390/kvm/
Dsigp.c39 VCPU_EVENT(vcpu, 4, "sensed status of cpu %x rc %x", dst_vcpu->vcpu_id, in __sigp_sense()
49 .u.emerg.code = vcpu->vcpu_id, in __inject_sigp_emergency()
56 dst_vcpu->vcpu_id); in __inject_sigp_emergency()
98 .u.extcall.code = vcpu->vcpu_id, in __sigp_external_call()
109 dst_vcpu->vcpu_id); in __sigp_external_call()
127 dst_vcpu->vcpu_id); in __sigp_stop()
146 dst_vcpu->vcpu_id); in __sigp_stop_and_store_status()
247 dst_vcpu->vcpu_id, rc); in __sigp_sense_running()
354 order_code, dst_vcpu->vcpu_id); in handle_sigp_dst()
Dinterrupt.c54 sca->cpu[vcpu->vcpu_id].sigp_ctrl; in sca_ext_call_pending()
61 sca->cpu[vcpu->vcpu_id].sigp_ctrl; in sca_ext_call_pending()
83 &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); in sca_inject_ext_call()
95 &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); in sca_inject_ext_call()
126 &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); in sca_clear_ext_call()
134 &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); in sca_clear_ext_call()
496 trace_kvm_s390_deliver_interrupt(vcpu->vcpu_id, KVM_S390_INT_CPU_TIMER, in __deliver_cpu_timer()
520 trace_kvm_s390_deliver_interrupt(vcpu->vcpu_id, KVM_S390_INT_CLOCK_COMP, in __deliver_ckc()
552 trace_kvm_s390_deliver_interrupt(vcpu->vcpu_id, in __deliver_pfault_init()
720 trace_kvm_s390_deliver_interrupt(vcpu->vcpu_id, in __deliver_machine_check()
[all …]
/Linux-v5.15/arch/x86/kvm/svm/
Davic.c93 u32 vcpu_id = AVIC_GATAG_TO_VCPUID(ga_tag); in avic_ga_log_notifier() local
95 pr_debug("SVM: %s: vm_id=%#x, vcpu_id=%#x\n", __func__, vm_id, vcpu_id); in avic_ga_log_notifier()
96 trace_kvm_avic_ga_log(vm_id, vcpu_id); in avic_ga_log_notifier()
102 vcpu = kvm_get_vcpu_by_id(&kvm_svm->kvm, vcpu_id); in avic_ga_log_notifier()
258 int id = vcpu->vcpu_id; in avic_init_backing_page()
318 trace_kvm_avic_incomplete_ipi(vcpu->vcpu_id, icrh, icrl, id, index); in avic_incomplete_ipi_interception()
346 index, vcpu->vcpu_id, icrh, icrl); in avic_incomplete_ipi_interception()
443 if (vcpu->vcpu_id == id) in avic_handle_apic_id_update()
446 old = avic_get_physical_id_entry(vcpu, vcpu->vcpu_id); in avic_handle_apic_id_update()
546 trace_kvm_avic_unaccelerated_access(vcpu->vcpu_id, offset, in avic_unaccelerated_access_interception()
[all …]
/Linux-v5.15/tools/testing/selftests/kvm/lib/aarch64/
Ducall.c92 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc) in get_ucall() argument
94 struct kvm_run *run = vcpu_state(vm, vcpu_id); in get_ucall()
109 vcpu_run_complete_io(vm, vcpu_id); in get_ucall()
/Linux-v5.15/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 …]
/Linux-v5.15/arch/x86/kvm/mmu/
Dmmutrace.h260 __field(int, vcpu_id)
270 __entry->vcpu_id = vcpu->vcpu_id;
280 " new %llx spurious %d fixed %d", __entry->vcpu_id,
/Linux-v5.15/arch/mips/kvm/
Dstats.c54 kvm_info("\nKVM VCPU[%d] COP0 Access Profile:\n", vcpu->vcpu_id); in kvm_mips_dump_stats()

123