[libvirt PATCH 10/17] fixup! qemu: Fix HVF architecture check

Andrea Bolognani abologna at redhat.com
Tue Jan 4 18:52:49 UTC 2022


Apple Silicon (aarch64) has HVF support, but there is no
32-bit Intel hardware that is HVF-capable.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 src/qemu/qemu_capabilities.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c2ae87d747..da66cdbb22 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3248,7 +3248,8 @@ virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps)
         hv_support = 0;
 
     if (qemuCaps->version >= 2012000 &&
-        ARCH_IS_X86(qemuCaps->arch) &&
+        (qemuCaps->arch == VIR_ARCH_X86_64 ||
+         qemuCaps->arch == VIR_ARCH_AARCH64) &&
         hv_support) {
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_HVF);
     }
-- 
2.31.1




More information about the libvir-list mailing list