Skip to contentSkip to conversation

usb: reword -usb command-line option and mention xHCI

PATCH Superseded Stefan Hajnoczi 5 participants 6 messages Aug 13, 2019 – Aug 15, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: reword -usb command-line option and mention xHCI

The -usb section of the man page is not very clear on what exactly -usb does and fails to mention xHCI as a modern alternative (-device nec-usb-xhci).

---
 qemu-options.hx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
qemu-options.hx +5 -2
index 9621e934c0..7d11c016d1 100644
@@ -1436,12 +1436,15 @@ STEXI
 ETEXI
 
 DEF("usb", 0, QEMU_OPTION_usb,
-    "-usb            enable the USB driver (if it is not used by default yet)\n",
+    "-usb            enable on-board USB host controller (if not enabled by default)\n",
     QEMU_ARCH_ALL)
 STEXI
 @item -usb
 @findex -usb
-Enable the USB driver (if it is not used by default yet).
+Enable USB emulation on machine types with an on-board USB host controller (if
+not enabled by default).  Note that on-board USB host controllers may not
+support USB 3.0.  In this case -device nec-usb-xhci can be used instead on
+machines with PCI.
 ETEXI
 
 DEF("usbdevice", HAS_ARG, QEMU_OPTION_usbdevice,
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Stefan Hajnoczi

The -usb section of the man page is not very clear on what exactly -usb does and fails to mention xHCI as a modern alternative (-device nec-usb-xhci).

---
 qemu-options.hx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
qemu-options.hx +0 -0
index 9621e934c0..7d11c016d1 100644
@@ -1436,12 +1436,15 @@ STEXI
 ETEXI
 
 DEF("usb", 0, QEMU_OPTION_usb,

qemu-options.hx STEXI · line 1446

Quoted 10 lines
qemu-options.hx +4 -2
-    "-usb            enable the USB driver (if it is not used by default yet)\n",
+    "-usb            enable on-board USB host controller (if not enabled by default)\n",
     QEMU_ARCH_ALL)
 STEXI
 @item -usb
 @findex -usb
-Enable the USB driver (if it is not used by default yet).
+Enable USB emulation on machine types with an on-board USB host controller (if
+not enabled by default).  Note that on-board USB host controllers may not
+support USB 3.0.  In this case -device nec-usb-xhci can be used instead on

Should we maybe rather recommend qemu-xhci instead? And please put the @option{} around the "-device *-xhci" here.

With @option:

#2 lore raw
Quoted 17 lines · Thomas Huth
Quoted 16 lines · Stefan Hajnoczi

The -usb section of the man page is not very clear on what exactly -usb does and fails to mention xHCI as a modern alternative (-device nec-usb-xhci).

---
 qemu-options.hx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
qemu-options.hx +0 -0
index 9621e934c0..7d11c016d1 100644
@@ -1436,12 +1436,15 @@ STEXI
 ETEXI
 
Quoted 13 lines

qemu-options.hx STEXI · line 1446

Quoted 11 lines
qemu-options.hx +4 -2
 DEF("usb", 0, QEMU_OPTION_usb,
-    "-usb            enable the USB driver (if it is not used by default yet)\n",
+    "-usb            enable on-board USB host controller (if not enabled by default)\n",
     QEMU_ARCH_ALL)
 STEXI
 @item -usb
 @findex -usb
-Enable the USB driver (if it is not used by default yet).
+Enable USB emulation on machine types with an on-board USB host controller (if
+not enabled by default).  Note that on-board USB host controllers may not
+support USB 3.0.  In this case -device nec-usb-xhci can be used instead on

Should we maybe rather recommend qemu-xhci instead?

I think nec-usb-xhci is preferred because there are Windows drivers. IIRC qemu-xhci works under Linux but not under Windows (just because the PCI Vendor/Device ID aren't covered by any driver).

Gerd: Can you confirm this?

Stefan

#3 lore raw

Hi,

Quoted 7 lines
Quoted 6 lines

qemu-options.hx STEXI · line 1446

Quoted 4 lines
qemu-options.hx +3 -1
-Enable the USB driver (if it is not used by default yet).
+Enable USB emulation on machine types with an on-board USB host controller (if
+not enabled by default).  Note that on-board USB host controllers may not
+support USB 3.0.  In this case -device nec-usb-xhci can be used instead on

Should we maybe rather recommend qemu-xhci instead?

Quoted 5 lines

I think nec-usb-xhci is preferred because there are Windows drivers. IIRC qemu-xhci works under Linux but not under Windows (just because the PCI Vendor/Device ID aren't covered by any driver).

Gerd: Can you confirm this?

That applies to windows 7 only, which is EOL next year.

win7 doesn't ship with xhci drivers, but you can download and use nec/renesas drivers which require nec-usb-xhci.

win8+ ships with generic xhci drivers which works with all xhci hardware, including qemu-xhci.

So it indeed makes sense to refer to qemu-xhci.

cheers,
Gerd

#4 lore raw
Quoted 17 lines · Gerd Hoffmann

Hi,

Quoted 7 lines
Quoted 6 lines

qemu-options.hx STEXI · line 1446

Quoted 4 lines
qemu-options.hx +3 -1
-Enable the USB driver (if it is not used by default yet).
+Enable USB emulation on machine types with an on-board USB host controller (if
+not enabled by default).  Note that on-board USB host controllers may not
+support USB 3.0.  In this case -device nec-usb-xhci can be used instead on

Should we maybe rather recommend qemu-xhci instead?

Quoted 5 lines

I think nec-usb-xhci is preferred because there are Windows drivers. IIRC qemu-xhci works under Linux but not under Windows (just because the PCI Vendor/Device ID aren't covered by any driver).

Gerd: Can you confirm this?

That applies to windows 7 only, which is EOL next year.

Quoted 7 lines

win7 doesn't ship with xhci drivers, but you can download and use nec/renesas drivers which require nec-usb-xhci.

win8+ ships with generic xhci drivers which works with all xhci hardware, including qemu-xhci.

So it indeed makes sense to refer to qemu-xhci.

Thanks, will fix in v2!

Stefan

#5 lore raw
In reply to Stefan Hajnoczi
Quoted 3 lines · * Stefan Hajnoczi ([email protected]) wrote:

The -usb section of the man page is not very clear on what exactly -usb does and fails to mention xHCI as a modern alternative (-device nec-usb-xhci).

Isn't 'qemu-xhci' the current favoured device?

Dave

Quoted 31 lines
---
 qemu-options.hx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
qemu-options.hx +5 -2
index 9621e934c0..7d11c016d1 100644
@@ -1436,12 +1436,15 @@ STEXI
 ETEXI
 
 DEF("usb", 0, QEMU_OPTION_usb,
-    "-usb            enable the USB driver (if it is not used by default yet)\n",
+    "-usb            enable on-board USB host controller (if not enabled by default)\n",
     QEMU_ARCH_ALL)
 STEXI
 @item -usb
 @findex -usb
-Enable the USB driver (if it is not used by default yet).
+Enable USB emulation on machine types with an on-board USB host controller (if
+not enabled by default).  Note that on-board USB host controllers may not
+support USB 3.0.  In this case -device nec-usb-xhci can be used instead on
+machines with PCI.
 ETEXI
 
 DEF("usbdevice", HAS_ARG, QEMU_OPTION_usbdevice,
Signature · 1 line
2.21.0

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK