Lines Matching defs:context

85 	struct vmci_ctx *context;
88 struct mutex lock; /* Mutex lock for vmci context access */
143 vmci_ctx_destroy(vmci_host_dev->context);
144 vmci_host_dev->context = NULL;
149 * a context is created through the IOCTL_VMCI_INIT_CONTEXT
168 struct vmci_ctx *context;
173 * Read context only if ct_type == VMCIOBJ_CONTEXT to make
174 * sure that context is initialized
176 context = vmci_host_dev->context;
178 /* Check for VMCI calls to this VM context. */
180 poll_wait(filp, &context->host_context.wait_queue,
183 spin_lock(&context->lock);
184 if (context->pending_datagrams > 0 ||
186 context->pending_doorbell_array) > 0) {
189 spin_unlock(&context->lock);
224 * Sets up a given context for notify to work. Maps the notify
227 static int vmci_host_setup_notify(struct vmci_ctx *context,
232 if (context->notify_page) {
246 retval = get_user_pages_fast(uva, 1, FOLL_WRITE, &context->notify_page);
248 context->notify_page = NULL;
251 if (context->notify_page == NULL)
257 context->notify = kmap(context->notify_page) + (uva & (PAGE_SIZE - 1));
258 vmci_ctx_check_signal_notify(context);
325 vmci_host_dev->context = vmci_ctx_create(init_block.cid,
330 if (IS_ERR(vmci_host_dev->context)) {
331 retval = PTR_ERR(vmci_host_dev->context);
332 vmci_ioctl_err("error initializing context\n");
340 init_block.cid = vmci_ctx_get_id(vmci_host_dev->context);
342 vmci_ctx_destroy(vmci_host_dev->context);
343 vmci_host_dev->context = NULL;
404 dg->dst.context, dg->dst.resource,
405 dg->src.context, dg->src.resource,
408 /* Get source context id. */
409 cid = vmci_ctx_get_id(vmci_host_dev->context);
434 recv_info.result = vmci_ctx_dequeue_datagram(vmci_host_dev->context,
478 vmci_host_dev->context);
503 vmci_host_dev->context);
509 vmci_host_dev->context);
544 vmci_host_dev->context,
552 vmci_host_dev->context, 0);
609 vmci_host_dev->context);
653 vmci_host_dev->context);
679 cid = vmci_ctx_get_id(vmci_host_dev->context);
702 cid = vmci_ctx_get_id(vmci_host_dev->context);
726 cid = vmci_ctx_get_id(vmci_host_dev->context);
763 cid = vmci_ctx_get_id(vmci_host_dev->context);
798 vmci_host_setup_notify(vmci_host_dev->context,
801 vmci_ctx_unset_notify(vmci_host_dev->context);
829 cid = vmci_ctx_get_id(vmci_host_dev->context);
888 cid = vmci_ctx_get_id(vmci_host_dev->context);