Re: [PATCH] hv_sock: use HV_HYP_PAGE_SIZE instead of PAGE_SIZE_4K
From: David Miller
Date: Thu Jul 25 2019 - 20:26:25 EST
From: Himadri Pandya <himadrispandya@xxxxxxxxx>
Date: Thu, 25 Jul 2019 05:11:25 +0000
> Older windows hosts require the hv_sock ring buffer to be defined
> using 4K pages. This was achieved by using the symbol PAGE_SIZE_4K
> defined specifically for this purpose. But now we have a new symbol
> HV_HYP_PAGE_SIZE defined in hyperv-tlfs which can be used for this.
>
> This patch removes the definition of symbol PAGE_SIZE_4K and replaces
> its usage with the symbol HV_HYP_PAGE_SIZE. This patch also aligns
> sndbuf and rcvbuf to hyper-v specific page size using HV_HYP_PAGE_SIZE
> instead of the guest page size(PAGE_SIZE) as hyper-v expects the page
> size to be 4K and it might not be the case on ARM64 architecture.
>
> Signed-off-by: Himadri Pandya <himadri18.07@xxxxxxxxx>
This doesn't compile:
CC [M] net/vmw_vsock/hyperv_transport.o
net/vmw_vsock/hyperv_transport.c:58:28: error: ʽHV_HYP_PAGE_SIZEʼ undeclared here (not in a function); did you mean ʽHV_MESSAGE_SIZEʼ?
#define HVS_SEND_BUF_SIZE (HV_HYP_PAGE_SIZE - sizeof(struct vmpipe_proto_header))
^~~~~~~~~~~~~~~~