hw/prep: realize the PCI root bus as part of the prep init
authorMarcel Apfelbaum <marcel@redhat.com>
Thu, 14 Jul 2016 13:43:45 +0000 (16:43 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 20 Jul 2016 16:30:26 +0000 (19:30 +0300)
'Realize' the PCI root bus manually since the 'realize' mechanism
does not propagate to child devices yet.

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
hw/pci-host/prep.c

index 487e32e..5580293 100644 (file)
@@ -247,6 +247,7 @@ static void raven_pcihost_realizefn(DeviceState *d, Error **errp)
     memory_region_add_subregion(address_space_mem, 0xbffffff0, &s->pci_intack);
 
     /* TODO Remove once realize propagates to child devices. */
+    object_property_set_bool(OBJECT(&s->pci_bus), true, "realized", errp);
     object_property_set_bool(OBJECT(&s->pci_dev), true, "realized", errp);
 }