From: lon...@linuxonhyperv.com <lon...@linuxonhyperv.com> > The Subject line of this cover letter is a bit too narrow in scope. The scope should be any page size larger than 4K. For example, the arm64 architecture permits a page size of 16K, and Linux kernels built that way work just fine on Hyper-V arm64 hosts. Perhaps:
Fix uio_hv_generic for guests with page size > 4 KiB > UIO framework requires the device memory aligned to page boundary. > Hyper-V may allocate some memory that is Hyper-V page aligned (4k) > but not system page aligned. > > Fix this by having Hyper-V always allocate those pages on system page > boundary and expose them to user-mode. Also within the scope of making uio_hv_generic work with page size > 4KiB, there's an issue with the ring size. When hv_dev_ring_size() returns 0, hv_uio_probe() uses 2 MiB as the ring size. That works OK with the larger page sizes. But when hv_dev_ring_size() returns a specific value, it might not work. The fcopy device returns 16 KiB, which will fail. hv_uio_probe() needs to use the VMBUS_RING_SIZE() macro to increase the ring size if necessary to handle the larger ring header that results if the page size is > 4 KiB. You might want to include such a patch in this series. Separately, tools/hv/vmbus_bufring.c needs work to operate correctly on arm64 and with page sizes > 4 KiB. But that's probably a different patch series. Michael > > Long Li (2): > Drivers: hv: Allocate interrupt and monitor pages aligned to system > page boundary > uio_hv_generic: Use correct size for interrupt and monitor pages > > drivers/hv/hv_common.c | 29 +++++++---------------------- > drivers/uio/uio_hv_generic.c | 4 ++-- > 2 files changed, 9 insertions(+), 24 deletions(-) > > -- > 2.34.1 >