hv_connection.c (297635) | hv_connection.c (297908) |
---|---|
1/*- 2 * Copyright (c) 2009-2012 Microsoft Corp. 3 * Copyright (c) 2012 NetApp Inc. 4 * Copyright (c) 2012 Citrix Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 291 unchanged lines hidden (view full) --- 300 int rel_id; 301 int maxdword; 302 hv_vmbus_synic_event_flags *event; 303 /* int maxdword = PAGE_SIZE >> 3; */ 304 305 KASSERT(cpu <= mp_maxid, ("VMBUS: hv_vmbus_on_events: " 306 "cpu out of range!")); 307 | 1/*- 2 * Copyright (c) 2009-2012 Microsoft Corp. 3 * Copyright (c) 2012 NetApp Inc. 4 * Copyright (c) 2012 Citrix Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 291 unchanged lines hidden (view full) --- 300 int rel_id; 301 int maxdword; 302 hv_vmbus_synic_event_flags *event; 303 /* int maxdword = PAGE_SIZE >> 3; */ 304 305 KASSERT(cpu <= mp_maxid, ("VMBUS: hv_vmbus_on_events: " 306 "cpu out of range!")); 307 |
308 page_addr = hv_vmbus_g_context.syn_ic_event_page[cpu]; 309 event = (hv_vmbus_synic_event_flags *) 310 page_addr + HV_VMBUS_MESSAGE_SINT; |
|
308 if ((hv_vmbus_protocal_version == HV_VMBUS_VERSION_WS2008) || 309 (hv_vmbus_protocal_version == HV_VMBUS_VERSION_WIN7)) { 310 maxdword = HV_MAX_NUM_CHANNELS_SUPPORTED >> 5; 311 /* 312 * receive size is 1/2 page and divide that by 4 bytes 313 */ | 311 if ((hv_vmbus_protocal_version == HV_VMBUS_VERSION_WS2008) || 312 (hv_vmbus_protocal_version == HV_VMBUS_VERSION_WIN7)) { 313 maxdword = HV_MAX_NUM_CHANNELS_SUPPORTED >> 5; 314 /* 315 * receive size is 1/2 page and divide that by 4 bytes 316 */ |
314 recv_interrupt_page = 315 hv_vmbus_g_connection.recv_interrupt_page; | 317 if (synch_test_and_clear_bit(0, &event->flags32[0])) 318 recv_interrupt_page = 319 hv_vmbus_g_connection.recv_interrupt_page; |
316 } else { 317 /* 318 * On Host with Win8 or above, the event page can be 319 * checked directly to get the id of the channel 320 * that has the pending interrupt. 321 */ 322 maxdword = HV_EVENT_FLAGS_DWORD_COUNT; | 320 } else { 321 /* 322 * On Host with Win8 or above, the event page can be 323 * checked directly to get the id of the channel 324 * that has the pending interrupt. 325 */ 326 maxdword = HV_EVENT_FLAGS_DWORD_COUNT; |
323 page_addr = hv_vmbus_g_context.syn_ic_event_page[cpu]; 324 event = (hv_vmbus_synic_event_flags *) 325 page_addr + HV_VMBUS_MESSAGE_SINT; | |
326 recv_interrupt_page = event->flags32; 327 } 328 329 /* 330 * Check events 331 */ 332 if (recv_interrupt_page != NULL) { 333 for (dword = 0; dword < maxdword; dword++) { --- 81 unchanged lines hidden --- | 327 recv_interrupt_page = event->flags32; 328 } 329 330 /* 331 * Check events 332 */ 333 if (recv_interrupt_page != NULL) { 334 for (dword = 0; dword < maxdword; dword++) { --- 81 unchanged lines hidden --- |