[libvirt] [PATCH v2] treat host models as case-insensitive strings

Scott Garfinkle scottgar at linux.vnet.ibm.com
Tue Dec 26 19:55:08 UTC 2017

Qemu now allows case-insensitive specification of CPU models. This fixes the
resulting problems on (at least) POWER arch machines.

Patch V2: Change only the internal interface. This solves the actual problem at
hand of reporting unsupported models now that qemu allows case-insensitive
strings (e.g. "Power8" instead of "POWER8").

Signed-off-by: Scott Garfinkle <scottgar at linux.vnet.ibm.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 e7323a8..f7d9be5 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -271,7 +271,7 @@ virDomainCapsCPUModelsGet(virDomainCapsCPUModelsPtr cpuModels,
         return NULL;
     for (i = 0; i < cpuModels->nmodels; i++) {
-        if (STREQ(cpuModels->models[i].name, name))
+        if (STRCASEEQ(cpuModels->models[i].name, name))
             return cpuModels->models + i;

More information about the libvir-list mailing list