cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
0a122b
From 9c107e1c452bc40beac01fc01f208f76967cb36b Mon Sep 17 00:00:00 2001
0a122b
From: Michael S. Tsirkin <mst@redhat.com>
0a122b
Date: Sun, 12 Jan 2014 11:54:00 +0100
0a122b
Subject: [PATCH 09/16] acpi-build: disable with -no-acpi
0a122b
0a122b
RH-Author: Michael S. Tsirkin <mst@redhat.com>
0a122b
Message-id: <1389527552-15015-1-git-send-email-mst@redhat.com>
0a122b
Patchwork-id: 56637
0a122b
O-Subject: [PATCH qemu-kvm RHEL7.0] acpi-build: disable with -no-acpi
0a122b
Bugzilla: 1045386
0a122b
RH-Acked-by: Amos Kong <akong@redhat.com>
0a122b
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
0a122b
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
0a122b
RH-Acked-by: Richard Jones <rjones@redhat.com>
0a122b
0a122b
QEMU will currently crash if started with -no-acpi flag
0a122b
since acpi build code probes the PM device which isn't present
0a122b
in this configuration.
0a122b
0a122b
To fix, don't expose ACPI tables to guest when acpi has been
0a122b
disabled from command line.
0a122b
0a122b
Fixes LP# 1248854
0a122b
https://bugs.launchpad.net/qemu/+bug/1248854
0a122b
0a122b
Reported-by: chao zhou <chao.zhou@intel.com>
0a122b
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
0a122b
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
0a122b
(cherry picked from commit 81adc5131534ca7554cebe64cd8f86bac28dbd1b)
0a122b
0a122b
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1045386
0a122b
Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6854545
0a122b
---
0a122b
 hw/i386/acpi-build.c | 5 +++++
0a122b
 1 file changed, 5 insertions(+)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 hw/i386/acpi-build.c |    5 +++++
0a122b
 1 files changed, 5 insertions(+), 0 deletions(-)
0a122b
0a122b
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
0a122b
index 2d008bd..befc39f 100644
0a122b
--- a/hw/i386/acpi-build.c
0a122b
+++ b/hw/i386/acpi-build.c
0a122b
@@ -1185,6 +1185,11 @@ void acpi_setup(PcGuestInfo *guest_info)
0a122b
         return;
0a122b
     }
0a122b
 
0a122b
+    if (!acpi_enabled) {
0a122b
+        ACPI_BUILD_DPRINTF(3, "ACPI disabled. Bailing out.\n");
0a122b
+        return;
0a122b
+    }
0a122b
+
0a122b
     build_state = g_malloc0(sizeof *build_state);
0a122b
 
0a122b
     build_state->guest_info = guest_info;
0a122b
-- 
0a122b
1.7.1
0a122b