From: Wanlong Gao <gaowanl...@cn.fujitsu.com>

If the total number of the assigned numa nodes memory is not
equal to the assigned ram size, it will write the wrong data
to ACPI table, then the guest will ignore the wrong ACPI table
and recognize all memory to one node. It's buggy, we should
check it to ensure that we write the right data to ACPI table.

Signed-off-by: Wanlong Gao <gaowanl...@cn.fujitsu.com>
Reviewed-by: Eduardo Habkost <ehabk...@redhat.com>
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
Signed-off-by: Hu Tao <hu...@cn.fujitsu.com>

Conflicts:
        numa.c
---
 numa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/numa.c b/numa.c
index 2c349ae..6ea267e 100644
--- a/numa.c
+++ b/numa.c
@@ -187,8 +187,8 @@ void set_numa_nodes(void)
             numa_total += numa_info[i].node_mem;
         }
         if (numa_total != ram_size) {
-            error_report("qemu: total memory size for NUMA nodes (%" PRIu64 ")"
-                         " should equal RAM size (" RAM_ADDR_FMT ")\n",
+            error_report("total memory for NUMA nodes (%" PRIu64 ")"
+                         " should equal RAM size (" RAM_ADDR_FMT ")",
                          numa_total, ram_size);
             exit(1);
         }
-- 
1.9.3


Reply via email to