Received: from eggs.gnu.org ([2001:4830:134:3::10]:53938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vftxa-0005yd-UC for qemu-devel@nongnu.org; Mon, 11 Nov 2013 11:03:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VftxW-00050t-6L for qemu-devel@nongnu.org; Mon, 11 Nov 2013 11:03:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VftxV-00050o-Un for qemu-devel@nongnu.org; Mon, 11 Nov 2013 11:03:26 -0500 Date: Mon, 11 Nov 2013 18:06:22 +0200 From: "Michael S. Tsirkin" Message-ID: <1384159176-31662-4-git-send-email-mst@redhat.com> References: <1384159176-31662-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1384159176-31662-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 3/6] acpi-build: disable with -no-acpi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: chao zhou , Anthony Liguori , Gerd Hoffmann 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 Reviewed-by: Gerd Hoffmann --- 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