summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael S. Tsirkin2013-11-07 13:12:05 +0100
committerMichael S. Tsirkin2013-11-10 11:08:38 +0100
commit81adc5131534ca7554cebe64cd8f86bac28dbd1b (patch)
tree5cfcc6ccb8bcc45569af8660d4b69d2ca0a70c9d
parentvirtio-net: only delete bh that existed (diff)
downloadqemu-81adc5131534ca7554cebe64cd8f86bac28dbd1b.tar.gz
qemu-81adc5131534ca7554cebe64cd8f86bac28dbd1b.tar.xz
qemu-81adc5131534ca7554cebe64cd8f86bac28dbd1b.zip
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 Reported-by: chao zhou <chao.zhou@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--hw/i386/acpi-build.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 6cfa0446ac..486e7055a6 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -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;