qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: chao zhou <chao.zhou@intel.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Dave Frodin <dave.frodin@se-eng.com>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
	Anthony Liguori <aliguori@amazon.com>,
	Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
	Magnus Christensson <magnus.christensson@intel.com>
Subject: [Qemu-devel] [PATCH] acpi-build: disable with -no-acpi
Date: Thu, 7 Nov 2013 14:18:05 +0200	[thread overview]
Message-ID: <20131107121805.GA2069@redhat.com> (raw)

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>
---
 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

             reply	other threads:[~2013-11-07 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07 12:18 Michael S. Tsirkin [this message]
2013-11-07 13:03 ` [Qemu-devel] [PATCH] acpi-build: disable with -no-acpi Gerd Hoffmann
2013-11-07 13:19   ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131107121805.GA2069@redhat.com \
    --to=mst@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=chao.zhou@intel.com \
    --cc=dave.frodin@se-eng.com \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=kraxel@redhat.com \
    --cc=magnus.christensson@intel.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).