]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: command: Replace check using QEMU_CAPS_NO_ACPI with architecture check
authorPeter Krempa <pkrempa@redhat.com>
Mon, 6 Mar 2023 14:30:33 +0000 (15:30 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 7 Mar 2023 11:26:32 +0000 (12:26 +0100)
QEMU_CAPS_NO_ACPI is asserted based on architecture, so it can be
replaced by a non-capability check.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c

index 7a1cff1fd02e0b64c08d1db9034042a1d91bc581..189be555372ccf0279faaf446ceb8c6d8886b4f5 100644 (file)
@@ -5969,7 +5969,9 @@ qemuBuildPMCommandLine(virCommand *cmd,
     /* Use old syntax of -no-acpi only if qemu didn't report that it supports the
      * new syntax */
     if (virQEMUCapsMachineSupportsACPI(qemuCaps, def->virtType, def->os.machine) == VIR_TRISTATE_BOOL_ABSENT &&
-        virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_ACPI)) {
+        (def->os.arch == VIR_ARCH_I686 ||
+         def->os.arch == VIR_ARCH_X86_64 ||
+         def->os.arch == VIR_ARCH_AARCH64)) {
         if (def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON)
             virCommandAddArg(cmd, "-no-acpi");
     }