[libvirt PATCH] qemu: Don't use CPU from host capabilities as host-model on ARM

Jiri Denemark posted 1 patch 3 years, 12 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/f9bb07dd651a379c55cff5481db92b811bfcc9dc.1588752509.git.jdenemar@redhat.com
Test syntax-check failed
src/qemu/qemu_capabilities.c | 2 ++
1 file changed, 2 insertions(+)
[libvirt PATCH] qemu: Don't use CPU from host capabilities as host-model on ARM
Posted by Jiri Denemark 3 years, 12 months ago
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 exist 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>
---
 src/qemu/qemu_capabilities.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 47f88481c8..7b32511c3d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -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)
-- 
2.26.2

Re: [libvirt PATCH] qemu: Don't use CPU from host capabilities as host-model on ARM
Posted by Daniel P. Berrangé 3 years, 12 months ago
On Wed, May 06, 2020 at 10:08:29AM +0200, Jiri Denemark wrote:
> 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 exist 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>
> ---
>  src/qemu/qemu_capabilities.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|