mirror of https://gitee.com/openkylin/libvirt.git
qemu: don't iterate vcpus using priv->nvcpupids in qemuProcessSetSchedParams
This should be the last offender.
This commit is contained in:
parent
763941749e
commit
d773b57d22
|
@ -2380,10 +2380,14 @@ qemuProcessSetSchedParams(int id,
|
|||
static int
|
||||
qemuProcessSetSchedulers(virDomainObjPtr vm)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
size_t i = 0;
|
||||
|
||||
for (i = 0; i < priv->nvcpupids; i++) {
|
||||
for (i = 0; i < virDomainDefGetVcpusMax(vm->def); i++) {
|
||||
virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(vm->def, i);
|
||||
|
||||
if (!vcpu->online)
|
||||
continue;
|
||||
|
||||
if (qemuProcessSetSchedParams(i, qemuDomainGetVcpuPid(vm, i),
|
||||
vm->def->cputune.nvcpusched,
|
||||
vm->def->cputune.vcpusched) < 0)
|
||||
|
|
Loading…
Reference in New Issue