]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Allow cachetune only for KVM domains v4.5.0-rc2
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 28 Jun 2018 09:37:09 +0000 (11:37 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 28 Jun 2018 15:06:52 +0000 (17:06 +0200)
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>
src/qemu/qemu_domain.c

index 9afe70592983c29c605a435704ea1c8f57a2d4de..afd572fc5e78959c66a86197f9b25e232c666f66 100644 (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;