Skip to content

Commit

Permalink
Drivers: hv: util: Specify ring buffer size using Hyper-V page size
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Michael Kelley <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
himadrics authored and Sasha Levin committed Nov 22, 2019
1 parent b14d749 commit 0541a22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/hv/hv_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0541a22

Please sign in to comment.