diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2018-01-09 23:57:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-10 19:40:53 +0300 |
commit | 06028d15177a1b406b7b075ea47c6a352732f23a (patch) | |
tree | ef624623dd24296dade2411e85376cfa29d93ab7 /drivers/uio/uio_hv_generic.c | |
parent | e7d214642a19b8e0e7ecda39184c2ab98ba4801f (diff) | |
download | linux-06028d15177a1b406b7b075ea47c6a352732f23a.tar.xz |
uio_hv_generic: check that host supports monitor page
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: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uio/uio_hv_generic.c')
-rw-r--r-- | drivers/uio/uio_hv_generic.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index dcd80aad9636..ee6d862ef4bd 100644 --- a/drivers/uio/uio_hv_generic.c +++ b/drivers/uio/uio_hv_generic.c @@ -133,6 +133,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_ISR); |