From patchwork Tue Oct 25 17:28:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 686622 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t3KsP2cXFz9t80 for ; Wed, 26 Oct 2016 04:29:44 +1100 (AEDT) Received: from localhost ([::1]:56664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bz5Xh-0000NK-JB for incoming@patchwork.ozlabs.org; Tue, 25 Oct 2016 13:29:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bz5Wz-0008UH-Tm for qemu-devel@nongnu.org; Tue, 25 Oct 2016 13:29:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bz5Wx-0007cS-AO for qemu-devel@nongnu.org; Tue, 25 Oct 2016 13:28:57 -0400 Received: from smtp.citrix.com ([66.165.176.89]:49542) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1bz5Wx-0007cI-40 for qemu-devel@nongnu.org; Tue, 25 Oct 2016 13:28:55 -0400 X-IronPort-AV: E=Sophos;i="5.31,546,1473120000"; d="scan'208";a="386042727" From: Wei Liu To: Date: Tue, 25 Oct 2016 18:28:04 +0100 Message-ID: <1477416484-29054-1-git-send-email-wei.liu2@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 Subject: [Qemu-devel] [PATCH RFC] acpi: don't build acpi tables for xen hvm guests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Xen-devel , Stefano Stabellini , Wei Liu Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Wei Liu --- Cc: Anthony PERARD Cc: Stefano Stabellini 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();