Lines Matching refs:hyp_vcpu
268 struct pkvm_hyp_vcpu *hyp_vcpu = NULL; in pkvm_load_hyp_vcpu() local
276 hyp_vcpu = hyp_vm->vcpus[vcpu_idx]; in pkvm_load_hyp_vcpu()
280 return hyp_vcpu; in pkvm_load_hyp_vcpu()
283 void pkvm_put_hyp_vcpu(struct pkvm_hyp_vcpu *hyp_vcpu) in pkvm_put_hyp_vcpu() argument
285 struct pkvm_hyp_vm *hyp_vm = pkvm_hyp_vcpu_to_hyp_vm(hyp_vcpu); in pkvm_put_hyp_vcpu()
315 static int init_pkvm_hyp_vcpu(struct pkvm_hyp_vcpu *hyp_vcpu, in init_pkvm_hyp_vcpu() argument
330 hyp_vcpu->host_vcpu = host_vcpu; in init_pkvm_hyp_vcpu()
332 hyp_vcpu->vcpu.kvm = &hyp_vm->kvm; in init_pkvm_hyp_vcpu()
333 hyp_vcpu->vcpu.vcpu_id = READ_ONCE(host_vcpu->vcpu_id); in init_pkvm_hyp_vcpu()
334 hyp_vcpu->vcpu.vcpu_idx = vcpu_idx; in init_pkvm_hyp_vcpu()
336 hyp_vcpu->vcpu.arch.hw_mmu = &hyp_vm->kvm.arch.mmu; in init_pkvm_hyp_vcpu()
337 hyp_vcpu->vcpu.arch.cflags = READ_ONCE(host_vcpu->arch.cflags); in init_pkvm_hyp_vcpu()
545 struct pkvm_hyp_vcpu *hyp_vcpu; in __pkvm_init_vcpu() local
550 hyp_vcpu = map_donated_memory(vcpu_hva, sizeof(*hyp_vcpu)); in __pkvm_init_vcpu()
551 if (!hyp_vcpu) in __pkvm_init_vcpu()
568 ret = init_pkvm_hyp_vcpu(hyp_vcpu, hyp_vm, host_vcpu, idx); in __pkvm_init_vcpu()
572 hyp_vm->vcpus[idx] = hyp_vcpu; in __pkvm_init_vcpu()
578 unmap_donated_memory(hyp_vcpu, sizeof(*hyp_vcpu)); in __pkvm_init_vcpu()
582 hyp_vcpu->vcpu.arch.cptr_el2 = kvm_get_reset_cptr_el2(&hyp_vcpu->vcpu); in __pkvm_init_vcpu()
634 struct pkvm_hyp_vcpu *hyp_vcpu = hyp_vm->vcpus[idx]; in __pkvm_teardown_vm() local
636 teardown_donated_memory(mc, hyp_vcpu, sizeof(*hyp_vcpu)); in __pkvm_teardown_vm()