Lines Matching full:vcore

137  * online threads in the vcore being run.
176 /* Used to traverse the list of runnable threads for a given vcore */
254 * run as part of a virtual core, but the task running the vcore
259 * of running the core, and the other vcpu tasks in the vcore will
264 * a vcore using vc->stolen_tb, and the stolen time when the vcpu
267 * stolen time for a vcore when it is inactive, or for a vcpu
278 * updates to vc->stolen_tb are protected by the vcore->stoltb_lock
317 struct kvmppc_vcore *vc = vcpu->arch.vcore; in kvmppc_core_vcpu_load_hv()
333 * We can test vc->runner without taking the vcore lock, in kvmppc_core_vcpu_load_hv()
352 struct kvmppc_vcore *vc = vcpu->arch.vcore; in kvmppc_core_vcpu_put_hv()
394 struct kvmppc_vcore *vc = vcpu->arch.vcore; in kvmppc_set_arch_compat()
478 vcpu->arch.vcore->lpcr, vcpu->kvm->arch.sdr1, in kvmppc_dump_regs()
716 * Return the accumulated stolen time for the vcore up until `now'.
717 * The caller should hold the vcore lock.
833 * Ensure that the read of vcore->dpdes comes after the read in kvmppc_doorbell_pending()
838 vc = vcpu->arch.vcore; in kvmppc_doorbell_pending()
845 if (vcpu->arch.vcore->arch_compat >= PVR_ARCH_207) in kvmppc_power8_compatible()
847 if ((!vcpu->arch.vcore->arch_compat) && in kvmppc_power8_compatible()
988 struct kvmppc_vcore *vcore = target->arch.vcore; in kvm_arch_vcpu_yield_to() local
993 * H_SUCCESS if the source vcore wasn't idle (e.g. if it may in kvm_arch_vcpu_yield_to()
997 * In the case of the P9 single vcpu per vcore case, the real in kvm_arch_vcpu_yield_to()
999 * source vcore. in kvm_arch_vcpu_yield_to()
1002 spin_lock(&vcore->lock); in kvm_arch_vcpu_yield_to()
1004 vcore->vcore_state != VCORE_INACTIVE && in kvm_arch_vcpu_yield_to()
1005 vcore->runner) in kvm_arch_vcpu_yield_to()
1006 target = vcore->runner; in kvm_arch_vcpu_yield_to()
1007 spin_unlock(&vcore->lock); in kvm_arch_vcpu_yield_to()
1456 * which will update its vcore->dpdes value. in kvmppc_read_dpdes()
1506 vcpu->arch.vcore->dpdes = 0; in kvmppc_emulate_doorbell_instr()
2131 struct kvmppc_vcore *vc = vcpu->arch.vcore; in kvmppc_set_lpcr()
2154 * MSR_LE bit in the intr_msr for each vcpu in this vcore. in kvmppc_set_lpcr()
2161 if (vcpu->arch.vcore != vc) in kvmppc_set_lpcr()
2258 * either vcore->dpdes or doorbell_request. in kvmppc_get_one_reg_hv()
2264 *val = get_reg_val(id, vcpu->arch.vcore->dpdes); in kvmppc_get_one_reg_hv()
2267 *val = get_reg_val(id, vcpu->arch.vcore->vtb); in kvmppc_get_one_reg_hv()
2326 *val = get_reg_val(id, vcpu->arch.vcore->tb_offset); in kvmppc_get_one_reg_hv()
2330 *val = get_reg_val(id, vcpu->arch.vcore->lpcr); in kvmppc_get_one_reg_hv()
2402 *val = get_reg_val(id, vcpu->arch.vcore->arch_compat); in kvmppc_get_one_reg_hv()
2504 vcpu->arch.vcore->dpdes = set_reg_val(id, *val); in kvmppc_set_one_reg_hv()
2507 vcpu->arch.vcore->vtb = set_reg_val(id, *val); in kvmppc_set_one_reg_hv()
2593 vcpu->arch.vcore->tb_offset = tb_offset; in kvmppc_set_one_reg_hv()
2679 atomic_inc(&vcpu->arch.vcore->online_count); in kvmppc_set_one_reg_hv()
2681 atomic_dec(&vcpu->arch.vcore->online_count); in kvmppc_set_one_reg_hv()
2711 struct kvmppc_vcore *vcore; in kvmppc_vcore_create() local
2713 vcore = kzalloc(sizeof(struct kvmppc_vcore), GFP_KERNEL); in kvmppc_vcore_create()
2715 if (vcore == NULL) in kvmppc_vcore_create()
2718 spin_lock_init(&vcore->lock); in kvmppc_vcore_create()
2719 spin_lock_init(&vcore->stoltb_lock); in kvmppc_vcore_create()
2720 rcuwait_init(&vcore->wait); in kvmppc_vcore_create()
2721 vcore->preempt_tb = TB_NIL; in kvmppc_vcore_create()
2722 vcore->lpcr = kvm->arch.lpcr; in kvmppc_vcore_create()
2723 vcore->first_vcpuid = id; in kvmppc_vcore_create()
2724 vcore->kvm = kvm; in kvmppc_vcore_create()
2725 INIT_LIST_HEAD(&vcore->preempt_list); in kvmppc_vcore_create()
2727 return vcore; in kvmppc_vcore_create()
2885 struct kvmppc_vcore *vcore; in kvmppc_core_vcpu_create_hv() local
2952 vcore = NULL; in kvmppc_core_vcpu_create_hv()
2966 vcore = kvm->arch.vcores[core]; in kvmppc_core_vcpu_create_hv()
2967 if (vcore && cpu_has_feature(CPU_FTR_ARCH_300)) { in kvmppc_core_vcpu_create_hv()
2969 vcore = NULL; in kvmppc_core_vcpu_create_hv()
2970 } else if (!vcore) { in kvmppc_core_vcpu_create_hv()
2976 vcore = kvmppc_vcore_create(kvm, in kvmppc_core_vcpu_create_hv()
2979 kvm->arch.vcores[core] = vcore; in kvmppc_core_vcpu_create_hv()
2986 if (!vcore) in kvmppc_core_vcpu_create_hv()
2989 spin_lock(&vcore->lock); in kvmppc_core_vcpu_create_hv()
2990 ++vcore->num_threads; in kvmppc_core_vcpu_create_hv()
2991 spin_unlock(&vcore->lock); in kvmppc_core_vcpu_create_hv()
2992 vcpu->arch.vcore = vcore; in kvmppc_core_vcpu_create_hv()
2993 vcpu->arch.ptid = vcpu->vcpu_id - vcore->first_vcpuid; in kvmppc_core_vcpu_create_hv()
3016 * so we pack smt_mode vcpus per vcore. in kvmhv_set_smt_mode()
3023 * so each vcpu gets its own vcore. in kvmhv_set_smt_mode()
3275 * We set the vcore pointer when starting a thread in kvmppc_wait_for_nap()
3277 * for any threads that still have a non-NULL vcore ptr. in kvmppc_wait_for_nap()
3475 * vcore *pvc onto the execution of the other vcores described in *cip.
3564 * It's safe to unlock the vcore in the loop here, because in post_guest_process()
3566 * the vcpu, and the vcore state is VCORE_EXITING here, in post_guest_process()
3766 /* Unlock all except the primary vcore */ in kvmppc_run_core()
3849 * or if the vcore's online count looks bogus. in kvmppc_run_core()
3891 * the vcore pointer in the PACA of the secondaries. in kvmppc_run_core()
4021 struct kvmppc_vcore *vc = vcpu->arch.vcore; in kvmhv_vcpu_entry_p9_nested()
4283 * Check to see if any of the runnable vcpus on the vcore have pending
4300 * All the vcpus in this vcore are idle, so wait for a decrementer
4453 vc = vcpu->arch.vcore; in kvmppc_run_vcpu()
4465 * If the vcore is already running, we may be able to start in kvmppc_run_vcpu()
4585 vc = vcpu->arch.vcore; in kvmhv_run_single_vcpu()
4807 atomic_inc(&vcpu->arch.vcore->online_count); in kvmppc_vcpu_run_hv()
4836 vcpu->arch.waitp = &vcpu->arch.vcore->wait; in kvmppc_vcpu_run_hv()
4844 vcpu->arch.vcore->lpcr); in kvmppc_vcpu_run_hv()
5500 * all vCPUs in a vcore have to run on the same (sub)core, in kvmppc_core_init_vm_hv()