Skip to main content
No need to identify edits.
Source Link
Stephen Kitt
  • 483.6k
  • 60
  • 1.2k
  • 1.4k

For some reason this is not documented on the Qemu 2.12.50 User Doc and I had to learn what I learned from this guy

They mention:

-device usb-host,hostbus=bus,hostaddr=addr
Pass through the host device identified by bus and addr 

-device usb-host,vendorid=vendor,productid=product
Pass through the host device identified by vendor and product ID 

But they don't mention that you can also do:

-device usb-host,hostbus=bus,hostport=port

For example...

Running lsusb -t, I get:

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 10: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 11: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

I could decide to pass these with:

-device usb-host,hostbus=3,hostport=10 \
-device usb-host,hostbus=3,hostport=11 \

And those correspond to the physical slots.

However the bus and port will differ for a USB 3.0 slot depending on if a USB 2.0 device or USB 3.0 device is plugged into it, but the port for each device will remain consistent.

Such variance does not exist for USB 2.0 slots.

Update: USB Hubs

UseWith USB hubs, use dots to separate the ports. So if you had ...

/:  Bus 03
|__ Port 2: some stuff
    |__ Port 1: some stuff

You would use -device usb-host,hostbus=3,hostport=2.1

For some reason this is not documented on the Qemu 2.12.50 User Doc and I had to learn what I learned from this guy

They mention:

-device usb-host,hostbus=bus,hostaddr=addr
Pass through the host device identified by bus and addr 

-device usb-host,vendorid=vendor,productid=product
Pass through the host device identified by vendor and product ID 

But they don't mention that you can also do:

-device usb-host,hostbus=bus,hostport=port

For example...

Running lsusb -t, I get:

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 10: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 11: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

I could decide to pass these with:

-device usb-host,hostbus=3,hostport=10 \
-device usb-host,hostbus=3,hostport=11 \

And those correspond to the physical slots.

However the bus and port will differ for a USB 3.0 slot depending on if a USB 2.0 device or USB 3.0 device is plugged into it, but the port for each device will remain consistent.

Such variance does not exist for USB 2.0 slots.

Update: USB Hubs

Use dots to separate the ports. So if you had ...

/:  Bus 03
|__ Port 2: some stuff
    |__ Port 1: some stuff

You would use -device usb-host,hostbus=3,hostport=2.1

For some reason this is not documented on the Qemu 2.12.50 User Doc and I had to learn what I learned from this guy

They mention:

-device usb-host,hostbus=bus,hostaddr=addr
Pass through the host device identified by bus and addr 

-device usb-host,vendorid=vendor,productid=product
Pass through the host device identified by vendor and product ID 

But they don't mention that you can also do:

-device usb-host,hostbus=bus,hostport=port

For example...

Running lsusb -t, I get:

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 10: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 11: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

I could decide to pass these with:

-device usb-host,hostbus=3,hostport=10 \
-device usb-host,hostbus=3,hostport=11 \

And those correspond to the physical slots.

However the bus and port will differ for a USB 3.0 slot depending on if a USB 2.0 device or USB 3.0 device is plugged into it, but the port for each device will remain consistent.

Such variance does not exist for USB 2.0 slots.

With USB hubs, use dots to separate the ports. So if you had ...

/:  Bus 03
|__ Port 2: some stuff
    |__ Port 1: some stuff

You would use -device usb-host,hostbus=3,hostport=2.1

For some reason this is not documented on the Qemu 2.12.50 User Doc and I had to learn what I learned from this guy

They mention:

-device usb-host,hostbus=bus,hostaddr=addr
Pass through the host device identified by bus and addr 

-device usb-host,vendorid=vendor,productid=product
Pass through the host device identified by vendor and product ID 

But they don't mention that you can also do:

-device usb-host,hostbus=bus,hostport=port

For example...

If I run lsusbRunning -t andlsusb -t, I get:

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 10: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 11: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

I could decide to pass these bywith:

-device usb-host,hostbus=3,hostport=10 \
-device usb-host,hostbus=3,hostport=11 \

And those correspond to the physical slots.

However the bus and port will differ for a USB 3.0 slot depending on if a USB 2.0 device or USB 3.0 device is plugged into it, but the port for each device will remain consistent.

Such variance does not exist for USB 2.0 slots.

/* update: USB Hubs */

Update: USB Hubs

Use dots to separate the ports. So if you had ...

/:  Bus 03
|__ Port 2: some stuff
    |__ Port 1: some stuff

You would use -device usb-host,hostbus=3,hostport=2.1

For some reason this is not documented on the Qemu 2.12.50 User Doc and I had to learn what I learned from this guy

They mention

-device usb-host,hostbus=bus,hostaddr=addr
Pass through the host device identified by bus and addr 

-device usb-host,vendorid=vendor,productid=product
Pass through the host device identified by vendor and product ID 

But they don't mention that you can do

-device usb-host,hostbus=bus,hostport=port

For example...

If I run lsusb -t and get

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 10: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 11: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

I could decide to pass these by

-device usb-host,hostbus=3,hostport=10 \
-device usb-host,hostbus=3,hostport=11 \

And those correspond to the physical slots.

