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: 9896199 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 910EA602DA for ; Fri, 11 Aug 2017 15:13:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82DEB28B96 for ; Fri, 11 Aug 2017 15:13:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77A3028BBD; Fri, 11 Aug 2017 15:13:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B08C128B96 for ; Fri, 11 Aug 2017 15:13:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgBbE-0003pn-JD; Fri, 11 Aug 2017 15:11:44 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgBbD-0003pB-0X for xen-devel@lists.xenproject.org; Fri, 11 Aug 2017 15:11:43 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id 8A/BD-09901-E29CD895; Fri, 11 Aug 2017 15:11:42 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEIsWRWlGSWpSXmKPExsXitHRDpK7uyd5 Ig2dLDS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1owXDdNZC/5wV3RNeMbWwNjC1cXIySEh4C/R eXwzI4jNJmAgsWL6VTBbREBaon9OO3sXIxcHs8ADJonDf86ygiSEBSIkzm37CVbEIqAqsenKC XYQm1fATuLd8kssEEPlJfp3LGcCsTkF7CXmr7/IDGILAdVMbvzGCmGrSdxYuIwFoldQ4uTMJ2 A2s4CExMEXL5gnMPLOQpKahSS1gJFpFaNGcWpRWWqRrpGBXlJRZnpGSW5iZo6uoYGZXm5qcXF iempOYlKxXnJ+7iZGYPgwAMEOxl/LAg4xSnIwKYnyJvj0RgrxJeWnVGYkFmfEF5XmpBYfYpTh 4FCS4E08AZQTLEpNT61Iy8wBBjJMWoKDR0mENxokzVtckJhbnJkOkTrFqMvxasL/b0xCLHn5e alS4rw2IEUCIEUZpXlwI2BRdYlRVkqYlxHoKCGegtSi3MwSVPlXjOIcjErCvBogU3gy80rgNr 0COoIJ6Ig+H7AjShIRUlINjNKGK0WKS7qEPRjFFK+G75yd6azQ7VtzoPtj7zHRe1sV3jInPL+ 9tpJ/1aT3wfrCT3eIb7a+O/V4VrzN+zMVjxOWLIiKv3dyM7v77Fm3/uk8ZNaplZMV+vwztve5 kE/sAyfdzc+D9r5aKrHFSuO7ae3nIv66A+03rD6Js53v8Hpm9+nP541chkosxRmJhlrMRcWJA HfniG2lAgAA X-Env-Sender: prvs=3891006ae=anthony.perard@citrix.com X-Msg-Ref: server-16.tower-27.messagelabs.com!1502464300!111084979!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20060 invoked from network); 11 Aug 2017 15:11:41 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-16.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 11 Aug 2017 15:11:41 -0000 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 Cc: Stefano Stabellini , Eduardo Habkost , "Michael S. Tsirkin" , Bruce Rogers , Paolo Bonzini , Igor Mammedov , Anthony PERARD , xen-devel@lists.xenproject.org, Richard Henderson Subject: [Xen-devel] [PATCH for-2.10 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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));