Lines Matching refs:hyp_vcpu
262 struct pkvm_hyp_vcpu *hyp_vcpu = NULL; in pkvm_load_hyp_vcpu() local
270 hyp_vcpu = hyp_vm->vcpus[vcpu_idx]; in pkvm_load_hyp_vcpu()
274 return hyp_vcpu; in pkvm_load_hyp_vcpu()
277 void pkvm_put_hyp_vcpu(struct pkvm_hyp_vcpu *hyp_vcpu) in pkvm_put_hyp_vcpu() argument
279 struct pkvm_hyp_vm *hyp_vm = pkvm_hyp_vcpu_to_hyp_vm(hyp_vcpu); in pkvm_put_hyp_vcpu()
309 static int init_pkvm_hyp_vcpu(struct pkvm_hyp_vcpu *hyp_vcpu, in init_pkvm_hyp_vcpu() argument
324 hyp_vcpu->host_vcpu = host_vcpu; in init_pkvm_hyp_vcpu()
326 hyp_vcpu->vcpu.kvm = &hyp_vm->kvm; in init_pkvm_hyp_vcpu()
327 hyp_vcpu->vcpu.vcpu_id = READ_ONCE(host_vcpu->vcpu_id); in init_pkvm_hyp_vcpu()
328 hyp_vcpu->vcpu.vcpu_idx = vcpu_idx; in init_pkvm_hyp_vcpu()
330 hyp_vcpu->vcpu.arch.hw_mmu = &hyp_vm->kvm.arch.mmu; in init_pkvm_hyp_vcpu()
331 hyp_vcpu->vcpu.arch.cflags = READ_ONCE(host_vcpu->arch.cflags); in init_pkvm_hyp_vcpu()
538 struct pkvm_hyp_vcpu *hyp_vcpu; in __pkvm_init_vcpu() local
543 hyp_vcpu = map_donated_memory(vcpu_hva, sizeof(*hyp_vcpu)); in __pkvm_init_vcpu()
544 if (!hyp_vcpu) in __pkvm_init_vcpu()
561 ret = init_pkvm_hyp_vcpu(hyp_vcpu, hyp_vm, host_vcpu, idx); in __pkvm_init_vcpu()
565 hyp_vm->vcpus[idx] = hyp_vcpu; in __pkvm_init_vcpu()
571 unmap_donated_memory(hyp_vcpu, sizeof(*hyp_vcpu)); in __pkvm_init_vcpu()
623 struct pkvm_hyp_vcpu *hyp_vcpu = hyp_vm->vcpus[idx]; in __pkvm_teardown_vm() local
625 teardown_donated_memory(mc, hyp_vcpu, sizeof(*hyp_vcpu)); in __pkvm_teardown_vm()