Lines Matching refs:consume_q
148 struct vmci_queue *consume_q; member
204 struct vmci_queue *consume_q; member
217 void *consume_q; member
435 struct vmci_queue *consume_q = cons_q; in qp_alloc_ppn_set() local
438 if (!produce_q || !num_produce_pages || !consume_q || in qp_alloc_ppn_set()
465 consume_q->kernel_if->u.g.pas[i] >> PAGE_SHIFT; in qp_alloc_ppn_set()
579 struct vmci_queue *consume_q) in qp_init_queue_mutex() argument
588 consume_q->kernel_if->mutex = &produce_q->kernel_if->__mutex; in qp_init_queue_mutex()
597 struct vmci_queue *consume_q) in qp_cleanup_queue_mutex() argument
601 consume_q->kernel_if->mutex = NULL; in qp_cleanup_queue_mutex()
653 struct vmci_queue *consume_q) in qp_host_get_user_memory() argument
673 consume_q->kernel_if->num_pages, in qp_host_get_user_memory()
675 consume_q->kernel_if->u.h.header_page); in qp_host_get_user_memory()
676 if (retval < (int)consume_q->kernel_if->num_pages) { in qp_host_get_user_memory()
680 qp_release_pages(consume_q->kernel_if->u.h.header_page, in qp_host_get_user_memory()
698 struct vmci_queue *consume_q) in qp_host_register_user_memory() argument
712 consume_q); in qp_host_register_user_memory()
721 struct vmci_queue *consume_q) in qp_host_unregister_user_memory() argument
728 qp_release_pages(consume_q->kernel_if->u.h.header_page, in qp_host_unregister_user_memory()
729 consume_q->kernel_if->num_pages, true); in qp_host_unregister_user_memory()
730 memset(consume_q->kernel_if->u.h.header_page, 0, in qp_host_unregister_user_memory()
731 sizeof(*consume_q->kernel_if->u.h.header_page) * in qp_host_unregister_user_memory()
732 consume_q->kernel_if->num_pages); in qp_host_unregister_user_memory()
744 struct vmci_queue *consume_q) in qp_host_map_queues() argument
748 if (!produce_q->q_header || !consume_q->q_header) { in qp_host_map_queues()
751 if (produce_q->q_header != consume_q->q_header) in qp_host_map_queues()
759 headers[1] = *consume_q->kernel_if->u.h.header_page; in qp_host_map_queues()
763 consume_q->q_header = in qp_host_map_queues()
785 struct vmci_queue *consume_q) in qp_host_unmap_queues() argument
788 if (produce_q->q_header < consume_q->q_header) in qp_host_unmap_queues()
791 vunmap(consume_q->q_header); in qp_host_unmap_queues()
794 consume_q->q_header = NULL; in qp_host_unmap_queues()
884 void *consume_q) in qp_guest_endpoint_create() argument
907 entry->consume_q = consume_q; in qp_guest_endpoint_create()
932 qp_cleanup_queue_mutex(entry->produce_q, entry->consume_q); in qp_guest_endpoint_destroy()
934 qp_free_queue(entry->consume_q, entry->qp.consume_size); in qp_guest_endpoint_destroy()
1096 struct vmci_queue **consume_q, in qp_alloc_guest_work() argument
1145 my_produce_q = queue_pair_entry->consume_q; in qp_alloc_guest_work()
1230 *consume_q = (struct vmci_queue *)my_consume_q; in qp_alloc_guest_work()
1240 vmci_q_header_init((*consume_q)->q_header, *handle); in qp_alloc_guest_work()
1362 entry->consume_q = qp_host_alloc_queue(guest_consume_size); in qp_broker_create()
1363 if (entry->consume_q == NULL) { in qp_broker_create()
1368 qp_init_queue_mutex(entry->produce_q, entry->consume_q); in qp_broker_create()
1385 entry->consume_q->q_header = (struct vmci_queue_header *)tmp; in qp_broker_create()
1393 entry->consume_q); in qp_broker_create()
1427 vmci_q_header_init(entry->consume_q->q_header, in qp_broker_create()
1438 qp_host_free_queue(entry->consume_q, guest_consume_size); in qp_broker_create()
1640 entry->consume_q); in qp_broker_attach()
1773 struct vmci_queue **consume_q, in qp_alloc_host_work() argument
1807 *produce_q = entry->consume_q; in qp_alloc_host_work()
1808 *consume_q = entry->produce_q; in qp_alloc_host_work()
1811 *consume_q = entry->consume_q; in qp_alloc_host_work()
1832 struct vmci_queue **consume_q, in vmci_qp_alloc() argument
1841 if (!handle || !produce_q || !consume_q || in vmci_qp_alloc()
1847 produce_size, consume_q, in vmci_qp_alloc()
1852 produce_size, consume_q, in vmci_qp_alloc()
2019 entry->produce_q, entry->consume_q); in vmci_qp_broker_set_page_store()
2023 result = qp_host_map_queues(entry->produce_q, entry->consume_q); in vmci_qp_broker_set_page_store()
2026 entry->consume_q); in vmci_qp_broker_set_page_store()
2061 entry->consume_q->saved_header = NULL; in qp_reset_saved_headers()
2141 entry->consume_q->q_header; in vmci_qp_broker_detach()
2146 entry->consume_q); in vmci_qp_broker_detach()
2153 entry->consume_q); in vmci_qp_broker_detach()
2178 qp_cleanup_queue_mutex(entry->produce_q, entry->consume_q); in vmci_qp_broker_detach()
2180 qp_host_free_queue(entry->consume_q, entry->qp.consume_size); in vmci_qp_broker_detach()
2260 entry->consume_q); in vmci_qp_broker_map()
2289 entry->consume_q->saved_header != NULL) { in qp_save_headers()
2300 NULL == entry->consume_q->q_header) { in qp_save_headers()
2301 result = qp_host_map_queues(entry->produce_q, entry->consume_q); in qp_save_headers()
2309 memcpy(&entry->saved_consume_q, entry->consume_q->q_header, in qp_save_headers()
2311 entry->consume_q->saved_header = &entry->saved_consume_q; in qp_save_headers()
2364 qp_host_unmap_queues(gid, entry->produce_q, entry->consume_q); in vmci_qp_broker_unmap()
2374 entry->consume_q); in vmci_qp_broker_unmap()
2448 struct vmci_queue *consume_q) in qp_map_queue_headers() argument
2452 if (NULL == produce_q->q_header || NULL == consume_q->q_header) { in qp_map_queue_headers()
2453 result = qp_host_map_queues(produce_q, consume_q); in qp_map_queue_headers()
2456 consume_q->saved_header) ? in qp_map_queue_headers()
2476 result = qp_map_queue_headers(qpair->produce_q, qpair->consume_q); in qp_get_queue_headers()
2479 *consume_q_header = qpair->consume_q->q_header; in qp_get_queue_headers()
2481 qpair->consume_q->saved_header) { in qp_get_queue_headers()
2483 *consume_q_header = qpair->consume_q->saved_header; in qp_get_queue_headers()
2541 struct vmci_queue *consume_q, in qp_enqueue_locked() argument
2551 result = qp_map_queue_headers(produce_q, consume_q); in qp_enqueue_locked()
2556 consume_q->q_header, in qp_enqueue_locked()
2607 struct vmci_queue *consume_q, in qp_dequeue_locked() argument
2618 result = qp_map_queue_headers(produce_q, consume_q); in qp_dequeue_locked()
2622 buf_ready = vmci_q_header_buf_ready(consume_q->q_header, in qp_dequeue_locked()
2640 result = qp_memcpy_from_queue_iter(to, consume_q, head, read); in qp_dequeue_locked()
2646 result = qp_memcpy_from_queue_iter(to, consume_q, head, tmp); in qp_dequeue_locked()
2648 result = qp_memcpy_from_queue_iter(to, consume_q, 0, in qp_dequeue_locked()
2754 &my_qpair->consume_q, in vmci_qpair_alloc()
3053 qpair->consume_q, in vmci_qpair_enqueue()
3097 qpair->consume_q, in vmci_qpair_dequeue()
3142 qpair->consume_q, in vmci_qpair_peek()
3183 qpair->consume_q, in vmci_qpair_enquev()
3224 qpair->consume_q, in vmci_qpair_dequev()
3266 qpair->consume_q, in vmci_qpair_peekv()