summary refs log tree commit diff stats
path: root/include/qemu-common.h
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2019-01-30 16:57:29 +0100
committerCornelia Huck <cohuck@redhat.com>2019-02-05 10:16:59 +0100
commit150f462538a6f3b78efe785c911669375032b0d2 (patch)
tree2992051a35c61999eb9affb16b464ab119afdbe8 /include/qemu-common.h
parentd30a7507edf1ca23d33dbf00b25f5e49a7808492 (diff)
downloadfocaccia-qemu-150f462538a6f3b78efe785c911669375032b0d2.tar.gz
focaccia-qemu-150f462538a6f3b78efe785c911669375032b0d2.zip
s390x/pci: Fix hotplugging of PCI bridges
When hotplugging a PCI bridge right now to the root port, we resolve
pci_get_bus(pdev)->parent_dev, which results in a SEGFAULT. Hotplugging
really only works right now when hotplugging to another bridge.

Instead, we have to properly check if we are already at the root.

Let's cleanup the code while at it a bit and factor out updating the
subordinate bus number into a separate function. The check for
"old_nr < nr" is right now not strictly necessary, but makes it more
obvious what is actually going on.

Most probably fixing up the topology is not our responsibility when
hotplugging. The guest has to sort this out. But let's keep it for now
and only fix current code to not crash.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20190130155733.32742-3-david@redhat.com>
Reviewed-by: Collin Walling <walling@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'include/qemu-common.h')
0 files changed, 0 insertions, 0 deletions