[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/8] pci: Add pci_for_each_root_bus()
From: |
Peter Xu |
Subject: |
Re: [PATCH 5/8] pci: Add pci_for_each_root_bus() |
Date: |
Thu, 28 Oct 2021 10:56:38 +0800 |
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
[PATCH 8/8] x86-iommu: Fail early if vIOMMU specified after vfio-pci, Peter Xu, 2021/10/21