Lines Matching refs:handle
216 * Start the VM table handle at the offset defined instead of at 0.
221 static unsigned int vm_handle_to_idx(pkvm_handle_t handle)
223 return handle - HANDLE_OFFSET;
262 * Return the hyp vm structure corresponding to the handle.
264 static struct pkvm_hyp_vm *get_vm_by_handle(pkvm_handle_t handle)
266 unsigned int idx = vm_handle_to_idx(handle);
274 struct pkvm_hyp_vcpu *pkvm_load_hyp_vcpu(pkvm_handle_t handle,
281 hyp_vm = get_vm_by_handle(handle);
368 * Return a unique handle to the protected VM on success,
391 hyp_vm->kvm.arch.pkvm.handle = idx_to_vm_handle(idx);
400 return hyp_vm->kvm.arch.pkvm.handle;
404 * Deallocate and remove the VM table entry corresponding to the handle.
406 static void remove_vm_table_entry(pkvm_handle_t handle)
409 vm_table[vm_handle_to_idx(handle)] = NULL;
479 * Return a unique handle to the protected VM on success,
526 return hyp_vm->kvm.arch.pkvm.handle;
529 remove_vm_table_entry(hyp_vm->kvm.arch.pkvm.handle);
544 * handle: The handle for the protected vm.
551 int __pkvm_init_vcpu(pkvm_handle_t handle, struct kvm_vcpu *host_vcpu,
565 hyp_vm = get_vm_by_handle(handle);
604 int __pkvm_teardown_vm(pkvm_handle_t handle)
614 hyp_vm = get_vm_by_handle(handle);
629 remove_vm_table_entry(handle);