From cb7a4ac4fb9e32f620d800036b1abdd4bed09ce6 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 28 Jun 2018 11:37:09 +0200 Subject: [PATCH] qemu: Allow cachetune only for KVM domains MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- src/qemu/qemu_domain.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- GitLab