mirror of https://gitee.com/openkylin/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.
This commit is contained in:
parent
0d9a76de6d
commit
d3734b7a1d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue