Skip to contentSkip to conversation

usbdevice option and specifying a specific device

DISCUSSION Gordan Bobic 4 participants 9 messages Jul 29, 2013 – Aug 5, 2013

lore
Share & tools
lore
#0 lore raw

I'm trying to use usbdevice option in the config file (instead of passing USB PCI devices), and the documentation says to specify the device in the form host:xxxx:yyyy where xxxx:yyyy is the USB vendor:device ID.

Except there is a problem with this - I have two identical keyboards and mice, one set of which I want to pass to the host, and the other set which I want to pass to the guest. Since the xxxx:yyyy will be the same for both devices of each type, how can I deterministically specify which I want to keep on the host and which I want to pass to the guest?

Is there a way to use something like BusID:DeviceID instead in order to provide a more deterministic outcome?

Gordan

#1 lore raw
Quoted 5 lines · Gordan Bobic

I'm trying to use usbdevice option in the config file (instead of passing USB PCI devices), and the documentation says to specify the device in the form host:xxxx:yyyy where xxxx:yyyy is the USB vendor:device ID.

Quoted 8 lines

Except there is a problem with this - I have two identical keyboards and mice, one set of which I want to pass to the host, and the other set which I want to pass to the guest. Since the xxxx:yyyy will be the same for both devices of each type, how can I deterministically specify which I want to keep on the host and which I want to pass to the guest?

Is there a way to use something like BusID:DeviceID instead in order to provide a more deterministic outcome?

On a related note, the first device gets passed through successfully, but the second fails with a warning in qemu-dm log:

Warning: could not add USB device host:1532:002f

My usbdevice list is:

usbdevice = [ 'host:045e:00dd', 'host:1532:002f' ]

I cannot see anything more explanator in any of the other logs - what should I be looking for?

Gordan

#2 lore raw
Quoted 18 lines · Gordan Bobic
Quoted 5 lines · Gordan Bobic

I'm trying to use usbdevice option in the config file (instead of passing USB PCI devices), and the documentation says to specify the device in the form host:xxxx:yyyy where xxxx:yyyy is the USB vendor:device ID.

Quoted 8 lines

Except there is a problem with this - I have two identical keyboards and mice, one set of which I want to pass to the host, and the other set which I want to pass to the guest. Since the xxxx:yyyy will be the same for both devices of each type, how can I deterministically specify which I want to keep on the host and which I want to pass to the guest?

Is there a way to use something like BusID:DeviceID instead in order to provide a more deterministic outcome?

On a related note, the first device gets passed through successfully, but the second fails with a warning in qemu-dm log:

Quoted 9 lines

Warning: could not add USB device host:1532:002f

My usbdevice list is:

usbdevice = [ 'host:045e:00dd', 'host:1532:002f' ]

I cannot see anything more explanator in any of the other logs - what should I be looking for?

You forgot to mention all the needed basic info..

What Xen version? Are you using xl?

-- Pasi

#3 lore raw
Quoted 25 lines · Pasi Kärkkäinen
Quoted 24 lines · Gordan Bobic
Quoted 5 lines · Gordan Bobic

I'm trying to use usbdevice option in the config file (instead of passing USB PCI devices), and the documentation says to specify the device in the form host:xxxx:yyyy where xxxx:yyyy is the USB vendor:device ID.

Quoted 8 lines

Except there is a problem with this - I have two identical keyboards and mice, one set of which I want to pass to the host, and the other set which I want to pass to the guest. Since the xxxx:yyyy will be the same for both devices of each type, how can I deterministically specify which I want to keep on the host and which I want to pass to the guest?

Is there a way to use something like BusID:DeviceID instead in order to provide a more deterministic outcome?

On a related note, the first device gets passed through successfully, but the second fails with a warning in qemu-dm log:

Warning: could not add USB device host:1532:002f

My usbdevice list is:

usbdevice = [ 'host:045e:00dd', 'host:1532:002f' ]

Quoted 7 lines
Quoted 3 lines

I cannot see anything more explanator in any of the other logs - what should I be looking for?

You forgot to mention all the needed basic info..

What Xen version? Are you using xl?

Xen 4.3, and yes, I am using xl.

Gordan

#4 lore raw
In reply to Gordan Bobic
Quoted 5 lines · Gordan Bobic

I'm trying to use usbdevice option in the config file (instead of passing USB PCI devices), and the documentation says to specify the device in the form host:xxxx:yyyy where xxxx:yyyy is the USB vendor:device ID.

Quoted 8 lines

Except there is a problem with this - I have two identical keyboards and mice, one set of which I want to pass to the host, and the other set which I want to pass to the guest. Since the xxxx:yyyy will be the same for both devices of each type, how can I deterministically specify which I want to keep on the host and which I want to pass to the guest?

Is there a way to use something like BusID:DeviceID instead in order to provide a more deterministic outcome?

I think George (CCd) had some plans to improve this initial implementation in the 4.4 time frame.

Since it looks like the devices which you pass are given direct to qemu's -usbdevice option it seems like host:bus.addr should work too. "Supporting" this option is perhaps just a docs patch away?

Not sure if this varies depending on qemu-trad vs upstream, I only looked at the upstream manpage.
Ian.

#5 lore raw
Quoted 12 lines · Ian Campbell
Quoted 11 lines · Gordan Bobic

