-----Original Message----- From: Michael Kelley mhklinux@outlook.com Sent: Wednesday, April 30, 2025 6:56 PM To: longli@linuxonhyperv.com; KY Srinivasan kys@microsoft.com; Haiyang Zhang haiyangz@microsoft.com; Wei Liu wei.liu@kernel.org; Dexuan Cui decui@microsoft.com; Greg Kroah-Hartman gregkh@linuxfoundation.org; linux-hyperv@vger.kernel.org; linux- kernel@vger.kernel.org Cc: Long Li longli@microsoft.com; stable@vger.kernel.org Subject: [EXTERNAL] RE: [Patch v2 1/4] Drivers: hv: Allocate interrupt and monitor pages aligned to system page boundary
From: longli@linuxonhyperv.com longli@linuxonhyperv.com Sent: Wednesday, April 30, 2025 3:06 PM
There are use cases that interrupt and monitor pages are mapped to user-mode through UIO, they need to be system page aligned. Some Hyper-V
s/UIO, they/UIO, so they/
allocation APIs introduced earlier broke those requirements.
Fix those APIs by always allocating Hyper-V page at system page boundaries.
This patch modifies hv_alloc_hyperv_page() and friends. Then Patch 4 of the series deletes them, including the modifications. It would be less code motion to do the first part of Patch 4 (i.e., the use of __get_free_page directly in connection.c) here in Patch 1, and leave hv_alloc_hyperv_page() and friends unmodified. Continue to make the change to hv_kmsg_dump_register() here in Patch 1 as well.
Then have Patch 2 simply delete hv_alloc_hyperv_page() and friends because they are no longer used. The modifications to hv_alloc_hyperv_page() and friends would not be needed.
Patch 3 and 4 would be the additional changes in uio_hv_generic.c.
Michael
I have sent v3 of the patch series.
Long