[PATCH 4/5] qemu: parse: Assign maximum cpu count from topology if not provided

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



qemu uses this if 'maxcpus' is not present. Do the same in the parsing
code.
---
 src/qemu/qemu_parse_command.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c
index 7ab3dcf..ed92caa 100644
--- a/src/qemu/qemu_parse_command.c
+++ b/src/qemu/qemu_parse_command.c
@@ -1713,8 +1713,14 @@ qemuParseCommandLineSmp(virDomainDefPtr dom,
         goto syntax;
     }

-    if (maxcpus == 0)
-        maxcpus = vcpus;
+    if (maxcpus == 0) {
+        if (cores) {
+            if (virDomainDefGetVcpusTopology(dom, &maxcpus) < 0)
+                goto error;
+        } else {
+            maxcpus = vcpus;
+        }
+    }

     if (maxcpus == 0)
         goto syntax;
-- 
2.10.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux