diff --git a/xen/common/numa.c b/xen/common/numa.c index ad75955a16..e2c89bf55b 100644 --- a/xen/common/numa.c +++ b/xen/common/numa.c @@ -403,6 +403,12 @@ static int __init populate_memnodemap(const struct node *nodes, if ( (epdx >> shift) >= memnodemapsize ) return 0; + /* + * Round down start address: if start is not aligned to the memnodemap + * chunk size the tail remainder might not be added. Overlaps created + * by rounding will fall into the same NUMA region. + */ + spdx = ROUNDDOWN(spdx, 1UL << shift); do { if ( memnodemap[spdx >> shift] != NUMA_NO_NODE && (!nodeids || memnodemap[spdx >> shift] != nodeids[i]) )