]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Revert "domcaps: Treat host models as case-insensitive strings"
authorJiri Denemark <jdenemar@redhat.com>
Wed, 16 May 2018 14:58:47 +0000 (16:58 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 9 Oct 2019 07:53:41 +0000 (09:53 +0200)
This reverts commit 2d8721e2606806164782028ecf1ee33a9bbaa8fe.

This fix was both incomplete and too general. It only fixed domain
startup, but libvirt would still report empty list of supported CPU
models with recent QEMU for ppc64. On the other hand, while ppc64 QEMU
ignores case when looking up CPU model names, x86_64 QEMU does case
sensitive lookup. Without reverting this patch, libvirt could happily
accept CPU model names which are not supported by QEMU.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_capabilities.c

index 1000d8b969cbd34b8d268ada2c9225354dd1ebd4..fe93388cce60ec59f7b03a2a6200ad96e4e55d3c 100644 (file)
@@ -278,7 +278,7 @@ virDomainCapsCPUModelsGet(virDomainCapsCPUModelsPtr cpuModels,
         return NULL;
 
     for (i = 0; i < cpuModels->nmodels; i++) {
-        if (STRCASEEQ(cpuModels->models[i].name, name))
+        if (STREQ(cpuModels->models[i].name, name))
             return cpuModels->models + i;
     }