From: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com> 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_tyshche...@epam.com> CC: Andrew Cooper <andrew.coop...@citrix.com> CC: George Dunlap <george.dun...@eu.citrix.com> CC: Ian Jackson <ian.jack...@eu.citrix.com> CC: Jan Beulich <jbeul...@suse.com> CC: Julien Grall <julien.gr...@arm.com> CC: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> CC: Stefano Stabellini <sstabell...@kernel.org> CC: Tim Deegan <t...@xen.org> CC: Wei Liu <wei.l...@citrix.com> CC: xen-de...@lists.xen.org --- xen/common/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 186b39a..20ee1e4 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -2166,7 +2166,7 @@ void init_domheap_pages(paddr_t ps, paddr_t pe) 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; -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel