From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeOUX-0007sZ-UD for qemu-devel@nongnu.org; Thu, 07 Nov 2013 07:15:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VeOUT-0003qA-5y for qemu-devel@nongnu.org; Thu, 07 Nov 2013 07:15:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:65405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeOUS-0003p9-UF for qemu-devel@nongnu.org; Thu, 07 Nov 2013 07:15:13 -0500 Date: Thu, 7 Nov 2013 14:18:05 +0200 From: "Michael S. Tsirkin" Message-ID: <20131107121805.GA2069@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] acpi-build: disable with -no-acpi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: chao zhou Cc: "Michael S. Tsirkin" , Dave Frodin , qemu-devel@nongnu.org, Gerd Hoffmann , Anthony Liguori , Kenji Kaneshige , Magnus Christensson 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 Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 6cfa044..486e705 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; -- MST