qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC v2 18/20] q35: Hack to make root bus accept legacy PCI


From: Eduardo Habkost
Subject: [Qemu-devel] [RFC v2 18/20] q35: Hack to make root bus accept legacy PCI devices
Date: Fri, 25 Nov 2016 20:05:54 -0200

I don't know where in the code this information should be
encoded, so suggestions are welcome.

Signed-off-by: Eduardo Habkost <address@hidden>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/pci-host/q35.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index d4e3109..29a5e39 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -52,6 +52,16 @@ static void q35_host_realize(DeviceState *dev, Error **errp)
     pci->bus = pci_bus_new(DEVICE(s), "pcie.0",
                            s->mch.pci_address_space, s->mch.address_space_io,
                            0, TYPE_PCIE_BUS);
+
+    {
+    /* The root PCIe bus is different, and also accepts legacy PCI devices */
+    /*FIXME: we need to find a better plance to encode this information */
+    strList *new = g_new0(strList, 1);
+    new->value = g_strdup(INTERFACE_LEGACY_PCI_DEVICE);
+    new->next = BUS(pci->bus)->accepted_device_types;
+    BUS(pci->bus)->accepted_device_types = new;
+    }
+
     PC_MACHINE(qdev_get_machine())->bus = pci->bus;
     qdev_set_parent_bus(DEVICE(&s->mch), BUS(pci->bus));
     qdev_init_nofail(DEVICE(&s->mch));
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]