diff options
| author | Stanislav Kinsburskii <skinsburskii@linux.microsoft.com> | 2026-01-07 18:45:43 +0000 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2026-01-15 07:10:27 +0000 |
| commit | 259add0d982cbe83170f0c2a9f160834f0f83dd4 (patch) | |
| tree | 0a4ea79eaa16a9150984e2f116979de651397f4c /include/linux/platform_data/gpio/git@git.tavy.me:linux.git | |
| parent | 49f49d47af67f8a7b221db1d758fc634242dc91a (diff) | |
mshv: Align huge page stride with guest mapping
Ensure that a stride larger than 1 (huge page) is only used when page
points to a head of a huge page and both the guest frame number (gfn) and
the operation size (page_count) are aligned to the huge page size
(PTRS_PER_PMD). This matches the hypervisor requirement that map/unmap
operations for huge pages must be guest-aligned and cover a full huge page.
Add mshv_chunk_stride() to encapsulate this alignment and page-order
validation, and plumb a huge_page flag into the region chunk handlers.
This prevents issuing large-page map/unmap/share operations that the
hypervisor would reject due to misaligned guest mappings.
Fixes: abceb4297bf8 ("mshv: Fix huge page handling in memory region traversal")
Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'include/linux/platform_data/gpio/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
