Lines Matching refs:target_vcpu
20 struct kvm_vcpu *target_vcpu; in kvm_sbi_hsm_vcpu_start() local
24 target_vcpu = kvm_get_vcpu_by_id(vcpu->kvm, target_vcpuid); in kvm_sbi_hsm_vcpu_start()
25 if (!target_vcpu) in kvm_sbi_hsm_vcpu_start()
28 spin_lock(&target_vcpu->arch.mp_state_lock); in kvm_sbi_hsm_vcpu_start()
30 if (!kvm_riscv_vcpu_stopped(target_vcpu)) { in kvm_sbi_hsm_vcpu_start()
35 spin_lock(&target_vcpu->arch.reset_cntx_lock); in kvm_sbi_hsm_vcpu_start()
36 reset_cntx = &target_vcpu->arch.guest_reset_context; in kvm_sbi_hsm_vcpu_start()
43 spin_unlock(&target_vcpu->arch.reset_cntx_lock); in kvm_sbi_hsm_vcpu_start()
45 kvm_make_request(KVM_REQ_VCPU_RESET, target_vcpu); in kvm_sbi_hsm_vcpu_start()
47 __kvm_riscv_vcpu_power_on(target_vcpu); in kvm_sbi_hsm_vcpu_start()
50 spin_unlock(&target_vcpu->arch.mp_state_lock); in kvm_sbi_hsm_vcpu_start()
78 struct kvm_vcpu *target_vcpu; in kvm_sbi_hsm_vcpu_get_status() local
80 target_vcpu = kvm_get_vcpu_by_id(vcpu->kvm, target_vcpuid); in kvm_sbi_hsm_vcpu_get_status()
81 if (!target_vcpu) in kvm_sbi_hsm_vcpu_get_status()
83 if (kvm_riscv_vcpu_stopped(target_vcpu)) in kvm_sbi_hsm_vcpu_get_status()
85 else if (target_vcpu->stat.generic.blocking) in kvm_sbi_hsm_vcpu_get_status()