qemu: Allow cachetune only for KVM domains

https://bugzilla.redhat.com/show_bug.cgi?id=1541921

In TCG mode, there are no vCPU threads and thus there's nothing
to be placed into resctrl group. Forbid such configuration.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Michal Privoznik 2018-06-28 11:37:09 +02:00
parent 57d90e3e05
commit cb7a4ac4fb

View File

@ -3986,6 +3986,13 @@ qemuDomainDefValidate(const virDomainDef *def,
}
}
if (def->ncachetunes &&
def->virtType != VIR_DOMAIN_VIRT_KVM) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("cachetune is only supported for KVM domains"));
goto cleanup;
}
if (qemuDomainDefValidateFeatures(def, qemuCaps) < 0)
goto cleanup;