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.
This commit is contained in:
Peter Krempa 2016-11-14 14:52:30 +01:00
parent 0d9a76de6d
commit d3734b7a1d

View File

@ -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;