}
+static int
+qemuDomainVcpuValidateConfig(virBitmapPtr map,
+ bool state)
+{
+ /* vcpu 0 can't be disabled */
+ if (!state && virBitmapIsBitSet(map, 0)) {
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("vCPU '0' must be enabled"));
+ return -1;
+ }
+
+ return 0;
+}
+
+
int
qemuDomainSetVcpuInternal(virQEMUDriverPtr driver,
virDomainObjPtr vm,
}
}
+ if (persistentDef) {
+ if (qemuDomainVcpuValidateConfig(map, state) < 0)
+ goto cleanup;
+ }
+
if (livevcpus &&
qemuDomainSetVcpusLive(driver, cfg, vm, livevcpus, state) < 0)
goto cleanup;