summary refs log tree commit diff stats
path: root/hw/core
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2020-06-09 09:56:35 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-06-26 09:39:39 -0400
commit32a354dc6c07d766e70b51f42a62d8cd479e3f82 (patch)
treeb038d7e9748bdfd15868fb760e52295b006dfc2b /hw/core
parentf9919116b8c226428df28bc69ab33480eaa1ee6d (diff)
downloadfocaccia-qemu-32a354dc6c07d766e70b51f42a62d8cd479e3f82.tar.gz
focaccia-qemu-32a354dc6c07d766e70b51f42a62d8cd479e3f82.zip
numa: forbid '-numa node, mem' for 5.1 and newer machine types
Deprecation period is run out and it's a time to flip the switch
introduced by cd5ff8333a.  Disable legacy option for new machine
types (since 5.1) and amend documentation.

'-numa node,memdev' shall be used instead of disabled option
with new machine types.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <20200609135635.761587-1-imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/numa.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/core/numa.c b/hw/core/numa.c
index 5f81900f88..2725886d06 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -117,6 +117,13 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
     }
 
     if (node->has_mem) {
+        if (!mc->numa_mem_supported) {
+            error_setg(errp, "Parameter -numa node,mem is not supported by this"
+                      " machine type");
+            error_append_hint(errp, "Use -numa node,memdev instead\n");
+            return;
+        }
+
         numa_info[nodenr].node_mem = node->mem;
         if (!qtest_enabled()) {
             warn_report("Parameter -numa node,mem is deprecated,"