qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 7/8] pci: Add pci_for_each_device_all()


From: Peter Xu
Subject: Re: [PATCH 7/8] pci: Add pci_for_each_device_all()
Date: Fri, 22 Oct 2021 10:33:15 +0800

Hi, Michael,

On Thu, Oct 21, 2021 at 06:54:59AM -0400, Michael S. Tsirkin wrote:
> > +typedef struct {
> > +    pci_bus_dev_fn fn;
> > +    void *opaque;
> > +} pci_bus_dev_args;
> 
> code style violation. CamelCase for structs pls.

OK.

> > +/* Call 'fn' for each pci device on the system */
> > +void pci_for_each_device_all(pci_bus_dev_fn fn, void *opaque);
> 
> Instead of hacking pci making initialization o(N^2),

Why it's O(N^2)?  One vIOMMU walks O(N), and we only have one vIOMMU, or am I
wrong?

> can't we add a variant of object_resolve_path_type ?

Could you elaborate?  Here what we want to do is to make sure there're no
specific PCI devices registered, and potentially it can be more than one type
of device in the future.

Thanks,

-- 
Peter Xu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]