提交 d773b57d 编写于 作者: P Peter Krempa

qemu: don't iterate vcpus using priv->nvcpupids in qemuProcessSetSchedParams

This should be the last offender.
上级 76394174
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册