]> git.proxmox.com Git - mirror_qemu.git/commit
s390x/pci: handle PCIBridge bus number
authorPierre Morel <pmorel@linux.vnet.ibm.com>
Wed, 23 Nov 2016 06:26:34 +0000 (14:26 +0800)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Fri, 20 Jan 2017 09:02:02 +0000 (10:02 +0100)
commitd2f07120a35ab31715e9c73438705b635873d06a
treed2d0b9497267b73181055ce56e8e4c2e0a4ef5c3
parentdf8dd91b99ed7d27c1cf9a0e6283b2452192d9a1
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>
hw/s390x/s390-pci-bus.c
hw/s390x/s390-pci-bus.h