This patch introduces a new device - generic PCI Express to PCI bridge. Now only x86-specific DMI-to-PCI bridge can be used to enable usage of legacy PCI devices on Q35 machine. But this bridge isn't cross-platform and doesn't support hotplugging. That's why we need a new generic cross-platform bridge device, which supports hotplugging.
This patch creates device only for static CLI usage, the next goal is to add ACPI hotplug support. It will utilize in some way past Marcel's RFC series for Q35 ACPI PCI hotplug support https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg05681.html, but will require dynamic ACPI code emission in case when the bridge was hotplugged itself. Aleksandr Bezzubikov (1): hw/pci-bridge: implement pcie-pci-bridge device hw/pci-bridge/Makefile.objs | 2 +- hw/pci-bridge/pcie_pci_bridge.c | 152 ++++++++++++++++++++++++++++++++++++++++ include/hw/pci/pci.h | 1 + 3 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 hw/pci-bridge/pcie_pci_bridge.c -- 2.7.4