Skip to contentSkip to conversation

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

DISCUSSION GOURLOT Francois 6 participants 9 messages Feb 24, 2024 – Mar 16, 2024 5 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Dear All,

We send you a message few days ago.

We have major performance with XEN USB Drivers. We use your driver to load data in a device and we need USB3 High Speed USB protocole

Do you have a new issue of the HCI and NEC USB Xen Driver ?

We hope you will contact us quickly.

Best regards

Program Manager

Thales SIX GTS France

T: +33(0) 1 41 30 26 67
M: +33 (0) 6 85 23 12 30

4 Avenue des Louvresses
92622 Gennevilliers
France

De : LARRIEU Dominique <[email protected]>
Envoyé : jeudi 22 février 2024 13:58
À : [email protected]
Cc : WILLEMS Louis <[email protected]>; GRUO Nicolas <[email protected]>; GOURLOT Francois <[email protected]>; Kelly Choi <[email protected]> Objet : Need help on USB port virtualization with Xen hypervisor
Critère de diffusion : Confidentiel

Dear all,

We are detecting several issues with USB port virtualization with the Xen hypervisor.
- We cannot do PCI passthrough of the PCI usb bus on a Windows 10 1607 64-bit virtual machine. The bad result is a Windows blue screen.
- When we use the passthrough functionality on a Windows 21H2 virtual machine, we notice that the speed of the USB port is not high speed but full speed on a USB 3.0 port
- We notice instabilities when using the nec-usb-xhci driver, USB 2.0 keys are not recognized by the Windows virtual machine (incorrect descriptor)

We need your help to find a solution for these problems.

The Software used are :

- Debian 11 version 5.10.0-20

- Xen version 4.14

- Windows 10 1607 and 21H2 for virtual machines. Virtual Machine HVM

Thanks in advance for your help.

Best regards,

Dominique LARRIEU

Cyber Project Manager

Thales

4, avenue des Louvresses
92230 Gennevilliers, France

[cid:[email protected]]

Retrouvez Thales sur les réseaux sociaux et sur www.thalesgroup.com<https://www.thalesgroup.com/>

#1 lore raw

Hi Dominique and Francois,

Thank you for the report. I am CCing some person who I think could help.

I also have some questions (see below).

Quoted 7 lines · GOURLOT Francois

Dear All,

We send you a message few days ago.

We have major performance with XEN USB Drivers. We use your driver to load data in a device and we need USB3 High Speed USB protocole

Do you have a new issue of the HCI and NEC USB Xen Driver ?

[...]

Quoted 11 lines

*De :*LARRIEU Dominique <[email protected]>
*Envoyé :* jeudi 22 février 2024 13:58
*À :* [email protected]
*Cc :* WILLEMS Louis <[email protected]>; GRUO Nicolas <[email protected]>; GOURLOT Francois <[email protected]>; Kelly Choi <[email protected]> *Objet :* Need help on USB port virtualization with Xen hypervisor
*Critère de diffusion :* Confidentiel

Dear all,

We are detectingseveral 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...

Quoted 2 lines

Do you have a new issue of the HCI and NEC USB Xen Driver ?

... I am not sure what Xen driver you are talking about. If the USB bus is assigned to the guest, then I would expect no specific Xen driver are required. Do you have any pointer to the existing one?

Quoted 10 lines

- We cannot do PCI passthrough of the PCI usb bus on a Windows 10 1607 64-bit virtual machine. The bad result is a Windows blue screen.

- When we use the passthrough functionality on a Windows 21H2 virtual machine, we notice thatthe speed of the USB port is not high speed but full speed on a USB 3.0 port

- We notice instabilities when using the nec-usb-xhci driver,  USB 2.0 keys are not recognized by the Windows virtual machine (incorrect descriptor)

Do you have any logs you could share from the guest OS? Also, would you be able to share more details on how you configure the guest? (e.g. xl configuration, libvirt...)?

Quoted 4 lines

We needyour helpto find a solution for these problems.

The Software used are :

Can you share some details of the HW you are using?

Quoted 4 lines
    -Debian 11 version5.10.0-20

    -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.

Quoted 2 lines

-Windows 10 1607 and 21H2 for virtual machines. Virtual Machine HVM

Cheers,

Signature · 1 line
Julien Grall
#2 lore raw

In short, purchase an addon PCIe USB card to isolate traffic. USB is a
shared medium and is rooted in the cheapest electronics. It was never
considered enterprise grade hardware for most all of history. The letter
B in USB stands for BUS which actually means a shared roadway that other
USB devices can and do impede traffic. We experienced interfering traffic
on inexpensive laptops running XEN based Qubes-OS. Turned out the WiFi
card was actually wired onto the USB bus. Unplugging all external USB
electronics reduced inexplicable WiFi disconnects and reliably improved
throughput. However, there was no way to remove the keyboard, touchpad,
and touchscreen which all used the USB roadway.

