qemu-e2k/hw/pci
Michael Roth c13ee16911 pci: allow cleanup/unregistration of PCI root buses
This adds cleanup counterparts to pci_register_root_bus(),
pci_root_bus_new(), and pci_bus_irqs().

These cleanup routines are needed in the case of hotpluggable
PCIHostBridge implementations. Currently we can rely on the
object_unparent()'ing of the PCIHostState recursively unparenting
and cleaning up it's child buses, but we need explicit calls
to also:

  1) remove the PCIHostState from pci_host_bridges global list.
     otherwise, we risk accessing freed memory when we access
     the list later
  2) clean up memory allocated in pci_bus_irqs()

Both are handled outside the context of any particular bus or
host bridge's init/realize functions, making it difficult to
avoid the need for explicit cleanup functions without remodeling
how PCIHostBridges are created. So keep it simple and just add
them for now.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-01-09 09:28:14 +11:00
..
Makefile.objs
msi.c
msix.c vmstate: constify VMStateField 2018-11-27 15:35:15 +01:00
pci_bridge.c hw/pci-bridge: Fix invalid free() 2018-12-19 16:48:16 -05:00
pci_host.c pci: Adjust PCI config limit based on bus topology 2018-12-20 11:25:36 -05:00
pci-stub.c qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
pci.c pci: allow cleanup/unregistration of PCI root buses 2019-01-09 09:28:14 +11:00
pcie_aer.c
pcie_host.c
pcie_port.c pci/pcie: perform unplug via the hotplug handler 2018-12-20 11:19:12 -05:00
pcie.c pci/pcie: perform unplug via the hotplug handler 2018-12-20 11:19:12 -05:00
shpc.c pci/shpc: perform unplug via the hotplug handler 2018-12-20 11:19:12 -05:00
slotid_cap.c
trace-events