Re: [PATCH 5/8] pci: Add pci_for_each_root_bus()

2021-10-27 Thread Peter Xu
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);

Re: [PATCH 5/8] pci: Add pci_for_each_root_bus()

2021-10-25 Thread Michael S. Tsirkin
On Thu, Oct 21, 2021 at 06:42:56PM +0800, Peter Xu wrote: > Add a helper to loop over each root bus of the system, either the default root > bus or extended buses like pxb-pcie. > > Signed-off-by: Peter Xu > --- > hw/pci/pci.c | 26 ++ > include/hw/pci/pci.h | 2

Re: [PATCH 5/8] pci: Add pci_for_each_root_bus()

2021-10-21 Thread Eric Auger
Hi Peter, On 10/21/21 12:42 PM, Peter Xu wrote: > Add a helper to loop over each root bus of the system, either the default root > bus or extended buses like pxb-pcie. > > Signed-off-by: Peter Xu > --- > hw/pci/pci.c | 26 ++ > include/hw/pci/pci.h | 2 ++ > 2 fi

Re: [PATCH 5/8] pci: Add pci_for_each_root_bus()

2021-10-21 Thread David Hildenbrand
On 21.10.21 12:42, Peter Xu wrote: > Add a helper to loop over each root bus of the system, either the default root > bus or extended buses like pxb-pcie. > > Signed-off-by: Peter Xu > --- > hw/pci/pci.c | 26 ++ > include/hw/pci/pci.h | 2 ++ > 2 files changed,

[PATCH 5/8] pci: Add pci_for_each_root_bus()

2021-10-21 Thread Peter Xu
Add a helper to loop over each root bus of the system, either the default root bus or extended buses like pxb-pcie. Signed-off-by: Peter Xu --- hw/pci/pci.c | 26 ++ include/hw/pci/pci.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/hw/pci/pci.c b/hw/pc