Skip to content

pci: split out bridge code into pci_bridge and make it library

Isaku Yamahata qemu-devel 3 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 4 repliesApplied
  2. v25 patches 6 repliesSuperseded
  3. v12 patches 10 repliesSuperseded

Changes v2 -> v1 from the cover letter

- dropped first patch as it is merdged.
- rebased to mst's pci branch.
- eliminated pci_brdige_qdev_register(), pci_brdige_create(), pci_brdige_create_simple() by exporting PCIBus and PCIBridge.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4pci/bridge: split out pci bridge code into pci_bridge.c from pci.cMakefile.objs hw/apb_pci.c hw/dec_pci.c +4 more+262 -1800 replies
2/4pci_bridge: rename PCIBridge::bus -> PCIBridge::sec_bus.hw/pci_bridge.c hw/pci_internals.h+5 -70 replies
3/4pci_bridge: clean up: remove pci_{register, unregister}_secondary_bus()hw/pci_bridge.c+10 -220 replies
4/4pci_bridge: introduce pci bridge library.hw/apb_pci.c hw/dec_pci.c hw/pci_bridge.c +3 more+178 -840 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/4] pci: split out bridge code into pci_bridge and make it library

Changes v2 -> v1:
- dropped first patch as it is merdged.
- rebased to mst's pci branch.
- eliminated pci_brdige_qdev_register(), pci_brdige_create(), pci_brdige_create_simple() by exporting PCIBus and PCIBridge.

Patch description:
Now pci.c has grown. So split bridge related code into dedicated file for further extension to pci bridge. Further clean up and pcie port emulator. This make patch conflict less possible in future.

Clean up of pci host bus ans piix pci as discussed with v1 will be addressed after this patch set is accepted.

changes v1 -> v2:
- introduce pci_internals.h to accomodate pci internal strcutures to share between pci.c and pci_bridge.c
- don't make PCIBridge::bus pointer as suggested by
Michael S. Tsirkin <[email protected]>
- rename PCIBridge::bus -> PCIBridge::sec_bus
- eliminate pci_reguster_secondary_bus()/pci_unregister_secondary_bus()
- document pci bridge library functions.
- introduced pci bridge library.

Isaku Yamahata (4):
pci/bridge: split out pci bridge code into pci_bridge.c from pci.c
pci_bridge: rename PCIBridge::bus -> PCIBridge::sec_bus.
pci_bridge: clean up: remove pci_{register,
unregister}_secondary_bus()
pci_bridge: introduce pci bridge library.

 Makefile.objs      |    2 +-
 hw/apb_pci.c       |   56 +++++++++++---
 hw/dec_pci.c       |   46 +++++++++--
 hw/pci.c           |  177 +-------------------------------------------
 hw/pci.h           |    5 +-
 hw/pci_bridge.c    |  210 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/pci_bridge.h    |   62 +++++++++++++++
 hw/pci_internals.h |   17 +++-
 qemu-common.h      |    1 +
 9 files changed, 369 insertions(+), 207 deletions(-)
 create mode 100644 hw/pci_bridge.c
 create mode 100644 hw/pci_bridge.h