s390x/pci: Move some hotplug checks to the pre_plug handler
commit6069bcdeaceebb91f43bc4762e3f63eee48cd390
authorDavid Hildenbrand <david@redhat.com>
Mon, 14 Jan 2019 10:31:06 +0000 (14 11:31 +0100)
committerCornelia Huck <cohuck@redhat.com>
Fri, 18 Jan 2019 10:52:01 +0000 (18 11:52 +0100)
tree7a6ca99ed01c42d6feac4d372533e748ae55a810
parent19375e9be0ccb7ec02dffbc6ffceafd3c480b799
s390x/pci: Move some hotplug checks to the pre_plug handler

Let's move most of the checks to the new pre_plug handler. As a PCI
bridge is just a PCI device, we can simplify the code.

Notes: We cannot yet move the MSIX check or device ID creation +
zPCI device creation to the pre_plug handler as both parts are not
fixed before actual device realization (and therefore after pre_plug and
before plug). Once that part is factored out, we can move these parts to
the pre_plug handler, too and therefore remove all possible errors from
the plug handler.

Reviewed-by: Collin Walling <walling@linux.ibm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20190114103110.10909-3-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
hw/s390x/s390-pci-bus.c