aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uio/uio_hv_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/uio/uio_hv_generic.c')
-rw-r--r--drivers/uio/uio_hv_generic.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c
index 48d5327d38d4..fe5cdda80b2c 100644
--- a/drivers/uio/uio_hv_generic.c
+++ b/drivers/uio/uio_hv_generic.c
@@ -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);