[libvirt] Re: [PATCH 2/6] host ("node") device enumeration - internal API additions

Daniel Veillard veillard at redhat.com
Tue Oct 28 15:41:00 UTC 2008


On Tue, Oct 28, 2008 at 11:32:03AM -0400, David Lively wrote:
> On Tue, 2008-10-28 at 14:13 +0100, Daniel Veillard wrote:
> > On Tue, Oct 21, 2008 at 01:54:13PM -0400, David Lively wrote:
> > > This patch contains the internal API additions.
> > 
> >   Looks fine to me, just a couple of questions:
> > 
> > > +        // TODO: Implement PCI bus devs
> > > +        // TODO: Implement USB bus devs
> > 
> >   Any reason it's not in ? I would expect HAL to report them, no ?
> 
> I posted a new patch set yesterday that (among other things) removed the
> PCI_BUS and USB_BUS devices.  Currently HAL doesn't report them as
> anything special, e.g.:
> 
> udi = '/org/freedesktop/Hal/devices/pci_8086_27cc'
>   info.linux.driver = 'ehci_hcd'  (string)
>   info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
>   info.product = '82801G (ICH7 Family) USB2 EHCI Controller'  (string)
>   info.subsystem = 'pci'  (string)
>   info.udi = '/org/freedesktop/Hal/devices/pci_8086_27cc'  (string)
>   info.vendor = 'Intel Corporation'  (string)
>   linux.hotplug_type = 2  (0x2)  (int)
>   linux.subsystem = 'pci'  (string)
>   linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7'  (string)
>   pci.device_class = 12  (0xc)  (int)
>   pci.device_protocol = 32  (0x20)  (int)
>   pci.device_subclass = 3  (0x3)  (int)
>   pci.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7'
> (string)
>   pci.product = '82801G (ICH7 Family) USB2 EHCI Controller'  (string)
>   pci.product_id = 10188  (0x27cc)  (int)
>   pci.subsys_product_id = 22594  (0x5842)  (int)
>   pci.subsys_vendor = 'Intel Corporation'  (string)
>   pci.subsys_vendor_id = 32902  (0x8086)  (int)
>   pci.vendor = 'Intel Corporation'  (string)
>   pci.vendor_id = 32902  (0x8086)  (int)
> 
> udi = '/org/freedesktop/Hal/devices/pci_8086_244e'
>   info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
>   info.product = '82801 PCI Bridge'  (string)
>   info.subsystem = 'pci'  (string)
>   info.udi = '/org/freedesktop/Hal/devices/pci_8086_244e'  (string)
>   info.vendor = 'Intel Corporation'  (string)
>   linux.hotplug_type = 2  (0x2)  (int)
>   linux.subsystem = 'pci'  (string)
>   linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0'  (string)
>   pci.device_class = 6  (0x6)  (int)
>   pci.device_protocol = 1  (0x1)  (int)
>   pci.device_subclass = 4  (0x4)  (int)
>   pci.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0'
> (string)
>   pci.product = '82801 PCI Bridge'  (string)
>   pci.product_id = 9294  (0x244e)  (int)
>   pci.subsys_product_id = 0  (0x0)  (int)
>   pci.subsys_vendor_id = 0  (0x0)  (int)
>   pci.vendor = 'Intel Corporation'  (string)
>   pci.vendor_id = 32902  (0x8086)  (int)
> 
> So at this point, I just report them as PCI devices, though of course
> the PCI bridge will be the parent of PCI devices on that bus, and the
> USB controller will be the parent of USB devices controlled by it.  Any
> client code that needs to recognize them specifically as PCI or USB bus
> controllers can use the PCI device attributes for that.
> 
> Hmmm ... currently I expose the product & vendor info for PCI devices,
> along with their bus addressing info.  But perhaps I should also expose
> their device_class, protocol, and subclass??
> 
> > > +
> > > +// TODO: virNodeDeviceDefParseString/File/Node for virNodeDeviceCreate
> 
> Currently I have no need to parse a NodeDevice definition.  But
> virNodeDeviceCreate will need to do that, once it's implemented.  (I
> don't have any NPIV NICs or other such toys to play with right now.
> Daniel B says he'll implement Create/Destroy since he does.)  I also
> thought it would be better to postpone the parser work until needed
> since the node definition seems likely to change as we work out the
> details here.

  Okay, thanks for the clarification, and sorry for the delay,
as you can guess I didn't yet reached the end of the folder <grin/> !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list