Il 26/06/2014 17:27, Marc Marí ha scritto:
If these functions are just Virtio PCI specific, it makes sense to take
them out. If they are common to other transports, in my opinion is
better to leave them there. Of course, a good solution has to be found
to just having a global bus variable.
It is also interesting to see that the current
implementation of qpci_device_foreach does only work in one bus, so
probably is not so terrible to have it as global and unique.
qpci_device_foreach works for one bus only because libqos doesn't
support PCI bridges. But it lets you specify the PCI bus of interest,
and it seems a good idea to have this in the virtio-pci implementation.
Paolo