[Engine-devel] Supporting native USB in oVirt
Oved Ourfalli
ovedo at redhat.com
Tue May 8 08:29:48 UTC 2012
cc-ing engine-devel.
Oved
----- Original Message -----
> From: "Hans de Goede" <hdegoede at redhat.com>
> To: "Oved Ourfalli" <ovedo at redhat.com>
> Cc: "Dave Allan" <dallan at redhat.com>, "Jiri Denemark" <jdenemar at redhat.com>, "Michal Privoznik"
> <mprivozn at redhat.com>, "Itamar Heim" <iheim at redhat.com>, "Igor Lvovsky" <ilvovsky at redhat.com>, "Eli Mesika"
> <emesika at redhat.com>, "Dan Kenigsberg" <danken at redhat.com>, "Andrew Cathrow" <acathrow at redhat.com>
> Sent: Tuesday, May 8, 2012 10:48:32 AM
> Subject: Re: Supporting native USB in oVirt
>
> Hi,
>
> On 05/08/2012 09:19 AM, Oved Ourfalli wrote:
> > Hi,
> >
> > We are now working on adding the support for native USB devices on
> > oVirt.
> > As far as we understand, in order to use it we need to pass the
> > following devices with the following restrictions (according to
> > the EHCI spec):
> > 1. EHCI USB controller - with the highest function number, #7.
> >
> > devices='{type:controller,device:usb,model:ich9-ehci1,address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x7}}'
> >
> > 2. 3 UHCI USB controllers, on the same bus and PCI slot as the EHCI
> > controller. Set the multifunction bit to on, on the controller
> > with function #0.
> >
> > devices='{type:controller,device:usb,model:ich9-uhci1,master:{startport:0},address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x0,multifunction:on}}'
> > devices='{type:controller,device:usb,model:ich9-uhci2,master:{startport:2},address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x1}}'
> > devices='{type:controller,device:usb,model:ich9-uhci3,master:{startport:4},address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x2}}'
> >
> > 3. USB redirect devices (according to the needed number of USB
> > slots, maximum 6) on the same bus, each one having a different
> > port.
> >
> > devices='{type:redir,device:spicevmc,bus:usb,address:{type:usb,bus:0,port:1}}'
> > devices='{type:redir,device:spicevmc,bus:usb,address:{type:usb,bus:0,port:2}}'
> > devices='{type:redir,device:spicevmc,bus:usb,address:{type:usb,bus:0,port:3}}'
> > devices='{type:redir,device:spicevmc,bus:usb,address:{type:usb,bus:0,port:4}}'
> > devices='{type:redir,device:spicevmc,bus:usb,address:{type:usb,bus:0,port:5}}'
> > devices='{type:redir,device:spicevmc,bus:usb,address:{type:usb,bus:0,port:6}}'
> >
>
> To the best of my knowledge, the above is all correct.
>
> > 4. If we want more than 6 USB slots, we need to have 2 EHCI
> > controllers, and 6 UHCI controllers, that are consistent with the
> > restrictions above, on different bus.
> > (we need them to be on different bus, since the connection between
> > the redirect devices and the controllers is the bus).
>
> Correct, note that this may change in the future. Specifically I'm
> thinking about
> adding support for USB-2 hubs, and then have libvirt automatically
> add new
> redir-devices when all but one are in use. This is all just an idea
> at the moment,
> so don't count on it, I just wanted you to know that we are thinking
> about making
> it easier to make the number of devices dynamic in the future. So for
> now you
> could consider simply limiting redirection to max 6 devices.
>
> > According to Hans (cc-ed), if we let libvirt pick its own
> > addresses, it will put each controller of the composite USB
> > controller device on its own pci slot, which is a violation of the
> > EHCI spec.
>
> Correct.
>
> > The problem is that the oVirt engine is not aware of addresses. They aren't managed by it.
> > They are chosen automatically by libvirt, returned to the engine, and they saved in the engine database in order to provide the ability to retain the same PCI addresses after VM restart.
> >
> >So, in order to support the EHCI spec, oVirt will have to be aware of addresses, manage them (allocate them, check for collisions, update on every libvirt change regarding that, etc...). Obviously, it doesn't feel right, and in fact it is also not feasible, to manage these addresses in the oVirt domain.
> >
> > Is all the above correct, or are we missing something?
> > If so, can you address the issues above, and provide the ability to manage these devices in libvirt?
> Regards,
>
> Hans
>
More information about the Engine-devel
mailing list