From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: marcel.a@redhat.com, mst@redhat.com
Subject: [Qemu-devel] [PATCH v7 5/5] acpi-build: skip hotplugged bridges
Date: Fri, 30 Jan 2015 13:29:40 +0000 [thread overview]
Message-ID: <1422624580-30509-6-git-send-email-imammedo@redhat.com> (raw)
In-Reply-To: <1422624580-30509-1-git-send-email-imammedo@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" <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(-)
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
prev parent reply other threads:[~2015-01-30 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 13:29 [Qemu-devel] [PATCH v7 0/5] pc: acpi: various fixes and cleanups Igor Mammedov
2015-01-30 13:29 ` [Qemu-devel] [PATCH v7 1/5] acpi: move generic aml building helpers into dedictated file Igor Mammedov
2015-01-30 13:29 ` [Qemu-devel] [PATCH v7 2/5] acpi: add build_append_namestring() helper Igor Mammedov
2015-01-30 13:29 ` [Qemu-devel] [PATCH v7 3/5] acpi: drop min-bytes in build_package() Igor Mammedov
2015-01-30 13:29 ` [Qemu-devel] [PATCH v7 4/5] pc: acpi-build: simplify PCI bus tree generation Igor Mammedov
2015-01-30 13:29 ` Igor Mammedov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422624580-30509-6-git-send-email-imammedo@redhat.com \
--to=imammedo@redhat.com \
--cc=marcel.a@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).