[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/1] numa: check mem or memdev in numa configuration
|
From: |
Li Zhang |
|
Subject: |
[PATCH 1/1] numa: check mem or memdev in numa configuration |
|
Date: |
Wed, 16 Feb 2022 17:36:13 +0100 |
If there is no mem or 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 reason is that total memory of numa nodes
is always 0 if there is no mem or memdev in numa configuration.
So it's better to check mem or memdev in numa configuration.
Signed-off-by: Li Zhang <lizhang@suse.de>
---
hw/core/numa.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/core/numa.c b/hw/core/numa.c
index 1aa05dcf42..11cbec51eb 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -132,6 +132,11 @@ static void parse_numa_node(MachineState *ms,
NumaNodeOptions *node,
have_memdevs = have_memdevs ? : node->has_memdev;
have_mem = have_mem ? : node->has_mem;
+ if (!node->has_memdev && !node->has_mem) {
+ error_setg(errp, "numa configuration should use mem= or memdev= ");
+ return;
+ }
+
if ((node->has_mem && have_memdevs) || (node->has_memdev && have_mem)) {
error_setg(errp, "numa configuration should use either mem= or
memdev=,"
"mixing both is not allowed");
--
2.31.1
- [PATCH 1/1] numa: check mem or memdev in numa configuration,
Li Zhang <=
- Re: [PATCH 1/1] numa: check mem or memdev in numa configuration, Igor Mammedov, 2022/02/17
- Re: [PATCH 1/1] numa: check mem or memdev in numa configuration, Li Zhang, 2022/02/17
- Re: [PATCH 1/1] numa: check mem or memdev in numa configuration, Igor Mammedov, 2022/02/17
- Re: [PATCH 1/1] numa: check mem or memdev in numa configuration, Li Zhang, 2022/02/17
- Re: [PATCH 1/1] numa: check mem or memdev in numa configuration, Li Zhang, 2022/02/17
- Re: [PATCH 1/1] numa: check mem or memdev in numa configuration, Igor Mammedov, 2022/02/17
- Re: [PATCH 1/1] numa: check mem or memdev in numa configuration, Li Zhang, 2022/02/17