From: Michal Privoznik Date: Thu, 28 Jun 2018 09:37:09 +0000 (+0200) Subject: qemu: Allow cachetune only for KVM domains X-Git-Tag: v4.5.0-rc2^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb7a4ac4fb9e32f620d800036b1abdd4bed09ce6;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Daniel P. Berrangé --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9afe705929..afd572fc5e 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -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;