Commit 5ab05951 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

Drivers: hv: Add a check to deal with spurious interrupts

We establish the handler before we have fully initialized the VMBUS state.
Deal with spurious interrupts.
Signed-off-by: default avatarK. Y. Srinivasan <>
Reviewed-by: default avatarHaiyang Zhang <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent b0209501
......@@ -454,6 +454,12 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
union hv_synic_event_flags *event;
bool handled = false;
page_addr = hv_context.synic_event_page[cpu];
if (page_addr == NULL)
return IRQ_NONE;
event = (union hv_synic_event_flags *)page_addr +
* Check for events before checking for messages. This is the order
* in which events and messages are checked in Windows guests on
......@@ -463,10 +469,6 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
if ((vmbus_proto_version == VERSION_WS2008) ||
(vmbus_proto_version == VERSION_WIN7)) {
page_addr = hv_context.synic_event_page[cpu];
event = (union hv_synic_event_flags *)page_addr +
/* Since we are a child, we only need to check bit 0 */
if (sync_test_and_clear_bit(0,
(unsigned long *) &event->flags32[0])) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment