]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuBuildNumaArgStr: Use modern -numa memdev= if old -numa mem= is unsupported
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 14 May 2020 11:56:54 +0000 (13:56 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 18 May 2020 08:36:10 +0000 (10:36 +0200)
In previous commit we started tracking whether QEMU supports
'-numa mem='. This is tied to the machine type because migration
from '-numa mem=' to '-numa memdev' is impossible (or vice
versa). But since it's tied to a machine type (where migration
from one to another is also unsupported) we can allow QEMU to get
rid of the deprecated command line.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1783355
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c

index cf6c48d2339aab88d031ec7dc138998897568cec..d70428778e7698f9c2b27aafaec2a68734865d4e 100644 (file)
@@ -7038,6 +7038,11 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
     if (!virDomainNumatuneNodesetIsAvailable(def->numa, priv->autoNodeset))
         goto cleanup;
 
+    if (!virQEMUCapsGetMachineNumaMemSupported(qemuCaps,
+                                               def->virtType,
+                                               def->os.machine))
+        needBackend = true;
+
     if (VIR_ALLOC_N(nodeBackends, ncells) < 0)
         goto cleanup;
 
@@ -7055,6 +7060,11 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
             if (rc == 0)
                 needBackend = true;
         }
+    } else if (needBackend) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                       _("NUMA without specified memory backing is not "
+                         "supported with this QEMU binary"));
+        goto cleanup;
     }
 
     if (!needBackend &&