[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 51/96] acpi-build: skip hotplugged bridges
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 51/96] acpi-build: skip hotplugged bridges |
Date: |
Wed, 18 Feb 2015 22:49:07 +0100 |
hotplugged bridges don't get bsel allocated so acpi hotplug doesn't work
for them anyway. OTOH adding them in ACPI creates a host of problems,
e.g. they can't be hot-unplugged themselves which is surprising to
users.
So let's just skip these.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/acpi-build.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 9b11c92..fa7e52a 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -699,8 +699,10 @@ static void build_pci_bus_end(PCIBus *bus, void *bus_state)
/*
* Skip bridge subtree creation if bridge hotplug is disabled
* to make acpi tables compatible with legacy machine types.
+ * Skip creation for hotplugged bridges as well.
*/
- if (!child->pcihp_bridge_en && bus->parent_dev) {
+ if (bus->parent_dev && (!child->pcihp_bridge_en ||
+ DEVICE(bus->parent_dev)->hotplugged)) {
build_free_array(bus_table);
build_pci_bus_state_cleanup(child);
g_free(child);
@@ -757,8 +759,10 @@ static void build_pci_bus_end(PCIBus *bus, void *bus_state)
/* When hotplug for bridges is enabled, bridges are
* described in ACPI separately (see build_pci_bus_end).
* In this case they aren't themselves hot-pluggable.
+ * Hotplugged bridges *are* hot-pluggable.
*/
- bridge_in_acpi = pc->is_bridge && child->pcihp_bridge_en;
+ bridge_in_acpi = pc->is_bridge && child->pcihp_bridge_en &&
+ !DEVICE(pdev)->hotplugged;
if (pc->class_id == PCI_CLASS_BRIDGE_ISA || bridge_in_acpi) {
set_bit(slot, slot_device_system);
--
MST
- [Qemu-devel] [PULL 43/96] linux-headers: use standard-headers, (continued)
- [Qemu-devel] [PULL 43/96] linux-headers: use standard-headers, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 44/96] virtio-pci: use standard headers, Michael S. Tsirkin, 2015/02/18
- Re: [Qemu-devel] [PULL 00/96] pci, pc, virtio fixes and cleanups, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 45/96] scripts: add arch specific standard-headers, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 46/96] standard-headers: add s390 virtio headers, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 47/96] s390: use standard headers, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 48/96] virtio: cull virtio_bus_set_vdev_features, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 49/96] virtio: feature bit manipulation helpers, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 50/96] virtio: add feature checking helpers, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 51/96] acpi-build: skip hotplugged bridges,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 52/96] pc: acpi: use local var for accessing ACPI tables blob in acpi_build(), Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 53/96] update-linux-headers.sh: s/__inline__/inline/, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 54/96] virtio-serial-bus.c: drop virtio_ids.h, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 55/96] standard-headers: include stdint.h, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 56/96] virtio_ring.h: s/__inline__/inline/, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 57/96] acpi: introduce AML composer aml_append(), Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 58/96] acpi: add aml_scope() term, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 59/96] pc: acpi-build: use aml_scope() for \_SB scope, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 60/96] acpi: add aml_device() term, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 61/96] acpi: add aml_method() term, Michael S. Tsirkin, 2015/02/18