Lines Matching refs:vmbus_connection

26 struct vmbus_connection vmbus_connection = {  variable
31 vmbus_connection.ready_for_suspend_event),
33 vmbus_connection.ready_for_resume_event),
35 EXPORT_SYMBOL_GPL(vmbus_connection);
95 vmbus_connection.msg_conn_id = VMBUS_MESSAGE_CONNECTION_ID_4; in vmbus_negotiate_version()
97 msg->interrupt_page = virt_to_phys(vmbus_connection.int_page); in vmbus_negotiate_version()
98 vmbus_connection.msg_conn_id = VMBUS_MESSAGE_CONNECTION_ID; in vmbus_negotiate_version()
101 msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]); in vmbus_negotiate_version()
102 msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]); in vmbus_negotiate_version()
115 vmbus_connection.connect_cpu = cur_cpu; in vmbus_negotiate_version()
119 vmbus_connection.connect_cpu = 0; in vmbus_negotiate_version()
126 spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); in vmbus_negotiate_version()
128 &vmbus_connection.chn_msg_list); in vmbus_negotiate_version()
130 spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags); in vmbus_negotiate_version()
139 spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); in vmbus_negotiate_version()
141 spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, in vmbus_negotiate_version()
149 spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); in vmbus_negotiate_version()
151 spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags); in vmbus_negotiate_version()
155 vmbus_connection.conn_state = CONNECTED; in vmbus_negotiate_version()
158 vmbus_connection.msg_conn_id = in vmbus_negotiate_version()
177 vmbus_connection.conn_state = CONNECTING; in vmbus_connect()
178 vmbus_connection.work_queue = create_workqueue("hv_vmbus_con"); in vmbus_connect()
179 if (!vmbus_connection.work_queue) { in vmbus_connect()
184 vmbus_connection.handle_primary_chan_wq = in vmbus_connect()
186 if (!vmbus_connection.handle_primary_chan_wq) { in vmbus_connect()
191 vmbus_connection.handle_sub_chan_wq = in vmbus_connect()
193 if (!vmbus_connection.handle_sub_chan_wq) { in vmbus_connect()
198 INIT_LIST_HEAD(&vmbus_connection.chn_msg_list); in vmbus_connect()
199 spin_lock_init(&vmbus_connection.channelmsg_lock); in vmbus_connect()
201 INIT_LIST_HEAD(&vmbus_connection.chn_list); in vmbus_connect()
202 mutex_init(&vmbus_connection.channel_mutex); in vmbus_connect()
208 vmbus_connection.int_page = in vmbus_connect()
210 if (vmbus_connection.int_page == NULL) { in vmbus_connect()
215 vmbus_connection.recv_int_page = vmbus_connection.int_page; in vmbus_connect()
216 vmbus_connection.send_int_page = in vmbus_connect()
217 (void *)((unsigned long)vmbus_connection.int_page + in vmbus_connect()
224 vmbus_connection.monitor_pages[0] = (void *)__get_free_pages((GFP_KERNEL|__GFP_ZERO), 0); in vmbus_connect()
225 vmbus_connection.monitor_pages[1] = (void *)__get_free_pages((GFP_KERNEL|__GFP_ZERO), 0); in vmbus_connect()
226 if ((vmbus_connection.monitor_pages[0] == NULL) || in vmbus_connect()
227 (vmbus_connection.monitor_pages[1] == NULL)) { in vmbus_connect()
254 if (vmbus_connection.conn_state == CONNECTED) in vmbus_connect()
273 vmbus_connection.conn_state = DISCONNECTED; in vmbus_connect()
288 if (vmbus_connection.handle_sub_chan_wq) in vmbus_disconnect()
289 destroy_workqueue(vmbus_connection.handle_sub_chan_wq); in vmbus_disconnect()
291 if (vmbus_connection.handle_primary_chan_wq) in vmbus_disconnect()
292 destroy_workqueue(vmbus_connection.handle_primary_chan_wq); in vmbus_disconnect()
294 if (vmbus_connection.work_queue) in vmbus_disconnect()
295 destroy_workqueue(vmbus_connection.work_queue); in vmbus_disconnect()
297 if (vmbus_connection.int_page) { in vmbus_disconnect()
298 free_pages((unsigned long)vmbus_connection.int_page, 0); in vmbus_disconnect()
299 vmbus_connection.int_page = NULL; in vmbus_disconnect()
302 free_pages((unsigned long)vmbus_connection.monitor_pages[0], 0); in vmbus_disconnect()
303 free_pages((unsigned long)vmbus_connection.monitor_pages[1], 0); in vmbus_disconnect()
304 vmbus_connection.monitor_pages[0] = NULL; in vmbus_disconnect()
305 vmbus_connection.monitor_pages[1] = NULL; in vmbus_disconnect()
319 BUG_ON(!mutex_is_locked(&vmbus_connection.channel_mutex)); in relid2channel()
321 list_for_each_entry(channel, &vmbus_connection.chn_list, listentry) { in relid2channel()
402 conn_id.u.id = vmbus_connection.msg_conn_id; in vmbus_post_msg()