From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTVfz-0002EA-GV for qemu-devel@nongnu.org; Fri, 28 Mar 2014 08:14:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTVfq-0004ki-EL for qemu-devel@nongnu.org; Fri, 28 Mar 2014 08:14:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTVfq-0004kb-5X for qemu-devel@nongnu.org; Fri, 28 Mar 2014 08:14:14 -0400 Date: Fri, 28 Mar 2014 14:13:33 +0200 From: "Michael S. Tsirkin" Message-ID: <1396008068-20481-4-git-send-email-mst@redhat.com> References: <1396008068-20481-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1396008068-20481-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL for-2.0 3/3] acpi: fix ACPI generation for pci bridges List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori , Marcel Apfelbaum From: Marcel Apfelbaum Commit 8dcf525abc5dff785251a881f9764dd961065c0d acpi-build: append description for non-hotplug appended description for all occupied non hotpluggable PCI slots. However the bridge devices are already added to SSDT, adding them again will create an incorrect SSDT table. Fixed by skipping the pci bridge devices, marking them as 'system'. Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- 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 7597517..90ef95c 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -841,7 +841,7 @@ static void build_pci_bus_end(PCIBus *bus, void *bus_state) pc = PCI_DEVICE_GET_CLASS(pdev); dc = DEVICE_GET_CLASS(pdev); - if (pc->class_id == PCI_CLASS_BRIDGE_ISA) { + if (pc->class_id == PCI_CLASS_BRIDGE_ISA || pc->is_bridge) { set_bit(slot, slot_device_system); } @@ -882,7 +882,7 @@ static void build_pci_bus_end(PCIBus *bus, void *bus_state) memcpy(pcihp, ACPI_PCIVGA_AML, ACPI_PCIVGA_SIZEOF); patch_pcivga(i, pcihp); } else if (system) { - /* Nothing to do: system devices are in DSDT. */ + /* Nothing to do: system devices are in DSDT or in SSDT above. */ } else if (present) { void *pcihp = acpi_data_push(bus_table, ACPI_PCINOHP_SIZEOF); -- MST