
On Mon, May 05, 2014 at 05:00:34PM +0300, Laine Stump wrote:
On 05/05/2014 03:07 PM, Ján Tomko wrote:
On 05/03/2014 06:31 PM, Roman Bogorodskiy wrote:
Extract PCI handling related structs that could be shared with other drivers.
List of structs moved to virpci.h and new names:
qemuDomainPCIAddressBus -> virDomainPCIAddressBus qemuDomainPCIAddressBusPtr -> virDomainPCIAddressBusPtr _qemuDomainPCIAddressSet -> virDomainPCIAddressSet qemuDomainPCIAddressSetPtr -> virDomainPCIAddressSetPtr qemuDomainPCIConnectFlags -> virDomainPCIConnectFlags I would drop the 'Domain', to make the prefix match the file.
I was thinking about that and came to a different opinion. The functions that are currently in virpci.c are dealing with manipulating and reporting about PCI devices on the *host* (reading and writing sysfs files to attach and detach drivers, determining the list of virtual functions for an SRIOV physical function, etc), while these functions that Roman is moving are only concerned with managing the allocation of PCI addresses to devices in a domain.
Because of that, I think it's reasonable (a good idea really) to keep "Domain" in the function names.
Beyond that, I was going to say that I think these functions belong in their own file, *not* virpci.c (and maybe we even want to rename virpci.c to virhostpci.c or something). I think it's *essential* that the two sets of functions are separated from each other, since what is in virpci.c is Linux-specific, but the virDomainPCI... functions should be host-agnostic.
Agreed, I think this should go into a src/conf/domain_addr.{c,h} file since it has a dep on other things in src/conf, which is not allowed for files in src/util. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|