This should be the last offender.
---
src/qemu/qemu_process.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 845d5e1..dec4572 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2350,10 +2350,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)
--
2.6.2