diff options
| author | Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com> | 2026-05-13 13:25:56 +0000 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2026-05-27 15:30:15 -0700 |
| commit | 98e0fc32e53dd62cd38a0d67eaf5846ae20078cc (patch) | |
| tree | 77a73cc792e6ab520cd3bc28fe0f449e20b64d08 /kernel/trace/rv/monitors/nrp/git@git.tavy.me:linux.git | |
| parent | 016a25e4b0df4d77e7c258edee4aaf982e4ee809 (diff) | |
mshv: support 1G hugepages by passing them as 2M-aligned chunks
The hypervisor's map GPA hypercall coalesces contiguous 2M-aligned
chunks into 1G mappings when alignment permits, so the driver can
support 1G hugepages by feeding them in as 2M chunks. Note that this
is the only way to make 1G mappings; there is no way to directly map
a 1G hugepage using the hypercall.
Always emit a 2M (PMD_ORDER) stride for the huge-page case. The
hypercall has no 1G stride, so 1G folios are processed as a
sequence of 2M chunks. Folios whose order is less than PMD_ORDER
(e.g. mTHP) fall back to single-page stride; mapping them as 2M
would fail in the hypervisor anyway.
Assisted-by: Copilot-CLI:claude-opus-4.7
Signed-off-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>
Acked-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'kernel/trace/rv/monitors/nrp/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
