From b14d749ac5abdf311321172ae11e6ad1be4293e9 Mon Sep 17 00:00:00 2001 From: Himadri Pandya Date: Thu, 25 Jul 2019 05:03:14 +0000 Subject: 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 Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin --- drivers/hv/hv_snapshot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/hv/hv_snapshot.c') diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_snapshot.c index 20ba95b75a94..03b6454268b3 100644 --- a/drivers/hv/hv_snapshot.c +++ b/drivers/hv/hv_snapshot.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "hyperv_vmbus.h" #include "hv_utils_transport.h" @@ -297,7 +298,7 @@ void hv_vss_onchannelcallback(void *context) if (vss_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) { -- cgit v1.2.3