I'm trying to use usbdevice option in the config file (instead of passing USB PCI devices), and the documentation says to specify the device in the form host:xxxx:yyyy where xxxx:yyyy is the USB vendor:device ID.

Except there is a problem with this - I have two identical keyboards and mice, one set of which I want to pass to the host, and the other set which I want to pass to the guest. Since the xxxx:yyyy will be the same for both devices of each type, how can I deterministically specify which I want to keep on the host and which I want to pass to the guest?

Quoted 8 lines
Quoted 2 lines

Is there a way to use something like BusID:DeviceID instead in order to provide a more deterministic outcome?

I think George (CCd) had some plans to improve this initial implementation in the 4.4 time frame.

Since it looks like the devices which you pass are given direct to qemu's -usbdevice option it seems like host:bus.addr should work too. "Supporting" this option is perhaps just a docs patch away?

Yes, I think "host:bus.addr" should work as well. Let us know if it doesn't.

Quoted 2 lines

Not sure if this varies depending on qemu-trad vs upstream, I only looked at the upstream manpage.

Command-line options to qemu are part of the stable interface, so it should work for both qemu-traditional and qemu-xen.

-George

#6 lore raw
Quoted 18 lines · George Dunlap
Quoted 17 lines · Ian Campbell
Quoted 5 lines · Gordan Bobic

I'm trying to use usbdevice option in the config file (instead of passing USB PCI devices), and the documentation says to specify the device in the form host:xxxx:yyyy where xxxx:yyyy is the USB vendor:device ID.

Quoted 8 lines

Except there is a problem with this - I have two identical keyboards and mice, one set of which I want to pass to the host, and the other set which I want to pass to the guest. Since the xxxx:yyyy will be the same for both devices of each type, how can I deterministically specify which I want to keep on the host and which I want to pass to the guest?

Is there a way to use something like BusID:DeviceID instead in order to provide a more deterministic outcome?

I think George (CCd) had some plans to improve this initial implementation in the 4.4 time frame.

Quoted 6 lines
Quoted 3 lines

Since it looks like the devices which you pass are given direct to qemu's -usbdevice option it seems like host:bus.addr should work too. "Supporting" this option is perhaps just a docs patch away?

Yes, I think "host:bus.addr" should work as well. Let us know if it doesn't.

If it does then we should add it to our docs as something which we support passing on to qemu.

Quoted 5 lines
Quoted 2 lines

Not sure if this varies depending on qemu-trad vs upstream, I only looked at the upstream manpage.

Command-line options to qemu are part of the stable interface, so it should work for both qemu-traditional and qemu-xen.

Assuming it was supported at all in the -trad era, which I guess you are saying it was.

Ian.

#7 lore raw
Quoted 19 lines · Ian Campbell
Quoted 18 lines · George Dunlap
Quoted 17 lines · Ian Campbell
Quoted 5 lines · Gordan Bobic

I'm trying to use usbdevice option in the config file (instead of passing USB PCI devices), and the documentation says to specify the device in the form host:xxxx:yyyy where xxxx:yyyy is the USB vendor:device ID.

Quoted 8 lines

Except there is a problem with this - I have two identical keyboards and mice, one set of which I want to pass to the host, and the other set which I want to pass to the guest. Since the xxxx:yyyy will be the same for both devices of each type, how can I deterministically specify which I want to keep on the host and which I want to pass to the guest?

Is there a way to use something like BusID:DeviceID instead in order to provide a more deterministic outcome?

I think George (CCd) had some plans to improve this initial implementation in the 4.4 time frame.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Since it looks like the devices which you pass are given direct to qemu's -usbdevice option it seems like host:bus.addr should work too. "Supporting" this option is perhaps just a docs patch away?

Yes, I think "host:bus.addr" should work as well. Let us know if it doesn't.

If it does then we should add it to our docs as something which we support passing on to qemu.

Gordan, did you try this?

-George

#8 lore raw
Quoted 23 lines · George Dunlap
Quoted 22 lines · Ian Campbell
Quoted 21 lines · George Dunlap
Quoted 20 lines · Ian Campbell
Quoted 5 lines · Gordan Bobic

I'm trying to use usbdevice option in the config file (instead of passing USB PCI devices), and the documentation says to specify the device in the form host:xxxx:yyyy where xxxx:yyyy is the USB vendor:device ID.

Quoted 8 lines

Except there is a problem with this - I have two identical keyboards and mice, one set of which I want to pass to the host, and the other set which I want to pass to the guest. Since the xxxx:yyyy will be the same for both devices of each type, how can I deterministically specify which I want to keep on the host and which I want to pass to the guest?

Is there a way to use something like BusID:DeviceID instead in order to provide a more deterministic outcome?

I think George (CCd) had some plans to improve this initial implementation in the 4.4 time frame.

Since it looks like the devices which you pass are given direct to qemu's -usbdevice option it seems like host:bus.addr should work too. "Supporting" this option is perhaps just a docs patch away?

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Yes, I think "host:bus.addr" should work as well. Let us know if it doesn't.

If it does then we should add it to our docs as something which we support passing on to qemu.

Gordan, did you try this?

Yes, it works, but only if BusID != 8. See the bug report I posted yesterday. I will double check tonight whether the BusID=8 gets clobbered into BusID=0 at xl or qemu-dm level.

Gordan