aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/s390-pci-bus.h
diff options
context:
space:
mode:
authorPierre Morel <pmorel@linux.vnet.ibm.com>2016-11-23 14:26:34 +0800
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-01-20 10:02:02 +0100
commitd2f07120a35ab31715e9c73438705b635873d06a (patch)
treed2d0b9497267b73181055ce56e8e4c2e0a4ef5c3 /hw/s390x/s390-pci-bus.h
parentdf8dd91b99ed7d27c1cf9a0e6283b2452192d9a1 (diff)
s390x/pci: handle PCIBridge bus number
The PCI bus number is usually set by the host during the enumeration. In the s390 architecture we neither get a Device Tree nor have an enumeration understanding bridge devices. Let's fake the enumeration on reset and set the PCI_PRIMARY_BUS, PCI_SECONDARY_BUS and PCI_SUBORDINATE_BUS config entries for the bridges. Let's add the configuration of these three config entries on bridge hot plug. The bus number is calculated based on a new entry, bus_num of the S390pciState device. This commit is inspired by what spapr pci does. Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/s390-pci-bus.h')
-rw-r--r--hw/s390x/s390-pci-bus.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/s390x/s390-pci-bus.h b/hw/s390x/s390-pci-bus.h
index b82b18eb07..b0adefa788 100644
--- a/hw/s390x/s390-pci-bus.h
+++ b/hw/s390x/s390-pci-bus.h
@@ -310,6 +310,7 @@ typedef struct S390PCIBus {
typedef struct S390pciState {
PCIHostState parent_obj;
uint32_t next_idx;
+ int bus_no;
S390PCIBus *bus;
GHashTable *iommu_table;
GHashTable *zpci_table;