summaryrefslogtreecommitdiffstats
path: root/drivers/hv/hv_util.c
diff options
context:
space:
mode:
authorHimadri Pandya <himadrispandya@gmail.com>2019-07-25 07:03:15 +0200
committerSasha Levin <sashal@kernel.org>2019-11-22 02:10:45 +0100
commit0541a225945d5e0d650353f51614812aa820c6be (patch)
treeb9a8eebc258ab5fd876af0e5f788aeedf5e8fa2d /drivers/hv/hv_util.c
parentDrivers: hv: Specify receive buffer size using Hyper-V page size (diff)
downloadlinux-0541a225945d5e0d650353f51614812aa820c6be.tar.xz
linux-0541a225945d5e0d650353f51614812aa820c6be.zip
Drivers: hv: util: Specify ring buffer size using Hyper-V page size
VMbus ring buffers are sized based on the 4K page size used by Hyper-V. The Linux guest page size may not be 4K on all architectures so use the Hyper-V page size to specify the ring buffer size. Signed-off-by: Himadri Pandya <himadri18.07@gmail.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hv/hv_util.c')
-rw-r--r--drivers/hv/hv_util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index c2c08f26bd5f..766bd8457346 100644
--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
@@ -413,8 +413,9 @@ static int util_probe(struct hv_device *dev,
hv_set_drvdata(dev, srv);
- ret = vmbus_open(dev->channel, 4 * PAGE_SIZE, 4 * PAGE_SIZE, NULL, 0,
- srv->util_cb, dev->channel);
+ ret = vmbus_open(dev->channel, 4 * HV_HYP_PAGE_SIZE,
+ 4 * HV_HYP_PAGE_SIZE, NULL, 0, srv->util_cb,
+ dev->channel);
if (ret)
goto error;