[libvirt] [PATCH 1/2] Revert "domcaps: Treat host models as case-insensitive strings"

Jiri Denemark jdenemar at redhat.com
Tue Oct 8 12:53:09 UTC 2019


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 at redhat.com>
---
 src/conf/domain_capabilities.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index 1000d8b969..fe93388cce 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -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;
     }
 
-- 
2.23.0




More information about the libvir-list mailing list