Those were cheap laptops, but even enterprise class hardware such as HPE
and Dell Servers running XCP-NG did not have great speeds. But in this
scenario, we could simplify the problem and isolate the issue by purchasing a new add-on PCIe card with USB ports and then assign the entire PCIe card
to the VM. The VM would then have entire control of the PCIe card and
isolate traffic to devices plugged into that card.

I did not know until later that Wireshark has plugins for sniffing USB traffic, but my name is not Heisenberg and not sure if that traffic monitoring does not also slow down other devices.

Quoted 86 lines · Julien Grall

Hi Dominique and Francois,

Thank you for the report. I am CCing some person who I think could help.

I also have some questions (see below).

Quoted 8 lines · GOURLOT Francois

Dear All,

We send you a message few days ago.

We have major performance with XEN USB Drivers. We use your driver to load data in a device and we need USB3 High Speed USB protocole

Do you have a new issue of the HCI and NEC USB Xen Driver ?

p
[...]

Quoted 9 lines

*De :*LARRIEU Dominique <[email protected]> *Envoyé :* jeudi 22 février 2024 13:58
*À :* [email protected]
*Cc :* WILLEMS Louis <[email protected]>; GRUO Nicolas <[email protected]>; GOURLOT Francois <[email protected]>; Kelly Choi <[email protected]> *Objet :* Need help on USB port virtualization with Xen hypervisor *Critère de diffusion :* Confidentiel

Quoted 4 lines

Dear all,

We are detectingseveral 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...

Quoted 2 lines

Do you have a new issue of the HCI and NEC USB Xen Driver ?

... I am not sure what Xen driver you are talking about. If the USB bus is assigned to the guest, then I would expect no specific Xen driver are required. Do you have any pointer to the existing one?

Quoted 10 lines

- We cannot do PCI passthrough of the PCI usb bus on a Windows 10 1607 64-bit virtual machine. The bad result is a Windows blue screen.

- When we use the passthrough functionality on a Windows 21H2 virtual machine, we notice thatthe speed of the USB port is not high speed but full speed on a USB 3.0 port

- We notice instabilities when using the nec-usb-xhci driver, USB 2.0 keys are not recognized by the Windows virtual machine (incorrect descriptor)

Do you have any logs you could share from the guest OS? Also, would you be able to share more details on how you configure the guest? (e.g. xl configuration, libvirt...)?

Quoted 4 lines

We needyour helpto find a solution for these problems.

The Software used are :

Can you share some details of the HW you are using?

Quoted 4 lines
    -Debian 11 version5.10.0-20

    -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.

Quoted 2 lines

-Windows 10 1607 and 21H2 for virtual machines. Virtual Machine HVM

Cheers,

--
Julien Grall

#3 lore raw

Dear Rob and Julien,

Thank you for your messages.

Dominique and the Thales crew will give you more information quickly.

Best regards

Responsable Programme

Département RAFALE F4
Thales SIX GTS France

T: +33(0) 1 41 30 26 67
M: +33 (0) 6 85 23 12 30

4 Avenue des Louvresses
92622 Gennevilliers
France

De : Rob Townley <[email protected]> De
Envoyé : dimanche 25 février 2024 13:20
À : Julien Grall <[email protected]>
Cc : Andrew Cooper <[email protected]>; GOURLOT Francois <[email protected]>; George Dunlap <[email protected]>; Jan Beulich <[email protected]>; Juergen Gross <[email protected]>; Kelly Choi <[email protected]>; Roger Pau Monné <[email protected]>; [email protected] Objet : Re: IMPORTANT - : Need help on USB port virtualization with Xen hypervisor

In short, purchase an addon PCIe USB card to isolate traffic. USB is a shared medium and is rooted in the cheapest electronics. It was never considered enterprise grade hardware for most all of history. The letter B in USB stands for BUS which actually means a shared roadway that other USB devices can and do impede traffic. We experienced interfering traffic on inexpensive laptops running XEN based Qubes-OS. Turned out the WiFi card was actually wired onto the USB bus. Unplugging all external USB electronics reduced inexplicable WiFi disconnects and reliably improved throughput. However, there was no way to remove the keyboard, touchpad, and touchscreen which all used the USB roadway.

Those were cheap laptops, but even enterprise class hardware such as HPE and Dell Servers running XCP-NG did not have great speeds. But in this scenario, we could simplify the problem and isolate the issue by purchasing a new add-on PCIe card with USB ports and then assign the entire PCIe card to the VM. The VM would then have entire control of the PCIe card and isolate traffic to devices plugged into that card.

