Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147817717
D5911.id15079.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D5911.id15079.diff
View Options
Index: sys/dev/hyperv/vmbus/hv_connection.c
===================================================================
--- sys/dev/hyperv/vmbus/hv_connection.c
+++ sys/dev/hyperv/vmbus/hv_connection.c
@@ -305,14 +305,18 @@
KASSERT(cpu <= mp_maxid, ("VMBUS: hv_vmbus_on_events: "
"cpu out of range!"));
+ page_addr = hv_vmbus_g_context.syn_ic_event_page[cpu];
+ event = (hv_vmbus_synic_event_flags *)
+ page_addr + HV_VMBUS_MESSAGE_SINT;
if ((hv_vmbus_protocal_version == HV_VMBUS_VERSION_WS2008) ||
(hv_vmbus_protocal_version == HV_VMBUS_VERSION_WIN7)) {
maxdword = HV_MAX_NUM_CHANNELS_SUPPORTED >> 5;
/*
* receive size is 1/2 page and divide that by 4 bytes
*/
- recv_interrupt_page =
- hv_vmbus_g_connection.recv_interrupt_page;
+ if (synch_test_and_clear_bit(0, &event->flags32[0]))
+ recv_interrupt_page =
+ hv_vmbus_g_connection.recv_interrupt_page;
} else {
/*
* On Host with Win8 or above, the event page can be
@@ -320,9 +324,6 @@
* that has the pending interrupt.
*/
maxdword = HV_EVENT_FLAGS_DWORD_COUNT;
- page_addr = hv_vmbus_g_context.syn_ic_event_page[cpu];
- event = (hv_vmbus_synic_event_flags *)
- page_addr + HV_VMBUS_MESSAGE_SINT;
recv_interrupt_page = event->flags32;
}
Index: sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
===================================================================
--- sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
+++ sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
@@ -145,7 +145,6 @@
{
int cpu;
hv_vmbus_message* msg;
- hv_vmbus_synic_event_flags* event;
void* page_addr;
cpu = PCPU_GET(cpuid);
@@ -156,26 +155,7 @@
* in Windows when running as a guest in Hyper-V
*/
- page_addr = hv_vmbus_g_context.syn_ic_event_page[cpu];
- event = (hv_vmbus_synic_event_flags*)
- page_addr + HV_VMBUS_MESSAGE_SINT;
-
- if ((hv_vmbus_protocal_version == HV_VMBUS_VERSION_WS2008) ||
- (hv_vmbus_protocal_version == HV_VMBUS_VERSION_WIN7)) {
- /* Since we are a child, we only need to check bit 0 */
- if (synch_test_and_clear_bit(0, &event->flags32[0])) {
- hv_vmbus_on_events(cpu);
- }
- } else {
- /*
- * On host with Win8 or above, we can directly look at
- * the event page. If bit n is set, we have an interrupt
- * on the channel with id n.
- * Directly schedule the event software interrupt on
- * current cpu.
- */
- hv_vmbus_on_events(cpu);
- }
+ hv_vmbus_on_events(cpu);
/* Check if there are actual msgs to be process */
page_addr = hv_vmbus_g_context.syn_ic_msg_page[cpu];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 14, 9:43 PM (9 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29687941
Default Alt Text
D5911.id15079.diff (2 KB)
Attached To
Mode
D5911: hyperv/VMBUS: Check event pages inide hv_vmbus_on_events
Attached
Detach File
Event Timeline
Log In to Comment