On Mon, Apr 20, 2026 at 09:56:28AM -0700, Stanislav Kinsburskii wrote:
> On Thu, Apr 16, 2026 at 01:37:15PM +0000, Anirudh Rayabharam (Microsoft) 
> wrote:
> > The hypervisor's map GPA hypercall handles large pages intelligently,
> > combining 2M pages into 1G mappings when alignment allows.
> > 
> > Remove the PMD_ORDER check in mshv_chunk_stride() so that 1G hugepages
> > and other large page orders are passed through as 2M-aligned chunks,
> > letting the hypervisor promote them to 1G mappings automatically.
> > 
> > Signed-off-by: Anirudh Rayabharam (Microsoft) <[email protected]>
> > ---
> >  drivers/hv/mshv_regions.c | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> > 
> > diff --git a/drivers/hv/mshv_regions.c b/drivers/hv/mshv_regions.c
> > index fdffd4f002f6..5f617a96d97a 100644
> > --- a/drivers/hv/mshv_regions.c
> > +++ b/drivers/hv/mshv_regions.c
> > @@ -29,7 +29,7 @@
> >   * Uses huge page stride if the backing page is huge and the guest mapping
> >   * is properly aligned; otherwise falls back to single page stride.
> >   *
> > - * Return: Stride in pages, or -EINVAL if page order is unsupported.
> > + * Return: Stride in pages.
> >   */
> >  static int mshv_chunk_stride(struct page *page,
> >                          u64 gfn, u64 page_count)
> 
> Nit: the return type of the function should now become unsigned.

Thanks I'll prepare a v2 with this and also look into Sashiko's comments
on this patch.

Thanks,
Anirudh.


Reply via email to