[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: IMPORTANT - : Need help on USB port virtualization with Xen hypervisor



Hi Dominique,

You posted this configuration:

device_model_args = [ "
                      "-device","nec-usb-xhci,id=xhci",
                      "-device","usb-host,bus=xhci.0,hostbus=1,hostport=13",
                      "-device","usb-host,bus=xhci.0,hostbus=1,hostport=10",
                      "-device","usb-host,bus=xhci.0,hostbus=1,hostport=2",
                      "-device","usb-host,bus=xhci.0,hostbus=2,hostport=2",
                      "-device","usb-host,bus=xhci.0,hostbus=2,hostport=1",
                      "-device","usb-host,bus=xhci.0,hostbus=1,hostport=1"]

It looks like you are using QEMU-based USB passthrough. Basically QEMU
(independently from Xen) is accessing the USB device in Dom0 and
exposing a corresponding device to the guest. I am not sure if there is
anything that can be done in QEMU to support USB 3.0 with high speed,
people in CC might know.

There two other alternatives to this approach. You can use PV USB
Passthrough instead. Juergen (CCed) is the original author. I am not
sure if that supports USB 3.0 either.

Finally, you can directly assign the entire USB Controller to the guest
using PCI Passthrough: assign the whole USB Controller, with all the USB
devices connect to it, as a PCI device to the guest. For sure, if this
approach is OK for you, it will lead to the best performance.

Cheers,

Stefano



On Thu, 14 Mar 2024, LARRIEU Dominique wrote:
> Hi Julien,
> 
>  
> 
> You will find here above the answers to your questions.
> 
>  
> 
> Thank you very much for your help.
> 
>  
> 
> Best regards,
> 
> Dominique
> 
>  
> 
>  
> 
>  
> 
> -----Message d'origine-----
> De : Julien Grall <julien@xxxxxxx>
> Envoyé : jeudi 29 février 2024 12:52
> À : LARRIEU Dominique <dominique.larrieu@xxxxxxxxxxxxxxx>
> Cc : GOURLOT Francois <francois.gourlot@xxxxxxxxxxxxxxx>; GRUO Nicolas 
> <nicolas-n.gruo@xxxxxxxxxxxxxxx>; Cc
> <xen-devel@xxxxxxxxxxxxxxxxxxxx>; Kelly Choi <kelly.choi@xxxxxxxxx>; Jan 
> Beulich <jbeulich@xxxxxxxx>; Roger Pau Monné
> <roger.pau@xxxxxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>; George 
> Dunlap <george.dunlap@xxxxxxxxxx>; Juergen Gross
> <jgross@xxxxxxxx>; WILLEMS Louis <louis.willems@xxxxxxxxxxxxxxx>
> Objet : Re: IMPORTANT - : Need help on USB port virtualization with Xen 
> hypervisor
> 
>  
> 
> Hi Dominique,
> 
>  
> 
> On 29/02/2024 10:33, LARRIEU Dominique wrote:
> 
> > Thank you for your quick answer.
> 
> >
> 
> > You will find below our answers (in red) to your questions.
> 
> >
> 
> > To summarize our request : what we would like is to use USB 3.0 driver with 
> > high speed configuration.
> 
> > Today, it is not possible to do that.
> 
> > The driver stay in full speed mode, and more often in USB 1.0 or 2.0 
> > configuration.
> 
> >
> 
> > Is it possible to configure the XEN USB 3.0 driver with the high speed mode 
> > ?
> 
> > (read in our answers below the reference to the driver)
> 
>  
> 
> Looking at what you provided below, it is still unclear what you mean by "Xen 
> USB 3.0 driver". By any chance, are you confused with the "x"
> in xhci?
> 
>  
> 
> The drivers "xhci_hcd" and "xhci_pci" are generic and not provided/maintained 
> by Xen. So far, with the information provided, it is unclear
> whether the problem is actually in the driver itself. I have a few more 
> questions. See below.
> 
>  
> 
> >>      We are detecting several issues with USB port virtualization
> 
> >> with the
> 
> >
> 
> >>      Xen hypervisor.
> 
> >
> 
> >
> 
> >
> 
> > Just to clarify, you are assigning the PCI USB bus (rather than just the 
> > USB device) to the guest. Is that correct?
> 
> >
> 
> >
> 
> >
> 
> > If so...
> 
> >
> 
> >
> 
> >
> 
> > [Thales] : we are using the USB chipset of the mother board (see below
> 
> > the references)
> 
>  
> 
> Thanks for the clarification. IIUC, you said you are having problem in the 
> guest itself. Have you tried to access the same USB device from
> dom0? Or better without any Xen involved (i.e. booting Debian on baremetal).
> 
>  
> 
> This would help to narrow down the issue.
> 
>  
> 
> [Thales, 14/03/24] We have no difficulty accessing the USB device on the dom0
> 
>  
> 
> >> 
> 
> >
> 
> >>      We needyour helpto find a solution for these problems.
> 
> >
> 
> >> 
> 
> >
> 
> >>      The Software used are :
> 
> >
> 
> >
> 
> >
> 
> > Can you share some details of the HW you are using ?
> 
> >
> 
> >
> 
> >
> 
> > [Thales] : HW :
> 
> >
> 
> > [Thales] : We are using a GETAC X500 using the Mobile Intel QM175
> 
> > Chipset
> 
> >
> 
> > [Thales] : USB controller: Intel Corporation 100 Series/C230 Series
> 
> > Chipset Family USB 3.0 xHCI Controller (rev 31)
> 
> >
> 
> > [Thales] : Subsystem: Mitac 100 Series/C230 Series Chipset Family USB
> 
> > 3.0 xHCI Controller
> 
> >
> 
> >
> 
> >
> 
> > [Thales] : SW :
> 
> >
> 
> > [Thales] : Kernel driver in use: xhci_hcd
> 
> >
> 
> > [Thales] : Kernel modules : xhci_pci
> 
> >
> 
> >
> 
> >
> 
> >> 
> 
> >
> 
> >>      -Debian 11 version5.10.0-20
> 
>  
> 
> IIUC, before you said you had problem with Windows. So is this the software 
> in dom0? Or did you actually try with Debian and still see the
> same issue?
> 
> [Thales, 14/03/24] We are not sure to understand the question. The 
> information we provided to you was the modules on the dom0. The driver
> which is back on the dom guest Windows: controleur hote ReunesasUSB 3.0 
> extensible
> 
>  
> 
> Regarding the configuration, given you are using the official Debian package. 
> Are you using 'xl' to create your guest?
> 
> [Thales, 14/03/24] yes we do
> 
>  
> 
> The ideal would be if you can paste the full configuration. If you can't can 
> you tell us if you are using any of these options: 'pci',
> 'usbdev', 'usbctrl'?
> 
> [Thales, 14/03/24]
> 
> device_model_args = [ "
> 
>                       "-device","nec-usb-xhci,id=xhci",
> 
>                       "-device","usb-host,bus=xhci.0,hostbus=1,hostport=13",
> 
>                       "-device","usb-host,bus=xhci.0,hostbus=1,hostport=10",
> 
>                       "-device","usb-host,bus=xhci.0,hostbus=1,hostport=2",
> 
>                       "-device","usb-host,bus=xhci.0,hostbus=2,hostport=2",
> 
>                       "-device","usb-host,bus=xhci.0,hostbus=2,hostport=1",
> 
>                       "-device","usb-host,bus=xhci.0,hostbus=1,hostport=1"]
> 
> [end Thales, 14/03/24]
> 
>  
> 
> [...]
> 
>  
> 
> >>      -Xen version4.14
> 
> >
> 
> >
> 
> >
> 
> > Are minor version of Xen 4.14 are you using ? Any patches on top ?
> 
> >
> 
> >
> 
> >
> 
> > Xen 4.14 has also been out of support for a few months now. If that’s
> 
> > possible, I would recommend to try a new Xen version (the last stable
> 
> > is
> 
> >
> 
> > 4.18) just in case your issue as been fixed in newer release.
> 
> >
> 
> >
> 
> >
> 
> > [Thales] : we have to use Xen release that are downloaded from the
> 
> > Debian official repository  (requested by our customer)
> 
> >
> 
> > [Thales] : the last one is version 4.14, but we would like to know if there 
> > is one more recent that is compatible with Linux Debian 11 ?
> 
>  
> 
> Newer Xen releases should be compatible with Debian 11. But I am not aware of 
> any "official" package for that specific version.
> 
>  
> 
> Cheers,
> 
>  
> 
> --
> 
> Julien Grall
> 
> 
> 

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.