summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2011-08-31 14:35:56 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-06 11:53:51 -0700
commit7341d908af307a34098a9da52f49037d815c868f (patch)
treeea676db137e672b0fee0a50913129abea974865f
parent8b9987e9050aeba12325a3f0ab0f4a2934c37c3c (diff)
downloadtalos-obmc-linux-7341d908af307a34098a9da52f49037d815c868f.tar.gz
talos-obmc-linux-7341d908af307a34098a9da52f49037d815c868f.zip
Staging: hv: vmbus: Check for events before messages
The Windows team has informed us that on Windows guests on Hyper-V, they check for events before messages. They also recommended that we do the same. This patch addresses this. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/hv/vmbus_drv.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index b5e06d68f058..cd43ddd3cc83 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -442,14 +442,11 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
union hv_synic_event_flags *event;
bool handled = false;
- page_addr = hv_context.synic_message_page[cpu];
- msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT;
-
- /* Check if there are actual msgs to be process */
- if (msg->header.message_type != HVMSG_NONE) {
- handled = true;
- tasklet_schedule(&msg_dpc);
- }
+ /*
+ * Check for events before checking for messages. This is the order
+ * in which events and messages are checked in Windows guests on
+ * Hyper-V, and the Windows team suggested we do the same.
+ */
page_addr = hv_context.synic_event_page[cpu];
event = (union hv_synic_event_flags *)page_addr + VMBUS_MESSAGE_SINT;
@@ -460,6 +457,15 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
tasklet_schedule(&event_dpc);
}
+ page_addr = hv_context.synic_message_page[cpu];
+ msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT;
+
+ /* Check if there are actual msgs to be processed */
+ if (msg->header.message_type != HVMSG_NONE) {
+ handled = true;
+ tasklet_schedule(&msg_dpc);
+ }
+
if (handled)
return IRQ_HANDLED;
else
OpenPOWER on IntegriCloud