[libvirt] [PATCH] qemu: Allow cachetune only for KVM domains

Michal Privoznik mprivozn at redhat.com
Thu Jun 28 12:45:38 UTC 2018


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 CGroup. Forbid such configuration.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 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 fee44812c1..a39d9a46a0 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3980,6 +3980,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;
 
-- 
2.16.4




More information about the libvir-list mailing list