]> git.proxmox.com Git - mirror_qemu.git/blobdiff - numa.c
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20170331' into staging
[mirror_qemu.git] / numa.c
diff --git a/numa.c b/numa.c
index e01cb547a21227421fdd02cd98d76b468c99de97..6fc2393ddd803726bed28af7415d8276f0c34941 100644 (file)
--- 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;