[libvirt] [PATCH] qemu: Search all nodes for shared memory access

Martin Kletzander mkletzan at redhat.com
Wed Dec 16 12:12:17 UTC 2015


In commit 686eb7a24f7d, the break was not considered part of the
condition, hence breaking after first node when searching.

Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
---
Pushed as 'trivial' and also John ACKed it earlier.

 src/qemu/qemu_process.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index ba8dfebd1357..f2740687f655 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4781,9 +4781,10 @@ qemuProcessLaunch(virConnectPtr conn,
         if (!shmem && vm->def->mem.nhugepages) {
             for (i = 0; i < virDomainNumaGetNodeCount(vm->def->numa); i++) {
                 if (virDomainNumaGetNodeMemoryAccessMode(vm->def->numa, i) ==
-                    VIR_NUMA_MEM_ACCESS_SHARED)
+                    VIR_NUMA_MEM_ACCESS_SHARED) {
                     shmem = true;
-                break;
+                    break;
+                }
             }
         }

--
2.6.4




More information about the libvir-list mailing list