From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHBdz-0007HY-K1 for qemu-devel@nongnu.org; Fri, 30 Jan 2015 08:29:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHBdv-0007sY-A1 for qemu-devel@nongnu.org; Fri, 30 Jan 2015 08:29:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHBdv-0007rI-1l for qemu-devel@nongnu.org; Fri, 30 Jan 2015 08:29:51 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0UDTnMJ025967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 30 Jan 2015 08:29:50 -0500 From: Igor Mammedov Date: Fri, 30 Jan 2015 13:29:40 +0000 Message-Id: <1422624580-30509-6-git-send-email-imammedo@redhat.com> In-Reply-To: <1422624580-30509-1-git-send-email-imammedo@redhat.com> References: <1422624580-30509-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH v7 5/5] acpi-build: skip hotplugged bridges List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: marcel.a@redhat.com, mst@redhat.com Hotplugged bridges don't get bsel allocated so acpi hotplug doesn't work for them anyway, also it causes ACPI tables size change across reboot when bridge was hotplugged before reboot, which doesn't work with immutable RSDP. This patch works around static RSDP issue, where if ACPI tables blob changes it size across reboots RSDT shifts up or down and RSDP no longer ponts to it, as result guest can't find/initialize ACPI tables correctly. Which causes BSOD for Windows guests. With this patch slot where bridge was hotplugged will keep the same description, i.e. as hotpluggable slot and also hotplugged bridge subtree won't be build, keeping size of ACPI tables blob the same. Subtree for bridge is build only for cold-plugged bridges. based on "Michael S. Tsirkin" patch http://lists.gnu.org/archive/html/qemu-devel/2015-01/msg04085.html but a bit simpler Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index f91b7cf..27adfb9 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -723,7 +723,7 @@ static void build_append_pci_bus_devices(GArray *parent_scope, PCIBus *bus, if (pc->class_id == PCI_CLASS_BRIDGE_ISA) { continue; } - bridge_in_acpi = pc->is_bridge && pcihp_bridge_en; + bridge_in_acpi = pc->is_bridge && pcihp_bridge_en && !dc->hotpluggable; if (pc->class_id == PCI_CLASS_DISPLAY_VGA) { @@ -751,9 +751,7 @@ static void build_append_pci_bus_devices(GArray *parent_scope, PCIBus *bus, memcpy(pcihp, ACPI_PCINOHP_AML, ACPI_PCINOHP_SIZEOF); patch_pcinohp(slot, pcihp); - /* When hotplug for bridges is enabled, bridges that are - * described in ACPI separately aren't themselves hot-pluggable. - */ + /* Describe coldplugged bridges in ACPI */ if (bridge_in_acpi) { PCIBus *sec_bus = pci_bridge_get_sec_bus(PCI_BRIDGE(pdev)); -- 1.8.3.1