diff options
author | Himadri Pandya <himadrispandya@gmail.com> | 2019-07-25 05:03:14 +0000 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2019-11-21 20:10:45 -0500 |
commit | b14d749ac5abdf311321172ae11e6ad1be4293e9 (patch) | |
tree | ee67f86779dd3214e128fa340adfd0c917cb9d51 /drivers/hv/hv_fcopy.c | |
parent | c48d8b04893afe35fd6f5ccbf339493bba277d43 (diff) | |
download | linux-b14d749ac5abdf311321172ae11e6ad1be4293e9.tar.bz2 |
Drivers: hv: Specify receive buffer size using Hyper-V page size
The recv_buffer is used to retrieve data from the VMbus ring buffer.
VMbus ring buffers are sized based on the guest page size which
Hyper-V assumes to be 4KB. But it may be different on some
architectures. So use the Hyper-V page size to allocate the
recv_buffer and set the maximum size to receive.
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_fcopy.c')
-rw-r--r-- | drivers/hv/hv_fcopy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index 7e30ae0635cc..08fa4a5de644 100644 --- a/drivers/hv/hv_fcopy.c +++ b/drivers/hv/hv_fcopy.c @@ -13,6 +13,7 @@ #include <linux/workqueue.h> #include <linux/hyperv.h> #include <linux/sched.h> +#include <asm/hyperv-tlfs.h> #include "hyperv_vmbus.h" #include "hv_utils_transport.h" @@ -234,7 +235,7 @@ void hv_fcopy_onchannelcallback(void *context) if (fcopy_transaction.state > HVUTIL_READY) return; - vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 2, &recvlen, + vmbus_recvpacket(channel, recv_buffer, HV_HYP_PAGE_SIZE * 2, &recvlen, &requestid); if (recvlen <= 0) return; |