qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v7 5/5] acpi-build: skip hotplugged bridges


From: Igor Mammedov
Subject: [Qemu-devel] [PATCH v7 5/5] acpi-build: skip hotplugged bridges
Date: Fri, 30 Jan 2015 13:29:40 +0000

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" <address@hidden> patch
http://lists.gnu.org/archive/html/qemu-devel/2015-01/msg04085.html
but a bit simpler

Signed-off-by: Igor Mammedov <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]