Lines Matching defs:handle
234 if (!vmci_handle_is_equal(node->handle, context_handle))
448 * removes the handle from the array. If
449 * detach fails, we must remove the handle
503 * it can handle and the datagram is only unqueued if the
628 notifier->handle = vmci_make_handle(remote_cid, VMCI_EVENT_HANDLER);
634 if (vmci_handle_is_equal(n->handle, notifier->handle)) {
669 struct vmci_handle handle;
676 handle = vmci_make_handle(remote_cid, VMCI_EVENT_HANDLER);
681 if (vmci_handle_is_equal(notifier->handle, handle)) {
725 notifiers[i++] = entry->handle.context;
751 dbells[i].handle = vmci_handle_arr_get_entry(
855 * form of a handle array. The handle arrays returned are the
890 * Releases handle arrays with pending notifications previously
904 struct vmci_handle handle;
913 handle = vmci_handle_arr_remove_tail(
915 while (!vmci_handle_is_invalid(handle)) {
917 handle)) {
919 &db_handle_array, handle);
921 handle = vmci_handle_arr_remove_tail(
941 * Registers that a new doorbell handle has been allocated by the
944 int vmci_ctx_dbell_create(u32 context_id, struct vmci_handle handle)
949 if (context_id == VMCI_INVALID_ID || vmci_handle_is_invalid(handle))
957 if (!vmci_handle_arr_has_entry(context->doorbell_array, handle))
959 handle);
970 * Unregisters a doorbell handle that was previously registered
973 int vmci_ctx_dbell_destroy(u32 context_id, struct vmci_handle handle)
978 if (context_id == VMCI_INVALID_ID || vmci_handle_is_invalid(handle))
987 vmci_handle_arr_remove_entry(context->doorbell_array, handle);
988 vmci_handle_arr_remove_entry(context->pending_doorbell_array, handle);
1004 struct vmci_handle handle;
1016 handle = vmci_handle_arr_remove_tail(arr);
1017 } while (!vmci_handle_is_invalid(handle));
1020 handle = vmci_handle_arr_remove_tail(arr);
1021 } while (!vmci_handle_is_invalid(handle));
1030 * Registers a notification of a doorbell handle initiated by the
1040 struct vmci_handle handle,
1046 if (vmci_handle_is_invalid(handle))
1050 dst_context = vmci_ctx_get(handle.context);
1052 pr_devel("Invalid context (ID=0x%x)\n", handle.context);
1056 if (src_cid != handle.context) {
1060 VMCI_CONTEXT_IS_VM(handle.context)) {
1062 src_cid, handle.context);
1067 result = vmci_dbell_get_priv_flags(handle, &dst_priv_flags);
1069 pr_warn("Failed to get privilege flags for destination (handle=0x%x:0x%x)\n",
1070 handle.context, handle.resource);
1085 if (handle.context == VMCI_HOST_CONTEXT_ID) {
1086 result = vmci_dbell_host_context_notify(src_cid, handle);
1091 handle)) {
1096 handle)) {
1099 handle);
1123 * Registers that a new queue pair handle has been allocated by
1126 int vmci_ctx_qp_create(struct vmci_ctx *context, struct vmci_handle handle)
1130 if (context == NULL || vmci_handle_is_invalid(handle))
1133 if (!vmci_handle_arr_has_entry(context->queue_pair_array, handle))
1135 &context->queue_pair_array, handle);
1143 * Unregisters a queue pair handle that was previously registered
1146 int vmci_ctx_qp_destroy(struct vmci_ctx *context, struct vmci_handle handle)
1150 if (context == NULL || vmci_handle_is_invalid(handle))
1153 hndl = vmci_handle_arr_remove_entry(context->queue_pair_array, handle);
1160 * Determines whether a given queue pair handle is registered
1163 bool vmci_ctx_qp_exists(struct vmci_ctx *context, struct vmci_handle handle)
1165 if (context == NULL || vmci_handle_is_invalid(handle))
1168 return vmci_handle_arr_has_entry(context->queue_pair_array, handle);