Skip to contentSkip to conversation

acpi-build: disable with -no-acpi

PATCH In review Michael S. Tsirkin 2 participants 3 messages Nov 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi-build: disable with -no-acpi

QEMU will currently crash if started with -no-acpi flag since acpi build code probes the PM device which isn't present in this configuration.

To fix, don't expose ACPI tables to guest when acpi has been disabled from command line.

Fixes LP# 1248854
https://bugs.launchpad.net/qemu/+bug/1248854

---
 hw/i386/acpi-build.c | 5 +++++
 1 file changed, 5 insertions(+)
hw/i386/acpi-build.c +5 -0
index 6cfa044..486e705 100644
@@ -1182,6 +1182,11 @@ void acpi_setup(PcGuestInfo *guest_info)
         return;
     }
 
+    if (!acpi_enabled) {
+        ACPI_BUILD_DPRINTF(3, "ACPI disabled. Bailing out.\n");
+        return;
+    }
+
     build_state = g_malloc0(sizeof *build_state);
 
     build_state->guest_info = guest_info;
Signature · 1 line
MST
Reviewed-by on v1 1/1
#1 lore raw

hw/i386/acpi-build.c void acpi_setup(PcGuestInfo *guest_info) · line 1188

Quoted 4 lines · Michael S. Tsirkin
hw/i386/acpi-build.c +4 -0
+    if (!acpi_enabled) {
+        ACPI_BUILD_DPRINTF(3, "ACPI disabled. Bailing out.\n");
+        return;
+    }

cheers,
Gerd

#2 lore raw
Quoted 7 lines · Gerd Hoffmann

hw/i386/acpi-build.c void acpi_setup(PcGuestInfo *guest_info) · line 1188

Quoted 4 lines · Michael S. Tsirkin
hw/i386/acpi-build.c +4 -0
+    if (!acpi_enabled) {
+        ACPI_BUILD_DPRINTF(3, "ACPI disabled. Bailing out.\n");
+        return;
+    }

Apropos, long term if someone's inclined it's possible to look at enabling acpi on stripped down systems without pm or pci.

Probably not a high priority project ...

Quoted 3 lines

cheers,
Gerd