From patchwork Fri Aug 11 15:11:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 800620 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 3xTT5C11v4z9t16 for ; Sat, 12 Aug 2017 01:12:31 +1000 (AEST) Received: from localhost ([::1]:48495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgBbx-0005JO-0o for incoming@patchwork.ozlabs.org; Fri, 11 Aug 2017 11:12:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgBbI-0005Hj-Or for qemu-devel@nongnu.org; Fri, 11 Aug 2017 11:11:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgBbE-0000hs-NO for qemu-devel@nongnu.org; Fri, 11 Aug 2017 11:11:48 -0400 Received: from smtp.citrix.com ([66.165.176.89]:27106) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1dgBbE-0000gJ-GD for qemu-devel@nongnu.org; Fri, 11 Aug 2017 11:11:44 -0400 X-IronPort-AV: E=Sophos;i="5.41,358,1498521600"; d="scan'208";a="435195355" From: Anthony PERARD To: Date: Fri, 11 Aug 2017 16:11:37 +0100 Message-ID: <20170811151138.29405-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170811151138.29405-1-anthony.perard@citrix.com> References: <20170811151138.29405-1-anthony.perard@citrix.com> MIME-Version: 1.0 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 for-2.10 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed 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: Stefano Stabellini , Eduardo Habkost , "Michael S. Tsirkin" , Bruce Rogers , Paolo Bonzini , Igor Mammedov , Anthony PERARD , xen-devel@lists.xenproject.org, Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" To do PCI passthrough with Xen, the property acpi-pcihp-bsel needs to be set, but this was done only when ACPI tables are built which is not needed for a Xen guest. The need for the property starts with commit "pc: pcihp: avoid adding ACPI_PCIHP_PROP_BSEL twice" (f0c9d64a68b776374ec4732424a3e27753ce37b6). Set pci info before checking for the needs to build ACPI tables. Reported-by: Sander Eikelenboom Tested-by: Sander Eikelenboom Signed-off-by: Anthony PERARD --- In this patch rather than always calling acpi_set_pci_info() when acpi_setup() is called, we could check first for acpi_enabled? (which is true for Xen.) This patch would be a canditade to backport to 2.9. CC: Stefano Stabellini CC: Bruce Rogers --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 98dd424678..e1b7797408 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2871,6 +2871,8 @@ void acpi_setup(void) AcpiBuildState *build_state; Object *vmgenid_dev; + acpi_set_pci_info(); + if (!pcms->fw_cfg) { ACPI_BUILD_DPRINTF("No fw cfg. Bailing out.\n"); return; @@ -2888,8 +2890,6 @@ void acpi_setup(void) build_state = g_malloc0(sizeof *build_state); - acpi_set_pci_info(); - acpi_build_tables_init(&tables); acpi_build(&tables, MACHINE(pcms));