I did not know until later that Wireshark has plugins for sniffing USB traffic, but my name is not Heisenberg and not sure if that traffic monitoring does not also slow down other devices.

On Sat, Feb 24, 2024 at 8:39 AM Julien Grall <[email protected]<mailto:[email protected]>> wrote:
Hi Dominique and Francois,

Thank you for the report. I am CCing some person who I think could help.

I also have some questions (see below).

Quoted 8 lines · GOURLOT Francois

Dear All,

We send you a message few days ago.

We have major performance with XEN USB Drivers. We use your driver to load data in a device and we need USB3 High Speed USB protocole

Do you have a new issue of the HCI and NEC USB Xen Driver ?

p
[...]

Quoted 9 lines

*De :*LARRIEU Dominique <[email protected]<mailto:[email protected]>>
*Envoyé :* jeudi 22 février 2024 13:58
*À :* [email protected]<mailto:[email protected]>
*Cc :* WILLEMS Louis <[email protected]<mailto:[email protected]>>; GRUO Nicolas <[email protected]<mailto:[email protected]>>; GOURLOT Francois <[email protected]<mailto:[email protected]>>; Kelly Choi <[email protected]<mailto:[email protected]>> *Objet :* Need help on USB port virtualization with Xen hypervisor
*Critère de diffusion :* Confidentiel

Quoted 4 lines

Dear all,

We are detectingseveral 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...

Quoted 2 lines

Do you have a new issue of the HCI and NEC USB Xen Driver ?

... I am not sure what Xen driver you are talking about. If the USB bus is assigned to the guest, then I would expect no specific Xen driver are required. Do you have any pointer to the existing one?

Quoted 10 lines

- We cannot do PCI passthrough of the PCI usb bus on a Windows 10 1607 64-bit virtual machine. The bad result is a Windows blue screen.

- When we use the passthrough functionality on a Windows 21H2 virtual machine, we notice thatthe speed of the USB port is not high speed but full speed on a USB 3.0 port

- We notice instabilities when using the nec-usb-xhci driver, USB 2.0 keys are not recognized by the Windows virtual machine (incorrect descriptor)

Do you have any logs you could share from the guest OS? Also, would you be able to share more details on how you configure the guest? (e.g. xl configuration, libvirt...)?

Quoted 4 lines

We needyour helpto find a solution for these problems.

The Software used are :

Can you share some details of the HW you are using?

Quoted 4 lines
    -Debian 11 version5.10.0-20

    -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.

Quoted 2 lines

-Windows 10 1607 and 21H2 for virtual machines. Virtual Machine HVM

Cheers,

--
Julien Grall

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

Hi Julien,

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)

Best regards,
Dominique

-----Message d'origine-----

De : Julien Grall <[email protected]<mailto:[email protected]>>

Envoyé : samedi 24 février 2024 14:37

À : GOURLOT Francois <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> Cc : Kelly Choi <[email protected]<mailto:[email protected]>>; Jan Beulich <[email protected]<mailto:[email protected]>>; Roger Pau Monné <[email protected]<mailto:[email protected]>>; Andrew Cooper <[email protected]<mailto:[email protected]>>; George Dunlap <[email protected]<mailto:[email protected]>>; Jan Beulich <[email protected]<mailto:[email protected]>>; Juergen Gross <[email protected]<mailto:[email protected]>> Objet : Re: IMPORTANT - : Need help on USB port virtualization with Xen hypervisor

Hi Dominique and Francois,

Thank you for the report. I am CCing some person who I think could help.

I also have some questions (see below).

Quoted 15 lines · GOURLOT Francois

Dear All,

We send you a message few days ago.

We have major performance with XEN USB Drivers. We use your driver to

load data in a device and we need USB3 High Speed USB protocole

Do you have a new issue of the HCI and NEC USB Xen Driver ?

[...]

Quoted 18 lines

*De :*LARRIEU Dominique <[email protected]<mailto:[email protected]>>

*Envoyé :* jeudi 22 février 2024 13:58 *À :*

[email protected]<mailto:[email protected]> *Cc :* WILLEMS Louis

<[email protected]<mailto:[email protected]>>; GRUO Nicolas

<[email protected]<mailto:[email protected]>>; GOURLOT Francois

<[email protected]<mailto:[email protected]>>; Kelly Choi <[email protected]<mailto:[email protected]>>

*Objet :* Need help on USB port virtualization with Xen hypervisor

*Critère de diffusion :* Confidentiel

Quoted 7 lines

Dear all,

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)

Quoted 3 lines

Do you have a new issue of the HCI and NEC USB Xen Driver ?

... I am not sure what Xen driver you are talking about. If the USB bus is assigned to the guest, then I would expect no specific Xen driver are required. Do you have any pointer to the existing one?

[Thales] : see references to HW and SW below

