@@ -52,6 +52,12 @@ int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset,
return pos;
}
+/* Accessor function to get PCI device from pci bridge. */
+PCIDevice *pci_bridge_to_pci(PCIBridge *br)
+{
+ return &br->dev;
+}
+
/* Accessor function to get parent bridge device from pci bus. */
PCIDevice *pci_bridge_get_device(PCIBus *bus)
{
@@ -31,6 +31,7 @@
int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset,
uint16_t svid, uint16_t ssid);
+PCIDevice *pci_bridge_to_pci(PCIBridge *br);
PCIDevice *pci_bridge_get_device(PCIBus *bus);
PCIBus *pci_bridge_get_sec_bus(PCIBridge *br);
pci_bridge_to_pci() which converts PCIBridge into PCIDevice which will be used later by pci_p2pbr. Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- hw/pci_bridge.c | 6 ++++++ hw/pci_bridge.h | 1 + 2 files changed, 7 insertions(+), 0 deletions(-)