X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=numa.c;h=6fc2393ddd803726bed28af7415d8276f0c34941;hb=37c4a85cd256a51c5f58ee7e531f25f0e89b2c87;hp=e01cb547a21227421fdd02cd98d76b468c99de97;hpb=28f997a82cb509bf4775d4006b368e1bde8b7bdd;p=mirror_qemu.git diff --git a/numa.c b/numa.c index e01cb547a2..6fc2393ddd 100644 --- a/numa.c +++ b/numa.c @@ -338,12 +338,12 @@ void parse_numa_opts(MachineClass *mc) if (i == nb_numa_nodes) { uint64_t usedmem = 0; - /* On Linux, each node's border has to be 8MB aligned, - * the final node gets the rest. + /* Align each node according to the alignment + * requirements of the machine class */ for (i = 0; i < nb_numa_nodes - 1; i++) { numa_info[i].node_mem = (ram_size / nb_numa_nodes) & - ~((1 << 23UL) - 1); + ~((1 << mc->numa_mem_align_shift) - 1); usedmem += numa_info[i].node_mem; } numa_info[i].node_mem = ram_size - usedmem;