On Mon, Oct 25, 2021 at 09:16:53AM -0400, Michael S. Tsirkin wrote:
> > +void pci_for_each_root_bus(pci_bus_fn fn, void *opaque)
> > +{
> > + pci_root_bus_args args = { .fn = fn, .opaque = opaque };
> > +
> > + object_child_foreach_recursive(object_get_root(), pci_find_root_bus,
> > &args);
> > +}
> >
> > PCIDevice *pci_find_device(PCIBus *bus, int bus_num, uint8_t devfn)
> > {
>
>
> How about adding an API with a type filter to the qom core?
> E.g.
> object_child_foreach_type_recursive getting a type.
Sounds good, will do. Thanks,
--
Peter Xu