qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC] acpi: don't build acpi tables for xen hvm guests
@ 2016-10-25 17:28 Wei Liu
  2016-10-25 23:33 ` Stefano Stabellini
  2016-10-26 15:09 ` Igor Mammedov
  0 siblings, 2 replies; 15+ messages in thread
From: Wei Liu @ 2016-10-25 17:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Xen-devel, Wei Liu, Anthony PERARD, Stefano Stabellini

Xen's toolstack is in charge of building ACPI tables. Skip acpi table
building if running on Xen.

This issue is discovered due to direct kernel boot on Xen doesn't boot
anymore, because the new ACPI tables cause the guest to exceed its
memory allocation limit.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Anthony PERARD <anthony.perard@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>

RFC because I'm not sure this is the best way to fix it.
---
 hw/i386/acpi-build.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index a26a4bb..2cdff12 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -45,6 +45,7 @@
 #include "sysemu/tpm_backend.h"
 #include "hw/timer/mc146818rtc_regs.h"
 #include "sysemu/numa.h"
+#include "hw/xen/xen.h"
 
 /* Supported chipsets: */
 #include "hw/acpi/piix4.h"
@@ -2865,6 +2866,11 @@ void acpi_setup(void)
         return;
     }
 
+    if (xen_enabled()) {
+        ACPI_BUILD_DPRINTF("Xen enabled. Bailing out.\n");
+        return;
+    }
+
     build_state = g_malloc0(sizeof *build_state);
 
     acpi_set_pci_info();
-- 
2.1.4

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

end of thread, other threads:[~2016-10-27 13:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-25 17:28 [Qemu-devel] [PATCH RFC] acpi: don't build acpi tables for xen hvm guests Wei Liu
2016-10-25 23:33 ` Stefano Stabellini
2016-10-26 10:32   ` Wei Liu
2016-10-26 14:26     ` Eduardo Habkost
2016-10-26 15:09 ` Igor Mammedov
2016-10-26 15:22   ` Wei Liu
2016-10-26 21:27     ` Stefano Stabellini
2016-10-26 21:30       ` Stefano Stabellini
2016-10-27 10:54     ` Igor Mammedov
2016-10-27 11:03       ` Wei Liu
2016-10-27 11:10         ` Wei Liu
2016-10-27 11:26           ` [Qemu-devel] [Xen-devel] " Igor Mammedov
2016-10-27 11:29             ` Wei Liu
2016-10-27 13:02               ` Igor Mammedov
2016-10-27 10:57     ` [Qemu-devel] " Igor Mammedov

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