[PATCH 08/15] qemu: command: Replace caps check for QEMU_CAPS_MACH_VIRT_GIC_VERSION by arch check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



QEMU_CAPS_MACH_VIRT_GIC_VERSION is always asserted for VIR_ARCH_AARCH64.

Note that this patch is a direct conversion of the logic originally
residing in the capabilities code. A better coversion would be (based on
whether it is available for just AARCH64 or also ARM) to base it on the
guest architecture.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 8d96f69f3d..41abecdb05 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6636,8 +6636,7 @@ qemuAppendDomainFeaturesMachineParam(virBuffer *buf,
         virBufferAsprintf(buf, ",smm=%s", virTristateSwitchTypeToString(smm));

     if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON) {
-        bool hasGICVersionOption = virQEMUCapsGet(qemuCaps,
-                                                  QEMU_CAPS_MACH_VIRT_GIC_VERSION);
+        bool hasGICVersionOption = virQEMUCapsGetArch(qemuCaps) == VIR_ARCH_AARCH64;

         switch ((virGICVersion) def->gic_version) {
         case VIR_GIC_VERSION_2:
-- 
2.39.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux