Lines Matching defs:handle
212 * Start the VM table handle at the offset defined instead of at 0.
217 static unsigned int vm_handle_to_idx(pkvm_handle_t handle)
219 return handle - HANDLE_OFFSET;
247 * Return the hyp vm structure corresponding to the handle.
249 static struct pkvm_hyp_vm *get_vm_by_handle(pkvm_handle_t handle)
251 unsigned int idx = vm_handle_to_idx(handle);
259 struct pkvm_hyp_vcpu *pkvm_load_hyp_vcpu(pkvm_handle_t handle,
266 hyp_vm = get_vm_by_handle(handle);
353 * Return a unique handle to the protected VM on success,
376 hyp_vm->kvm.arch.pkvm.handle = idx_to_vm_handle(idx);
385 return hyp_vm->kvm.arch.pkvm.handle;
389 * Deallocate and remove the VM table entry corresponding to the handle.
391 static void remove_vm_table_entry(pkvm_handle_t handle)
394 vm_table[vm_handle_to_idx(handle)] = NULL;
463 * Return a unique handle to the protected VM on success,
510 return hyp_vm->kvm.arch.pkvm.handle;
513 remove_vm_table_entry(hyp_vm->kvm.arch.pkvm.handle);
528 * handle: The handle for the protected vm.
535 int __pkvm_init_vcpu(pkvm_handle_t handle, struct kvm_vcpu *host_vcpu,
549 hyp_vm = get_vm_by_handle(handle);
588 int __pkvm_teardown_vm(pkvm_handle_t handle)
598 hyp_vm = get_vm_by_handle(handle);
613 remove_vm_table_entry(handle);