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;
255 context->notify = kmap(context->notify_page) + (uva & (PAGE_SIZE - 1));
256 vmci_ctx_check_signal_notify(context);
323 vmci_host_dev->context = vmci_ctx_create(init_block.cid,
328 if (IS_ERR(vmci_host_dev->context)) {
329 retval = PTR_ERR(vmci_host_dev->context);
330 vmci_ioctl_err("error initializing context\n");
338 init_block.cid = vmci_ctx_get_id(vmci_host_dev->context);
340 vmci_ctx_destroy(vmci_host_dev->context);
341 vmci_host_dev->context = NULL;
402 dg->dst.context, dg->dst.resource,
403 dg->src.context, dg->src.resource,
406 /* Get source context id. */
407 cid = vmci_ctx_get_id(vmci_host_dev->context);
432 recv_info.result = vmci_ctx_dequeue_datagram(vmci_host_dev->context,
476 vmci_host_dev->context);
501 vmci_host_dev->context);
507 vmci_host_dev->context);
542 vmci_host_dev->context,
550 vmci_host_dev->context, 0);
607 vmci_host_dev->context);
651 vmci_host_dev->context);
677 cid = vmci_ctx_get_id(vmci_host_dev->context);
700 cid = vmci_ctx_get_id(vmci_host_dev->context);
724 cid = vmci_ctx_get_id(vmci_host_dev->context);
761 cid = vmci_ctx_get_id(vmci_host_dev->context);
796 vmci_host_setup_notify(vmci_host_dev->context,
799 vmci_ctx_unset_notify(vmci_host_dev->context);
827 cid = vmci_ctx_get_id(vmci_host_dev->context);
886 cid = vmci_ctx_get_id(vmci_host_dev->context);