From: Peter Krempa Date: Mon, 14 Nov 2016 13:52:30 +0000 (+0100) Subject: qemu: parse: Assign maximum cpu count from topology if not provided X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d3734b7a1d93ac7994010931b39633d7930b3bfa;p=libvirt.git qemu: parse: Assign maximum cpu count from topology if not provided qemu uses this if 'maxcpus' is not present. Do the same in the parsing code. --- diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c index 7ab3dcf5ba..ed92caa328 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;