]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Don't use CPU from host capabilities as host-model on ARM
authorJiri Denemark <jdenemar@redhat.com>
Tue, 5 May 2020 16:35:26 +0000 (18:35 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 6 May 2020 10:12:24 +0000 (12:12 +0200)
We never supported host-model CPUs on ARM and we don't want to support
them even once patches for direct detection of host CPU are merged. And
since using host CPU definition for host-model CPUs exists only for
backward compatibility, we should not use it for any host-model support
added in the future. Such enhancement should exclusively use the result
of query-cpu-model-expansion. Until proper host-model support is
implemented for ARM (if ever), we need to make sure the detected host
CPU is not accidentally used for host-model CPUs.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_capabilities.c

index c7e58f92aec64f11245b8ec8ad7c452c630b9e47..2c6e36685e50fc0878eca18b56f8db57316d1c89 100644 (file)
@@ -3569,6 +3569,8 @@ virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps,
     } else if (ARCH_IS_X86(qemuCaps->arch)) {
         ret = virQEMUCapsInitCPUModelX86(qemuCaps, type, modelInfo,
                                          cpu, migratable);
+    } else if (ARCH_IS_ARM(qemuCaps->arch)) {
+        ret = 2;
     }
 
     if (ret == 0)