hw/pc: implement multiple primary busses for pc machines
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest17 patches 1 replyIn review
- v724 patches 21 repliesSuperseded
- v626 patches 34 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 28 patches | 29 replies | Superseded | |
| v4 | 25 patches | 40 replies | Superseded | |
| v3 | 24 patches | 20 replies | Superseded | |
| v2 RFC | 17 patches | 9 replies | Superseded | |
| v1 RFC | 17 patches | 3 replies | Superseded |
Changes in v8 from the cover letter
- rebased on latest pci branch
- aml patches already taken
- added a fix for one of the aml patches
Patches in v8 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/17 | acpi: add implementation of aml_while() termhw/ | +8 | 0 replies | |
| 2/17 | hw/pci: made pci_bus_is_root a PCIBusClass methodhw/ include/ include/ | +24 | 0 replies | |
| 3/17 | hw/pci: made pci_bus_num a PCIBusClass methodhw/ include/ | +11 | 0 replies | |
| 4/17 | hw/i386: query only for q35/pc when looking for pci host bridgehw/ | +25 | 0 replies | |
| 5/17 | hw/pci: extend PCI config access to support devices behind PXBhw/ | +29 | 0 replies | |
| 6/17 | hw/acpi: add support for i440fx 'snooping' root busseshw/ | +23 | 0 replies | |
| 7/17 | hw/apci: add _PRT method for extra PCI root busseshw/ | +81 | 0 replies | |
| 8/17 | hw/acpi: add _CRS method for extra root busseshw/ | +139 | 0 replies | |
| 9/17 | hw/acpi: remove from root bus 0 the crs resources used by other buses.hw/ | +91 | 0 replies | |
| 10/17 | hw/pci: removed 'rootbus nr is 0' assumption from qmp_pci_queryhw/ | +2 | 0 replies | |
| 11/17 | hw/pci: introduce PCI Expander Bridge (PXB)hw/ hw/ include/ | +198 | 0 replies | |
| 12/17 | hw/pci: inform bios if the system has extra pci root buseshw/ | +20 | 0 replies | |
| 13/17 | hw/pxb: add map_irq funchw/ | +19 | 0 replies | |
| 14/17 | hw/pci: add support for NUMA nodeshw/ include/ include/ +1 more | +14 | 0 replies | |
| 15/17 | hw/pxb: add numa_node parameterhw/ hw/ | +23 | 0 replies | |
| 16/17 | apci: fix PXB behaviour if used with unsupported BIOShw/ | +58 | 0 replies | |
| 17/17 | docs: Add PXB documentationdocs/ | +58 | 0 replies |
Reviews trailers per patch
None of the 17 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Laszlo Ersek |
|---|---|
| Series | A-b |
| 1/17 | |
| 2/17 | |
| 3/17 | |
| 4/17 | |
| 5/17 | |
| 6/17 | |
| 7/17 | |
| 8/17 | |
| 9/17 | |
| 10/17 | |
| 11/17 | |
| 12/17 | |
| 13/17 | |
| 14/17 | |
| 15/17 | |
| 16/17 | |
| 17/17 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH V8 00/17] hw/pc: implement multiple primary busses for pc machines
The series is fully functional.
- Limitations:
- Pxb's bus does not support hotplug. It will be addressed on top of this series because is already getting to big.
- Pxb devices work only for i440fx and can be attached only to bus 0.
- You are more than welcome to try using:
-device pxb,id=pxb,bus_nr=4,numa_node=1 -device e1000,bus=pxb,addr=0x1
v7->v8:
- rebased on latest pci branch
- aml patches already taken
- added a fix for one of the aml patches
v6->v7:
- This version includes some refactoring requested by Michael S. Tsirking, but no new functionality:
- Removed TYPE_PCI_MAIN_HOST_BRIDGE interface and scan only pc/q35 host-bridges when
needed, see patch 11/24.
- Removed TYPE_PCI_HOST_BRIDGE_SNOOPED interface and added PXB buses as child buses of i440fx. The pci configuration is changed to support PXBs, see patch 12/24.
- Removed patch "hw/pci: move pci bus related code to separate files" and refactor all patches that touched the new file.
- Addressed Paolo's review:
- Changed documentation to always use numa policy "bind".
v5->v6:
- This version includes a lot of refactoring requested by Michael S. Tsirking, but no new/different functionality:
- Removed the HOST_BRIDGE_FOR_EACH loop because it too generic
- Reduced the generic "extra pci roots" aproach to a more "non-generic" root bus having snooping buses listening to its configuration space. Instead of going over all host bridges, we go only over the snooping host bridges associated with the main host bridge.
- The current implementation made i440fx the only a "snooped" host bridge
- Addressed Michael S. Tsirkin's review:
- Replaced qmp queries with native pci ones.
- Squashed later patches into their places
- Tweaked a few comments
- Addressed Shannon Zhao's review:
- Used build_append_byte instead of build_append_int
- Addressed Gerd's review:
- Reduced the "Line over 80" warnings.
- Rebased on pci branch, tree: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git
- a few days before, I hope is enough
- Changed some patches order
v4->v5:
- Rebased on pci branch, tree: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git
- Added PXB documentation (patch 28/28)
- Addressed Gerd Hoffmann's review:
- fix PXB behaviour if used with unsupported BIOS (patch 27/28)
- Addressed Michael S. Tsirkin's review:
- Removed assert in aml_index (patch 5/28)
- Renamed pci_ functions to crs_ (patch 12/28)
- used uint64_t variables instead of signed ones (patch 12/28)
- Emit MEM/IO AML only for PXBs and i440fx (patch 26/28)
- Addressed Shannon Zhao's review:
- Changed build_append_int to build_append_byte in aml_or (patch 2/25)
- Thanks to Igor and Kevin for reviews
v3->v4:
- Addressed Michael S. Tsirkin's review:
- refactored build_prt method (patch 11/25) hw/apci: add _PRT method for extra PCI root busses
- Addressed Igor Mammedov's reiew
- add assert to aml_index (patch 5/25)
- Fixed aml_equal implementation (patch 1/25)
v2->v3:
- Rebased on Michael S. Tsirkin's pci branch (that includes now all the dependencies)
- Refactored acpi terms patch into multiple patches to match Igor's design.
v1->v2:
- Add support for multiple pxb devices.
- Attach pxb's bus to specific NUMA node.
- Got rid of the hacks from prev version.
- Tested also for Win7 and Fedora 20, and for virtio blk devices.
- Several bug-fixes resulting in a stable version ready for submission.
Reasoning:
We need multiple primary busess for a few reasons, the most important one is to be able to associate a pass-trough device with a guest NUMA node. The OS-es are able to associate a NUMA node only to a primary bus, not to a specific PCI device or a pci-2-pci bridge.
PC machines support multiple NUMA nodes for CPUs and memory, however the IO was not yet supported.
Marcel Apfelbaum (17):
acpi: add implementation of aml_while() term
hw/pci: made pci_bus_is_root a PCIBusClass method
hw/pci: made pci_bus_num a PCIBusClass method
hw/i386: query only for q35/pc when looking for pci host bridge hw/pci: extend PCI config access to support devices behind PXB hw/acpi: add support for i440fx 'snooping' root busses hw/apci: add _PRT method for extra PCI root busses hw/acpi: add _CRS method for extra root busses
hw/acpi: remove from root bus 0 the crs resources used by other buses. hw/pci: removed 'rootbus nr is 0' assumption from qmp_pci_query hw/pci: introduce PCI Expander Bridge (PXB)
hw/pci: inform bios if the system has extra pci root buses hw/pxb: add map_irq func
hw/pci: add support for NUMA nodes
hw/pxb: add numa_node parameter
apci: fix PXB behaviour if used with unsupported BIOS
docs: Add PXB documentation
docs/pci_expander_bridge.txt | 58 ++++++ hw/acpi/aml-build.c | 8 + hw/i386/acpi-build.c | 396 ++++++++++++++++++++++++++++++++++-- hw/i386/pc.c | 20 ++ hw/pci-bridge/Makefile.objs | 1 + hw/pci-bridge/pci_expander_bridge.c | 231 +++++++++++++++++++++ hw/pci/pci.c | 78 +++++-- include/hw/pci/pci.h | 4 + include/hw/pci/pci_bus.h | 10 + include/sysemu/sysemu.h | 1 + 10 files changed, 776 insertions(+), 31 deletions(-) create mode 100644 docs/pci_expander_bridge.txt create mode 100644 hw/pci-bridge/pci_expander_bridge.c
Signature · 1 line
2.1.0