]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Add -mem-path even with numa
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 1 Oct 2015 06:15:48 +0000 (08:15 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 2 Oct 2015 14:14:26 +0000 (16:14 +0200)
So since the introduction of the memory-backend-file object until now we
only added '-mem-path' for non-NUMA guests and we used the parameters of
the memory-backend-file object to specify the path to the hugetlbfs
mount.  But hugepages can be also used without memory-backend-file
object, as it used to be before its introduction.  Let's just get this
part of the code back and properly append the '-mem-path' for NUMA
guests as well, but only when the memory backend is not needed.

This parameter is already being applied when no numa is requested and
because we still use memory-object-file unconditionally for
hugepage-backed NUMA guests, this should not fire until later.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/qemu/qemu_command.c

index 175dbdc7e4414b1ae1908f2781ecafa5b6f6cd47..b78b49ba3b677084260e863aa99c30f899aa1bb8 100644 (file)
@@ -8148,6 +8148,10 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
         }
     }
 
+    if (!needBackend &&
+        qemuBuildMemPathStr(cfg, def, qemuCaps, cmd) < 0)
+        goto cleanup;
+
     for (i = 0; i < ncells; i++) {
         VIR_FREE(cpumask);
         if (!(cpumask = virBitmapFormat(virDomainNumaGetNodeCpumask(def->numa, i))))