render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
7a3408
From eb59153c2c09c2e59f214e0bdcb90ea430753060 Mon Sep 17 00:00:00 2001
7a3408
Message-Id: <eb59153c2c09c2e59f214e0bdcb90ea430753060@dist-git>
7a3408
From: Martin Kletzander <mkletzan@redhat.com>
7a3408
Date: Tue, 6 Oct 2015 15:20:34 +0200
7a3408
Subject: [PATCH] qemu: Add -mem-path even with numa
7a3408
7a3408
https://bugzilla.redhat.com/show_bug.cgi?id=1266856
7a3408
7a3408
So since the introduction of the memory-backend-file object until now we
7a3408
only added '-mem-path' for non-NUMA guests and we used the parameters of
7a3408
the memory-backend-file object to specify the path to the hugetlbfs
7a3408
mount.  But hugepages can be also used without memory-backend-file
7a3408
object, as it used to be before its introduction.  Let's just get this
7a3408
part of the code back and properly append the '-mem-path' for NUMA
7a3408
guests as well, but only when the memory backend is not needed.
7a3408
7a3408
This parameter is already being applied when no numa is requested and
7a3408
because we still use memory-object-file unconditionally for
7a3408
hugepage-backed NUMA guests, this should not fire until later.
7a3408
7a3408
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7a3408
(cherry picked from commit a2dba3ceb2e2639cc5fd91da81204682f27d0d8c)
7a3408
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7a3408
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7a3408
---
7a3408
 src/qemu/qemu_command.c | 4 ++++
7a3408
 1 file changed, 4 insertions(+)
7a3408
7a3408
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
7a3408
index 0822ee4..1d020d2 100644
7a3408
--- a/src/qemu/qemu_command.c
7a3408
+++ b/src/qemu/qemu_command.c
7a3408
@@ -7856,6 +7856,10 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
7a3408
         }
7a3408
     }
7a3408
 
7a3408
+    if (!needBackend &&
7a3408
+        qemuBuildMemPathStr(cfg, def, qemuCaps, cmd) < 0)
7a3408
+        goto cleanup;
7a3408
+
7a3408
     for (i = 0; i < ncells; i++) {
7a3408
         VIR_FREE(cpumask);
7a3408
         if (!(cpumask = virBitmapFormat(virDomainNumaGetNodeCpumask(def->numa, i))))
7a3408
-- 
7a3408
2.6.1
7a3408