diff mbox series

[v2,1/1] numa: check NUMA nodes with memdev specified

Message ID 20220218102209.8263-1-lizhang@suse.de
State New
Headers show
Series [v2,1/1] numa: check NUMA nodes with memdev specified | expand

Commit Message

Li Zhang Feb. 18, 2022, 10:22 a.m. UTC
If there is no memdev in numa configuration, it always reports
the error as the following:

total memory for NUMA nodes (0x0) should equal RAM size (0x100000000)

This error is confusing, and the total memory is the memory of
NUMA nodes with memdev specified actually. The memory size of a node
without memdev specified is always 0. So it's better to remind
users to check the memory of the NUMA nodes with memdev specified.

Signed-off-by: Li Zhang <lizhang@suse.de>
---
 hw/core/numa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/core/numa.c b/hw/core/numa.c
index 1aa05dcf42..7e1dbab0d5 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -688,7 +688,8 @@  void numa_complete_configuration(MachineState *ms)
             numa_total += numa_info[i].node_mem;
         }
         if (numa_total != ms->ram_size) {
-            error_report("total memory for NUMA nodes (0x%" PRIx64 ")"
+            error_report("total memory for NUMA nodes specified"
+                         " with memdev backend memory (0x%" PRIx64 ")"
                          " should equal RAM size (0x" RAM_ADDR_FMT ")",
                          numa_total, ms->ram_size);
             exit(1);