Skip to content

Commit 3a2bcc1

Browse files
Stanislav Kinsburskiiliuw
authored andcommitted
mshv: Use PMD_ORDER instead of HPAGE_PMD_ORDER when processing regions
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: abceb42 ("mshv: Fix huge page handling in memory region traversal") Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent 8f0b4cc commit 3a2bcc1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hv/mshv_regions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static long mshv_region_process_chunk(struct mshv_mem_region *region,
5858

5959
page_order = folio_order(page_folio(page));
6060
/* The hypervisor only supports 4K and 2M page sizes */
61-
if (page_order && page_order != HPAGE_PMD_ORDER)
61+
if (page_order && page_order != PMD_ORDER)
6262
return -EINVAL;
6363

6464
stride = 1 << page_order;

0 commit comments

Comments
 (0)