qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] acpi-build: disable with -no-acpi
@ 2013-11-07 12:18 Michael S. Tsirkin
  2013-11-07 13:03 ` Gerd Hoffmann
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2013-11-07 12:18 UTC (permalink / raw)
  To: chao zhou
  Cc: Michael S. Tsirkin, Dave Frodin, qemu-devel, 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 <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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] acpi-build: disable with -no-acpi
  2013-11-07 12:18 [Qemu-devel] [PATCH] acpi-build: disable with -no-acpi Michael S. Tsirkin
@ 2013-11-07 13:03 ` Gerd Hoffmann
  2013-11-07 13:19   ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2013-11-07 13:03 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Dave Frodin, qemu-devel, chao zhou, Anthony Liguori,
	Kenji Kaneshige, Magnus Christensson

On Do, 2013-11-07 at 14:18 +0200, Michael S. Tsirkin wrote:
> +    if (!acpi_enabled) {
> +        ACPI_BUILD_DPRINTF(3, "ACPI disabled. Bailing out.\n");
> +        return;
> +    }

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] acpi-build: disable with -no-acpi
  2013-11-07 13:03 ` Gerd Hoffmann
@ 2013-11-07 13:19   ` Michael S. Tsirkin
  0 siblings, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2013-11-07 13:19 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Dave Frodin, qemu-devel, chao zhou, Anthony Liguori,
	Kenji Kaneshige, Magnus Christensson

On Thu, Nov 07, 2013 at 02:03:00PM +0100, Gerd Hoffmann wrote:
> On Do, 2013-11-07 at 14:18 +0200, Michael S. Tsirkin wrote:
> > +    if (!acpi_enabled) {
> > +        ACPI_BUILD_DPRINTF(3, "ACPI disabled. Bailing out.\n");
> > +        return;
> > +    }
> 
> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

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

> cheers,
>   Gerd
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-07 13:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07 12:18 [Qemu-devel] [PATCH] acpi-build: disable with -no-acpi Michael S. Tsirkin
2013-11-07 13:03 ` Gerd Hoffmann
2013-11-07 13:19   ` Michael S. Tsirkin

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