Skip to contentSkip to conversation

Generic PCIE-to-PCI Bridge

RFC PATCH New Aleksandr Bezzubikov 1 participant 2 messages Jun 25, 2017

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 Generic PCIE-to-PCI Bridge

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
Signature · 1 line
2.7.4
#1 lore raw

RFC PATCH 1/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
hw/pci-bridge/Makefile.objs +1 -1
index c4683cf..666db37 100644
@@ -1,4 +1,4 @@
-common-obj-y += pci_bridge_dev.o
+common-obj-y += pci_bridge_dev.o pcie_pci_bridge.o
 common-obj-$(CONFIG_PCIE_PORT) += pcie_root_port.o gen_pcie_root_port.o
 common-obj-$(CONFIG_PXB) += pci_expander_bridge.o
 common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o
hw/pci-bridge/pcie_pci_bridge.c new file +152 -0

152 lines not on this page · raw message

include/hw/pci/pci.h +1 -0
index a37a2d5..47bf8da 100644
@@ -98,6 +98,7 @@
 #define PCI_DEVICE_ID_REDHAT_PXB_PCIE    0x000b
 #define PCI_DEVICE_ID_REDHAT_PCIE_RP     0x000c
 #define PCI_DEVICE_ID_REDHAT_XHCI        0x000d
+#define PCI_DEVICE_ID_REDHAT_PCIE_BRIDGE 0x000e
 #define PCI_DEVICE_ID_REDHAT_QXL         0x0100
 
 #define FMT_PCIBUS                      PRIx64
Signature · 1 line
2.7.4