mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
8b9987e905
commit
7341d908af
|
@ -442,14 +442,11 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
|
||||||
union hv_synic_event_flags *event;
|
union hv_synic_event_flags *event;
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
|
||||||
page_addr = hv_context.synic_message_page[cpu];
|
/*
|
||||||
msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT;
|
* Check for events before checking for messages. This is the order
|
||||||
|
* in which events and messages are checked in Windows guests on
|
||||||
/* Check if there are actual msgs to be process */
|
* Hyper-V, and the Windows team suggested we do the same.
|
||||||
if (msg->header.message_type != HVMSG_NONE) {
|
*/
|
||||||
handled = true;
|
|
||||||
tasklet_schedule(&msg_dpc);
|
|
||||||
}
|
|
||||||
|
|
||||||
page_addr = hv_context.synic_event_page[cpu];
|
page_addr = hv_context.synic_event_page[cpu];
|
||||||
event = (union hv_synic_event_flags *)page_addr + VMBUS_MESSAGE_SINT;
|
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);
|
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)
|
if (handled)
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue