On Tue, 2009-03-31 at 14:42 -0400, Gregory Haskins wrote: [...] > +Create a device instance > +------------------------ > + > +Devices are instantiated by again utilizing the /config/vbus configfs area. > +At first you may suspect that devices are created as subordinate objects of a > +bus/container instance, but you would be mistaken. This is kind of patronising; why don't you simply lay out how things _do_ work? > Devices are actually > +root-level objects in vbus specifically to allow greater flexibility in the > +association of a device. For instance, it may be desirable to have a single > +device that spans multiple VMs (consider an ethernet switch, or a shared disk > +for a cluster). Therefore, device lifecycles are managed by creating/deleting > +objects in /config/vbus/devices. > + > +Note: Creating a device instance is actually a two step process: We need to > +give the device instance a unique name, and we also need to give it a specific > +device type. It is hard to express both parameters using standard filesystem > +operations like mkdir, so the design decision was made to require performing > +the operation in two steps. How about exposing a subdir for each device class under /config/vbus/devices/ and allowing device creation only within those? Two-stage construction is a pain for both users and implementors. [...] > +At this point, we are ready to roll. Pid 4382 has access to a virtual-bus > +namespace with one device, id=0. Its type is: > + > +# cat /sys/vbus/instances/beb4df8f-7483-4028-b3f7-767512e2a18c/devices/0/type > +virtual-ethernet > + > +"virtual-ethernet"? Why is it not "venet-tap"? Device-classes are allowed to > +register their interfaces under an id that is not required to be the same as > +their deviceclass. This supports device polymorphism. For instance, > +consider that an interface "virtual-ethernet" may provide basic 802.x packet > +exchange. However, we could have various implementations of a device that > +supports the 802.x interface, while having various implementations behind > +them. [...] It seems to me that your "device-classes" correspond to drivers and "interfaces" correspond to device classes in the LDM. To avoid confusion, I think the vbus terminology should be made consistent with LDM. And certainly these should not both be called simply "type" in the configfs/sysfs interface. Ben. -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html