| /hyp/vm/vcpu/aarch64/src/ |
| A D | context_switch.c | 40 thread_t *thread = thread_get_self(); in vcpu_context_switch_load() local 52 thread->vcpu_regs_el1.contextidr_el1); in vcpu_context_switch_load() 117 thread->vcpu_regs_el1.scxtnum_el0); in vcpu_context_switch_load() 119 thread->vcpu_regs_el1.scxtnum_el1); in vcpu_context_switch_load() 139 : [q] "r"(thread->vcpu_regs_fpr.q), in vcpu_context_switch_load() 140 "m"(thread->vcpu_regs_fpr)); in vcpu_context_switch_load() 158 thread_t *thread = thread_get_self(); in vcpu_context_switch_save() local 170 thread->vcpu_regs_el1.par_el1.base = in vcpu_context_switch_save() 204 thread->vcpu_regs_el1.scxtnum_el0 = in vcpu_context_switch_save() 206 thread->vcpu_regs_el1.scxtnum_el1 = in vcpu_context_switch_save() [all …]
|
| A D | exception_inject.c | 33 thread_t *thread = thread_get_self(); in exception_inject() local 107 elr_el2 = thread->vcpu_regs_gpr.pc; in exception_inject() 115 thread->vcpu_regs_gpr.pc = elr_el2; in exception_inject() 128 assert(thread->addrspace != NULL); in inject_inst_data_abort() 154 &thread->vcpu_regs_gpr.pc); in inject_inst_data_abort() 168 scheduler_lock(thread); in inject_inst_data_abort() 169 scheduler_block(thread, in inject_inst_data_abort() 171 scheduler_unlock(thread); in inject_inst_data_abort() 275 scheduler_lock(thread); in inject_inst_data_abort() 277 scheduler_unlock(thread); in inject_inst_data_abort() [all …]
|
| /hyp/interfaces/scheduler/include/ |
| A D | scheduler.h | 60 scheduler_lock(thread_t *thread) ACQUIRE_SCHEDULER_LOCK(thread); 64 scheduler_lock_nopreempt(thread_t *thread) ACQUIRE_SCHEDULER_LOCK_NP(thread); 72 scheduler_unlock(thread_t *thread) RELEASE_SCHEDULER_LOCK(thread); 76 scheduler_unlock_nopreempt(thread_t *thread) RELEASE_SCHEDULER_LOCK_NP(thread); 151 scheduler_is_runnable(const thread_t *thread) REQUIRE_SCHEDULER_LOCK(thread); 159 scheduler_is_running(const thread_t *thread) REQUIRE_SCHEDULER_LOCK(thread); 190 scheduler_pin(thread_t *thread) REQUIRE_SCHEDULER_LOCK(thread); 200 scheduler_unpin(thread_t *thread) REQUIRE_SCHEDULER_LOCK(thread); 227 scheduler_get_affinity(thread_t *thread) REQUIRE_SCHEDULER_LOCK(thread); 240 scheduler_get_active_affinity(thread_t *thread) REQUIRE_SCHEDULER_LOCK(thread); [all …]
|
| /hyp/vm/arm_vm_timer/src/ |
| A D | arm_vm_timer_thread.c | 25 thread_t *thread = thread_create.thread; in arm_vm_timer_handle_object_create_thread() local 26 assert(thread != NULL); in arm_vm_timer_handle_object_create_thread() 28 if (thread->kind == THREAD_KIND_VCPU) { in arm_vm_timer_handle_object_create_thread() 43 if (thread->kind == THREAD_KIND_VCPU) { in arm_vm_timer_handle_object_activate_thread() 45 thread, in arm_vm_timer_handle_object_activate_thread() 50 &thread->physical_timer_virq_src, thread, in arm_vm_timer_handle_object_activate_thread() 78 thread_t *thread = thread_get_self(); in arm_vm_timer_handle_thread_context_switch_pre() local 83 vcpu_expects_wakeup(thread))) { in arm_vm_timer_handle_thread_context_switch_pre() 88 thread, in arm_vm_timer_handle_thread_context_switch_pre() 96 thread, in arm_vm_timer_handle_thread_context_switch_pre() [all …]
|
| A D | arm_vm_timer_irq.c | 24 (void)virq_assert(&thread->virtual_timer_virq_src, false); in arm_vm_timer_inject_timer_virq() 26 (void)virq_assert(&thread->physical_timer_virq_src, false); in arm_vm_timer_inject_timer_virq() 36 bool is_current = thread_get_self() == thread; in arm_vm_timer_type_timer_action() 39 arm_vm_timer_inject_timer_virq(thread, tt); in arm_vm_timer_type_timer_action() 41 arm_vm_timer_is_irq_enabled_thread(thread, tt)) { in arm_vm_timer_type_timer_action() 42 arm_vm_timer_inject_timer_virq(thread, tt); in arm_vm_timer_type_timer_action() 74 arm_vm_timer_inject_timer_virq(thread, tt); in arm_vm_timer_type_irq_received() 88 thread_t *thread = thread_get_self(); in arm_vm_timer_handle_irq_received() local 92 thread, ARM_VM_TIMER_TYPE_VIRTUAL); in arm_vm_timer_handle_irq_received() 95 thread, ARM_VM_TIMER_TYPE_PHYSICAL); in arm_vm_timer_handle_irq_received() [all …]
|
| /hyp/core/thread_standard/src/ |
| A D | thread.c | 40 thread_t *thread = thread_create.thread; in thread_standard_handle_object_create_thread() local 42 assert(thread != NULL); in thread_standard_handle_object_create_thread() 86 thread_t *thread = create.thread; in thread_standard_unwind_object_create_thread() local 87 assert(thread != NULL); in thread_standard_unwind_object_create_thread() 95 thread->stack_mem = 0U; in thread_standard_unwind_object_create_thread() 104 assert(thread != NULL); in thread_standard_handle_object_activate_thread() 107 thread->stack_base = in thread_standard_handle_object_activate_thread() 108 trigger_thread_get_stack_base_event(thread->kind, thread); in thread_standard_handle_object_activate_thread() 132 scheduler_lock(thread); in thread_standard_handle_object_activate_thread() 144 assert(thread != NULL); in thread_standard_handle_object_deactivate_thread() [all …]
|
| /hyp/core/scheduler_fprr/src/ |
| A D | scheduler_fprr.c | 186 can_be_scheduled(const thread_t *thread) REQUIRE_SCHEDULER_LOCK(thread) in can_be_scheduled() argument 226 thread_t *thread = thread_create.thread; in scheduler_fprr_handle_object_create_thread() local 228 assert(thread != NULL); in scheduler_fprr_handle_object_create_thread() 268 scheduler_lock(thread); in scheduler_fprr_handle_object_activate_thread() 275 (void)thread; in scheduler_fprr_handle_object_activate_thread() 290 scheduler_lock(thread); in scheduler_fprr_handle_vcpu_activate_thread() 323 scheduler_pin(thread); in scheduler_fprr_handle_vcpu_activate_thread() 747 add_thread_to_scheduler(thread_t *thread) REQUIRE_SCHEDULER_LOCK(thread) in add_thread_to_scheduler() argument 853 resched_running_thread(thread_t *thread) REQUIRE_SCHEDULER_LOCK(thread) in resched_running_thread() argument 883 thread, thread->scheduler_prev_affinity, in start_affinity_changed_events() [all …]
|
| /hyp/core/scheduler_trivial/src/ |
| A D | scheduler_trivial.c | 37 thread_t *thread = thread_create.thread; in scheduler_trivial_handle_object_create_thread() local 38 assert(thread != NULL); in scheduler_trivial_handle_object_create_thread() 45 thread->scheduler_affinity = cpu; in scheduler_trivial_handle_object_create_thread() 78 assert(thread != NULL); in scheduler_trivial_handle_object_deactivate_thread() 188 scheduler_lock(thread_t *thread) in scheduler_lock() argument 204 (uintptr_t)thread, block, thread->scheduler_block_bits[0]); in scheduler_block() 252 (uintptr_t)thread, block, thread->scheduler_block_bits[0], in scheduler_unblock() 292 if (thread == active_thread) { in scheduler_is_running() 309 scheduler_pin(thread_t *thread) in scheduler_pin() argument 312 (void)thread; in scheduler_pin() [all …]
|
| /hyp/vm/arm_vm_pmu/aarch64/src/ |
| A D | arm_vm_pmu.c | 99 arm_vm_pmu_save_state(thread_t *thread) in arm_vm_pmu_save_state() argument 108 thread->pmu.pmu_regs.pmcr_el0 = in arm_vm_pmu_save_state() 134 arm_vm_pmu_load_state(thread_t *thread) in arm_vm_pmu_load_state() argument 174 thread_t *thread = thread_get_self(); in arm_vm_pmu_handle_thread_save_state() local 179 arm_vm_pmu_save_state(thread); in arm_vm_pmu_handle_thread_save_state() 186 thread_t *thread = thread_get_self(); in arm_vm_pmu_handle_thread_context_switch_post() local 211 thread_t *thread = thread_get_self(); in arm_vm_pmu_handle_thread_load_state() local 222 arm_vm_pmu_load_state(thread); in arm_vm_pmu_handle_thread_load_state() 247 assert(thread != NULL); in arm_vm_pmu_handle_virq_check_pending() 249 if (thread == thread_get_self()) { in arm_vm_pmu_handle_virq_check_pending() [all …]
|
| /hyp/core/scheduler_fprr/include/ |
| A D | scheduler_lock.h | 8 #define ACQUIRE_SCHEDULER_LOCK(thread) ACQUIRE_SPINLOCK(thread->scheduler_lock) argument 9 #define ACQUIRE_SCHEDULER_LOCK_NP(thread) \ argument 10 ACQUIRE_SPINLOCK_NP(thread->scheduler_lock) 11 #define RELEASE_SCHEDULER_LOCK(thread) RELEASE_SPINLOCK(thread->scheduler_lock) argument 12 #define RELEASE_SCHEDULER_LOCK_NP(thread) \ argument 13 RELEASE_SPINLOCK_NP(thread->scheduler_lock) 14 #define REQUIRE_SCHEDULER_LOCK(thread) REQUIRE_SPINLOCK(thread->scheduler_lock) argument 15 #define EXCLUDE_SCHEDULER_LOCK(thread) EXCLUDE_SPINLOCK(thread->scheduler_lock) argument
|
| /hyp/core/rcu_sync/src/ |
| A D | rcu_sync.c | 43 scheduler_lock(thread); in rcu_sync() 46 .thread = object_get_thread_additional(thread), in rcu_sync() 51 scheduler_unlock(thread); in rcu_sync() 53 scheduler_lock(thread); in rcu_sync() 56 scheduler_unlock(thread); in rcu_sync() 76 scheduler_lock(thread); in rcu_sync_killable() 82 scheduler_unlock(thread); in rcu_sync_killable() 86 scheduler_lock(thread); in rcu_sync_killable() 106 thread_t *thread = atomic_load_relaxed(&state->thread); in rcu_sync_handle_update() local 112 scheduler_lock(thread); in rcu_sync_handle_update() [all …]
|
| /hyp/core/thread_standard/aarch64/src/ |
| A D | thread_arch.c | 65 thread_func(thread->params); in thread_arch_main() 144 assert(thread == idle_thread()); in thread_arch_set_thread() 159 new_pc = thread->context.pc; in thread_arch_set_thread() 183 assert(thread != NULL); in thread_freeze() 248 uintptr_t new_sp = (uintptr_t)thread->stack_base + thread->stack_size; in thread_reset_stack() 262 assert(thread != NULL); in thread_arch_init_context() 265 thread->context.sp = (uintptr_t)thread->stack_base + thread->stack_size; in thread_arch_init_context() 274 assert(thread != NULL); in thread_arch_map_stack() 282 err = pgtable_hyp_map(partition, thread->stack_base, thread->stack_size, in thread_arch_map_stack() 295 pgtable_hyp_unmap(thread->header.partition, thread->stack_base, in thread_arch_unmap_stack() [all …]
|
| /hyp/vm/vcpu/src/ |
| A D | vcpu.c | 50 thread_t *thread = create.thread; in vcpu_handle_object_create_thread() local 51 assert(thread != NULL); in vcpu_handle_object_create_thread() 54 if (thread->kind == THREAD_KIND_VCPU) { in vcpu_handle_object_create_thread() 73 assert(thread != NULL); in vcpu_handle_object_activate_thread() 75 if (thread->kind == THREAD_KIND_VCPU) { in vcpu_handle_object_activate_thread() 76 if (thread->cspace_cspace == NULL) { in vcpu_handle_object_activate_thread() 124 assert(thread != NULL); in vcpu_handle_vcpu_activate_thread() 125 assert(thread->kind == THREAD_KIND_VCPU); in vcpu_handle_vcpu_activate_thread() 131 &thread->header.partition->options)) { in vcpu_handle_vcpu_activate_thread() 147 if (thread->kind == THREAD_KIND_VCPU) { in vcpu_handle_object_deactivate_thread() [all …]
|
| /hyp/vm/arm_vm_pmu/src/ |
| A D | arm_vm_pmu.c | 21 arm_vm_pmu_handle_object_activate_thread(thread_t *thread) in arm_vm_pmu_handle_object_activate_thread() argument 25 if (thread->kind == THREAD_KIND_VCPU) { in arm_vm_pmu_handle_object_activate_thread() 26 ret = vic_bind_private_vcpu(&thread->pmu.pmu_virq_src, thread, in arm_vm_pmu_handle_object_activate_thread() 35 arm_vm_pmu_handle_object_deactivate_thread(thread_t *thread) in arm_vm_pmu_handle_object_deactivate_thread() argument 37 if (thread->kind == THREAD_KIND_VCPU) { in arm_vm_pmu_handle_object_deactivate_thread() 38 vic_unbind(&thread->pmu.pmu_virq_src); in arm_vm_pmu_handle_object_deactivate_thread()
|
| /hyp/vm/psci/src/ |
| A D | psci_common.c | 131 assert(thread != NULL); in psci_handle_vcpu_activate_thread() 134 scheduler_lock(thread); in psci_handle_vcpu_activate_thread() 246 thread_t *thread = in psci_get_thread_by_mpidr() local 248 if ((thread != NULL) && in psci_get_thread_by_mpidr() 252 result = thread; in psci_get_thread_by_mpidr() 585 if (thread == NULL) { in psci_affinity_info() 601 if (thread != NULL) { in psci_affinity_info() 653 thread_t *thread = in psci_stop_all_vcpus() local 655 if ((thread != NULL) && (thread != current)) { in psci_stop_all_vcpus() 828 thread_t *thread = thread_create.thread; in psci_handle_object_create_thread() local [all …]
|
| /hyp/vm/arm_pv_time/src/ |
| A D | arm_pv_time.c | 84 thread_t *thread = thread_create.thread; in arm_pv_time_handle_object_create_thread() local 85 assert(thread != NULL); in arm_pv_time_handle_object_create_thread() 99 assert(thread != NULL); in arm_pv_time_handle_vcpu_activate_thread() 107 if ((thread->addrspace->info_area.me != NULL)) { in arm_pv_time_handle_vcpu_activate_thread() 108 index_t index = thread->vgic_gicr_index; in arm_pv_time_handle_vcpu_activate_thread() 111 thread->arm_pv_time.data = &thread->addrspace->info_area.hyp_va in arm_pv_time_handle_vcpu_activate_thread() 114 thread->arm_pv_time.data->revision = 0U; in arm_pv_time_handle_vcpu_activate_thread() 115 thread->arm_pv_time.data->attributes = 0U; in arm_pv_time_handle_vcpu_activate_thread() 187 if (thread == thread_get_self()) { in arm_pv_time_handle_scheduler_blocked() 191 (uintptr_t)thread, (register_t)block); in arm_pv_time_handle_scheduler_blocked() [all …]
|
| /hyp/core/tests/src/ |
| A D | tests.c | 61 thread_t *thread = create.thread; in tests_handle_object_create_thread() local 62 assert(thread != NULL); in tests_handle_object_create_thread() 64 if (thread->kind == THREAD_KIND_TEST) { in tests_handle_object_create_thread() 65 scheduler_block_init(thread, SCHEDULER_BLOCK_TEST); in tests_handle_object_create_thread() 136 thread_t *thread = tests_thread_create(i); in tests_thread_init() local 137 scheduler_lock(thread); in tests_thread_init() 138 scheduler_unblock(thread, SCHEDULER_BLOCK_TEST); in tests_thread_init() 139 scheduler_unlock(thread); in tests_thread_init() 143 object_put_thread(thread); in tests_thread_init() 173 assert(thread != NULL); in tests_handle_thread_get_stack_base() [all …]
|
| /hyp/interfaces/thread/include/ |
| A D | thread.h | 32 thread_switch_to(thread_t *thread, ticks_t curticks) REQUIRE_PREEMPT_DISABLED; 46 thread_kill(thread_t *thread); 57 thread_is_dying(const thread_t *thread); 68 thread_has_exited(const thread_t *thread); 76 thread_join(thread_t *thread); 90 thread_join_killable(thread_t *thread);
|
| /hyp/vm/vcpu/cortex-a-v8_0/src/ |
| A D | context_switch.c | 19 thread_t *thread = thread_get_self(); in vcpu_context_switch_cpu_load() local 21 if (compiler_expected(thread->kind == THREAD_KIND_VCPU)) { in vcpu_context_switch_cpu_load() 29 thread_t *thread = thread_get_self(); in vcpu_context_switch_cpu_save() local 31 if (compiler_expected(thread->kind == THREAD_KIND_VCPU)) { in vcpu_context_switch_cpu_save()
|
| /hyp/vm/vcpu/cortex-a-v8_2/src/ |
| A D | context_switch.c | 19 thread_t *thread = thread_get_self(); in vcpu_context_switch_cpu_load() local 21 if (compiler_expected(thread->kind == THREAD_KIND_VCPU)) { in vcpu_context_switch_cpu_load() 29 thread_t *thread = thread_get_self(); in vcpu_context_switch_cpu_save() local 31 if (compiler_expected(thread->kind == THREAD_KIND_VCPU)) { in vcpu_context_switch_cpu_save()
|
| /hyp/vm/vcpu/cortex-a-v9/src/ |
| A D | context_switch.c | 19 thread_t *thread = thread_get_self(); in vcpu_context_switch_cpu_load() local 21 if (compiler_expected(thread->kind == THREAD_KIND_VCPU)) { in vcpu_context_switch_cpu_load() 29 thread_t *thread = thread_get_self(); in vcpu_context_switch_cpu_save() local 31 if (compiler_expected(thread->kind == THREAD_KIND_VCPU)) { in vcpu_context_switch_cpu_save()
|
| /hyp/vm/vcpu/qemu-armv8-5a-rng/src/ |
| A D | context_switch.c | 21 thread_t *thread = thread_get_self(); in vcpu_context_switch_cpu_load() local 23 if (compiler_expected(thread->kind == THREAD_KIND_VCPU)) { in vcpu_context_switch_cpu_load() 31 thread_t *thread = thread_get_self(); in vcpu_context_switch_cpu_save() local 33 if (compiler_expected(thread->kind == THREAD_KIND_VCPU)) { in vcpu_context_switch_cpu_save()
|
| /hyp/vm/arm_vm_timer/aarch64/src/ |
| A D | arm_vm_timer.c | 326 cnt_ctl = thread->vcpu_regs_el1.cntv_ctl_el0; in arm_vm_timer_is_irq_enabled_thread() 328 cnt_ctl = thread->vcpu_regs_el1.cntp_ctl_el0; in arm_vm_timer_is_irq_enabled_thread() 342 cnt_cval = thread->vcpu_regs_el1.cntv_cval_el0; in arm_vm_timer_get_timeout_thread() 344 cnt_cval = thread->vcpu_regs_el1.cntp_cval_el0; in arm_vm_timer_get_timeout_thread() 353 arm_vm_timer_load_state(thread_t *thread) in arm_vm_timer_load_state() argument 360 thread->vcpu_regs_el1.cntv_cval_el0, &asm_ordering); in arm_vm_timer_load_state() 370 thread_t *thread = thread_get_self(); in arm_vm_timer_handle_thread_save_state() local 375 thread->vcpu_regs_el1.cntv_ctl_el0 = in arm_vm_timer_handle_thread_save_state() 377 thread->vcpu_regs_el1.cntv_cval_el0 = in arm_vm_timer_handle_thread_save_state() 379 thread->vcpu_regs_el1.cntp_ctl_el0 = in arm_vm_timer_handle_thread_save_state() [all …]
|
| /hyp/core/thread_standard/ |
| A D | build.conf | 5 interface thread 7 types thread.tc 8 events thread.ev 9 source init.c thread.c
|
| /hyp/vm/arm_vm_sve_simple/aarch64/src/ |
| A D | arm_vm_sve.c | 104 arm_vm_sve_simple_handle_vcpu_activate_thread(thread_t *thread, in arm_vm_sve_simple_handle_vcpu_activate_thread() argument 107 assert(thread != NULL); in arm_vm_sve_simple_handle_vcpu_activate_thread() 110 if (thread->kind == THREAD_KIND_VCPU) { in arm_vm_sve_simple_handle_vcpu_activate_thread() 119 CPTR_EL2_E2H1_set_ZEN(&thread->vcpu_regs_el2.cptr_el2, in arm_vm_sve_simple_handle_vcpu_activate_thread() 121 vcpu_option_flags_set_sve_allowed(&thread->vcpu_options, in arm_vm_sve_simple_handle_vcpu_activate_thread() 128 CPTR_EL2_E2H1_set_ZEN(&thread->vcpu_regs_el2.cptr_el2, in arm_vm_sve_simple_handle_vcpu_activate_thread() 144 thread_t *thread = thread_get_self(); in arm_vm_sve_simple_handle_vcpu_trap_sysreg_read() local 158 if (vcpu_option_flags_get_sve_allowed(&thread->vcpu_options)) { in arm_vm_sve_simple_handle_vcpu_trap_sysreg_read() 164 vcpu_gpr_write(thread, reg_num, val); in arm_vm_sve_simple_handle_vcpu_trap_sysreg_read()
|