@@ -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));
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" <mst@redhat.com> patch http://lists.gnu.org/archive/html/qemu-devel/2015-01/msg04085.html but a bit simpler Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)