Linux-HyperV List
 help / color / mirror / Atom feed
* [PATCH] mshv: Use PMD_ORDER instead of HPAGE_PMD_ORDER when processing regions
@ 2025-12-09 16:37 Stanislav Kinsburskii
  2025-12-10 22:43 ` Wei Liu
  2025-12-17  5:03 ` Anirudh Rayabharam
  0 siblings, 2 replies; 3+ messages in thread
From: Stanislav Kinsburskii @ 2025-12-09 16:37 UTC (permalink / raw)
  To: kys, haiyangz, wei.liu, decui, longli; +Cc: linux-hyperv, linux-kernel

Fix page order determination logic when CONFIG_PGTABLE_HAS_HUGE_LEAVES
is undefined, as HPAGE_PMD_SHIFT is defined as BUILD_BUG in that case.

Fixes: abceb4297bf8 ("mshv: Fix huge page handling in memory region
traversal")
Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
---
 drivers/hv/mshv_regions.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hv/mshv_regions.c b/drivers/hv/mshv_regions.c
index 202b9d551e39..dc2d7044fb91 100644
--- a/drivers/hv/mshv_regions.c
+++ b/drivers/hv/mshv_regions.c
@@ -58,7 +58,7 @@ static long mshv_region_process_chunk(struct mshv_mem_region *region,
 
 	page_order = folio_order(page_folio(page));
 	/* The hypervisor only supports 4K and 2M page sizes */
-	if (page_order && page_order != HPAGE_PMD_ORDER)
+	if (page_order && page_order != PMD_ORDER)
 		return -EINVAL;
 
 	stride = 1 << page_order;



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-17  5:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-09 16:37 [PATCH] mshv: Use PMD_ORDER instead of HPAGE_PMD_ORDER when processing regions Stanislav Kinsburskii
2025-12-10 22:43 ` Wei Liu
2025-12-17  5:03 ` Anirudh Rayabharam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox