> PCIBus *ppce500_pci_init(qemu_irq pci_irqs[4], target_phys_addr_t > registers) { > - PPCE500PCIState *controller; > + DeviceState *dev; > + PCIBus *b; > + PCIHostState *h; > + PPCE500PCIState *s; > PCIDevice *d; > - int index; > static int ppce500_pci_id; > + SysBusDevice *sb; > + > + dev = qdev_create(NULL, "e500-pcihost"); > + sb = sysbus_from_qdev(dev); > + h = FROM_SYSBUS(PCIHostState, sb); > + s = DO_UPCAST(PPCE500PCIState, pci_state, h); > + > + b = pci_register_bus(&s->pci_state.busdev.qdev, NULL,
No. This function should not exist. All this should be done in e500_pcihost_initfn. Please do the qdev conversion properly. See versatilepb.c/versatile_pci.c for an example of how this is supposed to be done. > + .qdev.no_user = 1, There's no good reason for this. It indicates you did the qdev conversion incorrectly. Paul