mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: don't iterate vcpus using priv->nvcpupids in qemuProcessSetSchedParams
This should be the last offender.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user