Commit d96a094c authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Greg Kroah-Hartman

uio_hv_generic: check that host supports monitor page


[ Upstream commit 06028d15 ]

In order for userspace application to signal host, it needs the
host to support the monitor page property. Check for the flag
and fail if this is not supported.
Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 28b35f9a
......@@ -124,6 +124,13 @@ hv_uio_probe(struct hv_device *dev,
if (ret)
goto fail;
/* Communicating with host has to be via shared memory not hypercall */
if (!dev->channel->offermsg.monitor_allocated) {
dev_err(&dev->device, "vmbus channel requires hypercall\n");
ret = -ENOTSUPP;
goto fail_close;
}
dev->channel->inbound.ring_buffer->interrupt_mask = 1;
set_channel_read_mode(dev->channel, HV_CALL_DIRECT);
......
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