vmci_host_dev 116 drivers/misc/vmw_vmci/vmci_host.c struct vmci_host_dev *vmci_host_dev; vmci_host_dev 118 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev = kzalloc(sizeof(struct vmci_host_dev), GFP_KERNEL); vmci_host_dev 119 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev == NULL) vmci_host_dev 122 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->ct_type = VMCIOBJ_NOT_SET; vmci_host_dev 123 drivers/misc/vmw_vmci/vmci_host.c mutex_init(&vmci_host_dev->lock); vmci_host_dev 124 drivers/misc/vmw_vmci/vmci_host.c filp->private_data = vmci_host_dev; vmci_host_dev 135 drivers/misc/vmw_vmci/vmci_host.c struct vmci_host_dev *vmci_host_dev = filp->private_data; vmci_host_dev 137 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type == VMCIOBJ_CONTEXT) { vmci_host_dev 138 drivers/misc/vmw_vmci/vmci_host.c vmci_ctx_destroy(vmci_host_dev->context); vmci_host_dev 139 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->context = NULL; vmci_host_dev 149 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->ct_type = VMCIOBJ_NOT_SET; vmci_host_dev 151 drivers/misc/vmw_vmci/vmci_host.c kfree(vmci_host_dev); vmci_host_dev 162 drivers/misc/vmw_vmci/vmci_host.c struct vmci_host_dev *vmci_host_dev = filp->private_data; vmci_host_dev 163 drivers/misc/vmw_vmci/vmci_host.c struct vmci_ctx *context = vmci_host_dev->context; vmci_host_dev 166 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type == VMCIOBJ_CONTEXT) { vmci_host_dev 252 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_get_version(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 257 drivers/misc/vmw_vmci/vmci_host.c if (get_user(vmci_host_dev->user_version, vptr)) vmci_host_dev 275 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->user_version > 0 && vmci_host_dev 276 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->user_version < VMCI_VERSION_HOSTQP) { vmci_host_dev 277 drivers/misc/vmw_vmci/vmci_host.c return vmci_host_dev->user_version; vmci_host_dev 286 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_init_context(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 299 drivers/misc/vmw_vmci/vmci_host.c mutex_lock(&vmci_host_dev->lock); vmci_host_dev 301 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_NOT_SET) { vmci_host_dev 314 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->context = vmci_ctx_create(init_block.cid, vmci_host_dev 316 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->user_version, vmci_host_dev 319 drivers/misc/vmw_vmci/vmci_host.c if (IS_ERR(vmci_host_dev->context)) { vmci_host_dev 320 drivers/misc/vmw_vmci/vmci_host.c retval = PTR_ERR(vmci_host_dev->context); vmci_host_dev 329 drivers/misc/vmw_vmci/vmci_host.c init_block.cid = vmci_ctx_get_id(vmci_host_dev->context); vmci_host_dev 331 drivers/misc/vmw_vmci/vmci_host.c vmci_ctx_destroy(vmci_host_dev->context); vmci_host_dev 332 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->context = NULL; vmci_host_dev 338 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->ct_type = VMCIOBJ_CONTEXT; vmci_host_dev 344 drivers/misc/vmw_vmci/vmci_host.c mutex_unlock(&vmci_host_dev->lock); vmci_host_dev 348 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_send_datagram(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 356 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 396 drivers/misc/vmw_vmci/vmci_host.c cid = vmci_ctx_get_id(vmci_host_dev->context); vmci_host_dev 403 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_receive_datagram(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 412 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 421 drivers/misc/vmw_vmci/vmci_host.c recv_info.result = vmci_ctx_dequeue_datagram(vmci_host_dev->context, vmci_host_dev 435 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_alloc_queuepair(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 443 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 448 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->user_version < VMCI_VERSION_NOVMVM) { vmci_host_dev 465 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->context); vmci_host_dev 490 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->context); vmci_host_dev 496 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->context); vmci_host_dev 504 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_queuepair_setva(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 512 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 517 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->user_version < VMCI_VERSION_NOVMVM) { vmci_host_dev 531 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->context, vmci_host_dev 539 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->context, 0); vmci_host_dev 545 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_queuepair_setpf(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 553 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->user_version < VMCI_VERSION_HOSTQP || vmci_host_dev 554 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->user_version >= VMCI_VERSION_NOVMVM) { vmci_host_dev 556 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->user_version); vmci_host_dev 560 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 596 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->context); vmci_host_dev 623 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_qp_detach(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 631 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 640 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->context); vmci_host_dev 642 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev->user_version < VMCI_VERSION_NOVMVM) { vmci_host_dev 649 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_ctx_add_notify(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 658 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 666 drivers/misc/vmw_vmci/vmci_host.c cid = vmci_ctx_get_id(vmci_host_dev->context); vmci_host_dev 672 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_ctx_remove_notify(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 681 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 689 drivers/misc/vmw_vmci/vmci_host.c cid = vmci_ctx_get_id(vmci_host_dev->context); vmci_host_dev 696 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_ctx_get_cpt_state(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 705 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 713 drivers/misc/vmw_vmci/vmci_host.c cid = vmci_ctx_get_id(vmci_host_dev->context); vmci_host_dev 728 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_ctx_set_cpt_state(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 737 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 750 drivers/misc/vmw_vmci/vmci_host.c cid = vmci_ctx_get_id(vmci_host_dev->context); vmci_host_dev 760 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_get_context_id(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 769 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_set_notify(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 775 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 785 drivers/misc/vmw_vmci/vmci_host.c vmci_host_setup_notify(vmci_host_dev->context, vmci_host_dev 788 drivers/misc/vmw_vmci/vmci_host.c vmci_ctx_unset_notify(vmci_host_dev->context); vmci_host_dev 796 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_notify_resource(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 803 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->user_version < VMCI_VERSION_NOTIFY) { vmci_host_dev 808 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 816 drivers/misc/vmw_vmci/vmci_host.c cid = vmci_ctx_get_id(vmci_host_dev->context); vmci_host_dev 846 drivers/misc/vmw_vmci/vmci_host.c static int vmci_host_do_recv_notifications(struct vmci_host_dev *vmci_host_dev, vmci_host_dev 857 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->ct_type != VMCIOBJ_CONTEXT) { vmci_host_dev 862 drivers/misc/vmw_vmci/vmci_host.c if (vmci_host_dev->user_version < VMCI_VERSION_NOTIFY) { vmci_host_dev 875 drivers/misc/vmw_vmci/vmci_host.c cid = vmci_ctx_get_id(vmci_host_dev->context); vmci_host_dev 908 drivers/misc/vmw_vmci/vmci_host.c vmci_host_dev, name, uptr); \ vmci_host_dev 911 drivers/misc/vmw_vmci/vmci_host.c struct vmci_host_dev *vmci_host_dev = filp->private_data; vmci_host_dev 948 drivers/misc/vmw_vmci/vmci_host.c return vmci_host_get_version(vmci_host_dev, iocmd, uptr);