]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: process: Set current vcpu count to maximum if it was not specified
authorPeter Krempa <pkrempa@redhat.com>
Mon, 14 Nov 2016 13:52:40 +0000 (14:52 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 21 Nov 2016 13:35:20 +0000 (14:35 +0100)
Mimic qemu's behavior on the given command line.

src/qemu/qemu_parse_command.c

index ed92caa328e18d4cba8cdb4ac3737aed279bc720..cfebcc739ec9f220b67f1ed8baf7c30fee507fd1 100644 (file)
@@ -1725,6 +1725,9 @@ qemuParseCommandLineSmp(virDomainDefPtr dom,
     if (maxcpus == 0)
         goto syntax;
 
+    if (vcpus == 0)
+        vcpus = maxcpus;
+
     if (virDomainDefSetVcpusMax(dom, maxcpus, xmlopt) < 0)
         goto error;