Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hv_sock: fix ARM64 support

VMBUS ring buffers must be page aligned. Therefore, the current value of
24K presents a challenge on ARM64 kernels (with 64K pages). So, use
VMBUS_RING_SIZE() to ensure they are always aligned and large enough to
hold all of the relevant data.

Cc: stable@vger.kernel.org
Fixes: 77ffe33363c0 ("hv_sock: use HV_HYP_PAGE_SIZE for Hyper-V communication")
Tested-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://patch.msgid.link/20260428125339.13963-1-hamzamahfooz@linux.microsoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Hamza Mahfooz and committed by
Jakub Kicinski
b3168120 e73cafaf

+2 -2
+2 -2
net/vmw_vsock/hyperv_transport.c
··· 375 375 } else { 376 376 sndbuf = max_t(int, sk->sk_sndbuf, RINGBUFFER_HVS_SND_SIZE); 377 377 sndbuf = min_t(int, sndbuf, RINGBUFFER_HVS_MAX_SIZE); 378 - sndbuf = ALIGN(sndbuf, HV_HYP_PAGE_SIZE); 378 + sndbuf = VMBUS_RING_SIZE(sndbuf); 379 379 rcvbuf = max_t(int, sk->sk_rcvbuf, RINGBUFFER_HVS_RCV_SIZE); 380 380 rcvbuf = min_t(int, rcvbuf, RINGBUFFER_HVS_MAX_SIZE); 381 - rcvbuf = ALIGN(rcvbuf, HV_HYP_PAGE_SIZE); 381 + rcvbuf = VMBUS_RING_SIZE(rcvbuf); 382 382 } 383 383 384 384 chan->max_pkt_size = HVS_MAX_PKT_SIZE;