Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7be3e169 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Greg Kroah-Hartman
Browse files

Drivers: hv: vmbus: don't loose HVMSG_TIMER_EXPIRED messages



We must handle HVMSG_TIMER_EXPIRED messages in the interrupt context
and we offload all the rest to vmbus_on_msg_dpc() tasklet. This functions
loops to see if there are new messages pending. In case we'll ever see
HVMSG_TIMER_EXPIRED message there we're going to lose it as we can't
handle it from there. Avoid looping in vmbus_on_msg_dpc(), we're OK
with handling one message per interrupt.

Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: default avatarRadim <Kr.má&lt;rkrcmar@redhat.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bec3c11b
Loading
Loading
Loading
Loading
+33 −35
Original line number Diff line number Diff line
@@ -740,10 +740,9 @@ static void vmbus_on_msg_dpc(unsigned long data)
	struct vmbus_channel_message_table_entry *entry;
	struct onmessage_work_context *ctx;

	while (1) {
	if (msg->header.message_type == HVMSG_NONE)
		/* no msg */
			break;
		return;

	hdr = (struct vmbus_channel_message_header *)msg->u.payload;

@@ -756,7 +755,7 @@ static void vmbus_on_msg_dpc(unsigned long data)
	if (entry->handler_type	== VMHT_BLOCKING) {
		ctx = kmalloc(sizeof(*ctx), GFP_ATOMIC);
		if (ctx == NULL)
				continue;
			return;

		INIT_WORK(&ctx->work, vmbus_onmessage_work);
		memcpy(&ctx->msg, msg, sizeof(*msg));
@@ -786,7 +785,6 @@ static void vmbus_on_msg_dpc(unsigned long data)
		wrmsrl(HV_X64_MSR_EOM, 0);
	}
}
}

static void vmbus_isr(void)
{