The "end" address must be rounded down before shifting,
otherwise we will insert wrong page range to a heap if address isn't
page aligned.
It seems that a copy-paste mistake took place in the following commit:
0c12972e34b20a26f2b42044b98bf12db7ed62b6
xen/mm: Switch some of page_alloc.c to typesafe MFN
Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
ASSERT(!in_irq());
smfn = maddr_to_mfn(round_pgup(ps));
- emfn = maddr_to_mfn(round_pgup(pe));
+ emfn = maddr_to_mfn(round_pgdown(pe));
if ( mfn_x(emfn) <= mfn_x(smfn) )
return;