Lines Matching defs:hv_vmbus_g_connection

48 hv_vmbus_connection hv_vmbus_g_connection =
90 hv_vmbus_g_connection.interrupt_page);
93 hv_vmbus_g_connection.monitor_pages);
97 ((uint8_t *) hv_vmbus_g_connection.monitor_pages
104 mtx_lock(&hv_vmbus_g_connection.channel_msg_lock);
107 &hv_vmbus_g_connection.channel_msg_anchor,
111 mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock);
118 mtx_lock(&hv_vmbus_g_connection.channel_msg_lock);
120 &hv_vmbus_g_connection.channel_msg_anchor,
123 mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock);
132 mtx_lock(&hv_vmbus_g_connection.channel_msg_lock);
134 &hv_vmbus_g_connection.channel_msg_anchor,
137 mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock);
143 hv_vmbus_g_connection.connect_state = HV_CONNECTED;
163 if (hv_vmbus_g_connection.connect_state != HV_DISCONNECTED) {
170 hv_vmbus_g_connection.connect_state = HV_CONNECTING;
171 hv_vmbus_g_connection.work_queue = hv_work_queue_create("vmbusQ");
172 sema_init(&hv_vmbus_g_connection.control_sema, 1, "control_sema");
174 TAILQ_INIT(&hv_vmbus_g_connection.channel_msg_anchor);
175 mtx_init(&hv_vmbus_g_connection.channel_msg_lock, "vmbus channel msg",
178 TAILQ_INIT(&hv_vmbus_g_connection.channel_anchor);
179 mtx_init(&hv_vmbus_g_connection.channel_lock, "vmbus channel",
186 hv_vmbus_g_connection.interrupt_page = contigmalloc(
191 KASSERT(hv_vmbus_g_connection.interrupt_page != NULL,
194 if (hv_vmbus_g_connection.interrupt_page == NULL) {
199 hv_vmbus_g_connection.recv_interrupt_page =
200 hv_vmbus_g_connection.interrupt_page;
202 hv_vmbus_g_connection.send_interrupt_page =
203 ((uint8_t *) hv_vmbus_g_connection.interrupt_page +
210 hv_vmbus_g_connection.monitor_pages = contigmalloc(
218 KASSERT(hv_vmbus_g_connection.monitor_pages != NULL,
220 if (hv_vmbus_g_connection.monitor_pages == NULL) {
236 hv_vmbus_g_connection.channels = malloc(sizeof(hv_vmbus_channel*) *
253 if (hv_vmbus_g_connection.connect_state == HV_CONNECTED)
274 hv_vmbus_g_connection.connect_state = HV_DISCONNECTED;
276 hv_work_queue_close(hv_vmbus_g_connection.work_queue);
277 sema_destroy(&hv_vmbus_g_connection.control_sema);
278 mtx_destroy(&hv_vmbus_g_connection.channel_lock);
279 mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock);
281 if (hv_vmbus_g_connection.interrupt_page != NULL) {
283 hv_vmbus_g_connection.interrupt_page,
286 hv_vmbus_g_connection.interrupt_page = NULL;
289 if (hv_vmbus_g_connection.monitor_pages != NULL) {
291 hv_vmbus_g_connection.monitor_pages,
294 hv_vmbus_g_connection.monitor_pages = NULL;
302 free(hv_vmbus_g_connection.channels, M_DEVBUF);
326 contigfree(hv_vmbus_g_connection.interrupt_page, PAGE_SIZE, M_DEVBUF);
328 mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock);
330 hv_work_queue_close(hv_vmbus_g_connection.work_queue);
331 sema_destroy(&hv_vmbus_g_connection.control_sema);
333 free(hv_vmbus_g_connection.channels, M_DEVBUF);
334 hv_vmbus_g_connection.connect_state = HV_DISCONNECTED;
357 channel = hv_vmbus_g_connection.channels[relid];
433 hv_vmbus_g_connection.recv_interrupt_page;
521 (((uint32_t *)hv_vmbus_g_connection.send_interrupt_page