However the bus and port will differ for a USB 3.0 slot depending on if a USB 2.0 device or USB 3.0 device is plugged into it, but the port for each device will remain consistent.

Such variance does not exist for USB 2.0 slots.

/* update: USB Hubs */

Use dots to separate the ports. So if you had ...

/:  Bus 03
|__ Port 2: some stuff
    |__ Port 1: some stuff

You would use -device usb-host,hostbus=3,hostport=2.1

For some reason this is not documented on the Qemu 2.12.50 User Doc and I had to learn what I learned from this guy

They mention:

-device usb-host,hostbus=bus,hostaddr=addr
Pass through the host device identified by bus and addr 

-device usb-host,vendorid=vendor,productid=product
Pass through the host device identified by vendor and product ID 

But they don't mention that you can also do:

-device usb-host,hostbus=bus,hostport=port

For example...

Running lsusb -t, I get:

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 10: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 11: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

I could decide to pass these with:

-device usb-host,hostbus=3,hostport=10 \
-device usb-host,hostbus=3,hostport=11 \

And those correspond to the physical slots.

However the bus and port will differ for a USB 3.0 slot depending on if a USB 2.0 device or USB 3.0 device is plugged into it, but the port for each device will remain consistent.

Such variance does not exist for USB 2.0 slots.

Update: USB Hubs

Use dots to separate the ports. So if you had ...

/:  Bus 03
|__ Port 2: some stuff
    |__ Port 1: some stuff

You would use -device usb-host,hostbus=3,hostport=2.1

Old link broken - fixed with a link to the wayback machine.
Source Link
Raven
  • 1.4k
  • 4
  • 16
  • 26

For some reason this is not documented on the Qemu 2.12.50 User DocQemu 2.12.50 User Doc and I had to learn what I learned from this guy

They mention

-device usb-host,hostbus=bus,hostaddr=addr
Pass through the host device identified by bus and addr 

-device usb-host,vendorid=vendor,productid=product
Pass through the host device identified by vendor and product ID 

But they don't mention that you can do

-device usb-host,hostbus=bus,hostport=port

For example...

If I run lsusb -t and get

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 10: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 11: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

I could decide to pass these by

-device usb-host,hostbus=3,hostport=10 \
-device usb-host,hostbus=3,hostport=11 \

And those correspond to the physical slots.

However the bus and port will differ for a USB 3.0 slot depending on if a USB 2.0 device or USB 3.0 device is plugged into it, but the port for each device will remain consistent.

Such variance does not exist for USB 2.0 slots.

/* update: USB Hubs */

Use dots to separate the ports. So if you had ...

/:  Bus 03
|__ Port 2: some stuff
    |__ Port 1: some stuff

You would use -device usb-host,hostbus=3,hostport=2.1

For some reason this is not documented on the Qemu 2.12.50 User Doc and I had to learn what I learned from this guy

They mention

-device usb-host,hostbus=bus,hostaddr=addr
Pass through the host device identified by bus and addr 

-device usb-host,vendorid=vendor,productid=product
Pass through the host device identified by vendor and product ID 

But they don't mention that you can do

-device usb-host,hostbus=bus,hostport=port

For example...

If I run lsusb -t and get

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 10: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 11: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

I could decide to pass these by

-device usb-host,hostbus=3,hostport=10 \
-device usb-host,hostbus=3,hostport=11 \

And those correspond to the physical slots.

However the bus and port will differ for a USB 3.0 slot depending on if a USB 2.0 device or USB 3.0 device is plugged into it, but the port for each device will remain consistent.

Such variance does not exist for USB 2.0 slots.

/* update: USB Hubs */

Use dots to separate the ports. So if you had ...

/:  Bus 03
|__ Port 2: some stuff
    |__ Port 1: some stuff

You would use -device usb-host,hostbus=3,hostport=2.1

For some reason this is not documented on the Qemu 2.12.50 User Doc and I had to learn what I learned from this guy

They mention

-device usb-host,hostbus=bus,hostaddr=addr
Pass through the host device identified by bus and addr 

-device usb-host,vendorid=vendor,productid=product
Pass through the host device identified by vendor and product ID 

But they don't mention that you can do

-device usb-host,hostbus=bus,hostport=port

For example...

If I run lsusb -t and get

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 10: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 11: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

I could decide to pass these by

-device usb-host,hostbus=3,hostport=10 \
-device usb-host,hostbus=3,hostport=11 \

And those correspond to the physical slots.

However the bus and port will differ for a USB 3.0 slot depending on if a USB 2.0 device or USB 3.0 device is plugged into it, but the port for each device will remain consistent.

Such variance does not exist for USB 2.0 slots.

/* update: USB Hubs */

Use dots to separate the ports. So if you had ...

/:  Bus 03
|__ Port 2: some stuff
    |__ Port 1: some stuff

You would use -device usb-host,hostbus=3,hostport=2.1

added 214 characters in body
Source Link
Raven
  • 1.4k
  • 4
  • 16
  • 26
Loading
added 226 characters in body
Source Link
Raven
  • 1.4k
  • 4
  • 16
  • 26
Loading
Source Link
Raven
  • 1.4k
  • 4
  • 16
  • 26
Loading