Quoted 14 lines

- We cannot do PCI passthrough of the PCI usb bus on a Windows 10

1607 64-bit virtual machine. The bad result is a Windows blue screen.

- When we use the passthrough functionality on a Windows 21H2

virtual machine, we notice thatthe speed of the USB port is not high

speed but full speed on a USB 3.0 port

Quoted 5 lines

- We notice instabilities when using the nec-usb-xhci driver, USB

2.0 keys are not recognized by the Windows virtual machine

(incorrect descriptor)

Do you have any logs you could share from the guest OS? Also, would you be able to share more details on how you configure the guest? (e.g. xl configuration, libvirt...)?

Quoted 7 lines

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

Quoted 7 lines

    -Debian 11 version5.10.0-20



    -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 ?

Quoted 5 lines

-Windows 10 1607 and 21H2 for virtual machines. Virtual Machine

HVM

Cheers,

--

Julien Grall

#8 lore raw

Hi Dominique,

Quoted 10 lines · LARRIEU Dominique

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.

Quoted 10 lines
Quoted 3 lines

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?

Quoted 5 lines

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.

Quoted 24 lines
Quoted 7 lines

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

Quoted 11 lines

[Thales] : SW :

[Thales] : Kernel driver in use: xhci_hcd

[Thales] : Kernel modules : xhci_pci

Quoted 3 lines

     -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?

Regarding the configuration, given you are using the official Debian package. Are you using 'xl' to create your guest?

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'?

[...]

Quoted 10 lines
Quoted 1 line
     -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

Quoted 7 lines

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,

Signature · 1 line
Julien Grall

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

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 <[email protected]<mailto:[email protected]>>
Envoyé : jeudi 29 février 2024 12:52
À : LARRIEU Dominique <[email protected]<mailto:[email protected]>>
Cc : GOURLOT Francois <[email protected]<mailto:[email protected]>>; GRUO Nicolas <[email protected]<mailto:[email protected]>>; Cc <[email protected]<mailto:[email protected]>>; Kelly Choi <[email protected]<mailto:[email protected]>>; Jan Beulich <[email protected]<mailto:[email protected]>>; Roger Pau Monné <[email protected]<mailto:[email protected]>>; Andrew Cooper <[email protected]<mailto:[email protected]>>; George Dunlap <[email protected]<mailto:[email protected]>>; Juergen Gross <[email protected]<mailto:[email protected]>>; WILLEMS Louis <[email protected]<mailto:[email protected]>> Objet : Re: IMPORTANT - : Need help on USB port virtualization with Xen hypervisor

Hi Dominique,

Quoted 12 lines · LARRIEU Dominique

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.

Quoted 7 lines

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.

Quoted 30 lines
Quoted 7 lines

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...

Quoted 3 lines

[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

Quoted 58 lines
Quoted 12 lines

We needyour helpto find a solution for these problems.

Quoted 1 line

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 :

Quoted 17 lines

[Thales] : Kernel driver in use: xhci_hcd

[Thales] : Kernel modules : xhci_pci

Quoted 5 lines



     -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]

[...]

Quoted 32 lines
Quoted 1 line
     -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.

Quoted 7 lines

[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

#12 lore raw

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

Quoted 298 lines · LARRIEU Dominique

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 <[email protected]>
Envoyé : jeudi 29 février 2024 12:52
À : LARRIEU Dominique <[email protected]>
Cc : GOURLOT Francois <[email protected]>; GRUO Nicolas <[email protected]>; Cc <[email protected]>; Kelly Choi <[email protected]>; Jan Beulich <[email protected]>; Roger Pau Monné <[email protected]>; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Juergen Gross <[email protected]>; WILLEMS Louis <[email protected]>
Objet : Re: IMPORTANT - : Need help on USB port virtualization with Xen hypervisor

Hi Dominique,

Quoted 12 lines · LARRIEU Dominique

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.

Quoted 7 lines

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.

Quoted 30 lines
Quoted 7 lines

      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...

Quoted 3 lines

[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

Quoted 58 lines
Quoted 8 lines

      We needyour helpto find a solution for these problems.

Quoted 5 lines

      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 :

Quoted 17 lines

[Thales] : Kernel driver in use: xhci_hcd

[Thales] : Kernel modules : xhci_pci

Quoted 5 lines

      -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]

[...]

Quoted 32 lines
Quoted 1 line

      -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.

Quoted 7 lines

[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

#13 lore raw
Quoted 19 lines · Stefano Stabellini

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.

Quoted 3 lines

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.

PV USB doesn't support USB 3.0.

Instead of using device_model_args= in the guest configuration I'd rather use the usbctrl= and usbdev= items (see the related xl.cfg(5) man page). I'm not sure this will really make a performance difference, though.

Juergen