All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows.
@ 2013-07-08  8:25 Geunhae Lee
  2013-07-08  9:13 ` Andreas Färber
  0 siblings, 1 reply; 7+ messages in thread
From: Geunhae Lee @ 2013-07-08  8:25 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

hi,
i have questions about USB passthrough .

it seems that host usb passthrough is not working on Windows/Mac (as host)

is there any work-around solution for that?
or
is there some patches out there?


thank you.

[-- Attachment #2: Type: text/html, Size: 380 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows.
  2013-07-08  8:25 [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows Geunhae Lee
@ 2013-07-08  9:13 ` Andreas Färber
  2013-07-08 15:08   ` Geunhae Lee
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Färber @ 2013-07-08  9:13 UTC (permalink / raw)
  To: Geunhae Lee; +Cc: qemu-devel, Gerd Hoffmann

Hi,

Am 08.07.2013 10:25, schrieb Geunhae Lee:
> hi, 
> i have questions about USB passthrough . 
> 
> it seems that host usb passthrough is not working on Windows/Mac (as host)
> 
> is there any work-around solution for that? 
> or 
> is there some patches out there? 

Your question is lacking too much information to answer:
* Are you using today's Git version? Or which stable version?
* Define "not working": build errors? runtime errors?

I would expect the new libusb-based backend to work on Windows/Mac but
it requires a very recent library version, which you may need to update.

Also it may help if you CC'ed the USB maintainer on your question. :)

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows.
  2013-07-08  9:13 ` Andreas Färber
@ 2013-07-08 15:08   ` Geunhae Lee
  2013-07-08 15:11     ` Geunhae Lee
  2013-07-10  7:39     ` Hans de Goede
  0 siblings, 2 replies; 7+ messages in thread
From: Geunhae Lee @ 2013-07-08 15:08 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel, Gerd Hoffmann

[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]

hi thanks for you kind answer,
admit about lacking of infos haha..

here's my situations.

1. i currently use QEMU ver 1.2, but plan to upgrade to 1.5 soon.
2. in version 1.2, i found that USB passthrough is not supported on
Windows/Mac.
    In version 1.5, however, it seems possible to use passthrough by
re-implementing usb host (libusb)  , right?

    but i didn't find out any former work which uses USB passthrough on
Windows and Mac

 so my questions are 2 followings.

1.  is there any articles about using USB passthrough on Windows and MAC
2.  do you guys have some performance issues?
     -  libusb vs former implementation (qemu ver 1.2)


have good day


2013/7/8 Andreas Färber <afaerber@suse.de>

> Hi,
>
> Am 08.07.2013 10:25, schrieb Geunhae Lee:
> > hi,
> > i have questions about USB passthrough .
> >
> > it seems that host usb passthrough is not working on Windows/Mac (as
> host)
> >
> > is there any work-around solution for that?
> > or
> > is there some patches out there?
>
> Your question is lacking too much information to answer:
> * Are you using today's Git version? Or which stable version?
> * Define "not working": build errors? runtime errors?
>
> I would expect the new libusb-based backend to work on Windows/Mac but
> it requires a very recent library version, which you may need to update.
>
> Also it may help if you CC'ed the USB maintainer on your question. :)
>
> Regards,
> Andreas
>
> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
>

[-- Attachment #2: Type: text/html, Size: 2430 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows.
  2013-07-08 15:08   ` Geunhae Lee
@ 2013-07-08 15:11     ` Geunhae Lee
  2013-07-10  7:39     ` Hans de Goede
  1 sibling, 0 replies; 7+ messages in thread
From: Geunhae Lee @ 2013-07-08 15:11 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel, Gerd Hoffmann

[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

one more thing ,


if someone tested USB passthrough on Windows/Mac, can i have the version of
QEMU and libusb library ?




2013/7/9 Geunhae Lee <chris2nd@gmail.com>

> hi thanks for you kind answer,
> admit about lacking of infos haha..
>
> here's my situations.
>
> 1. i currently use QEMU ver 1.2, but plan to upgrade to 1.5 soon.
> 2. in version 1.2, i found that USB passthrough is not supported on
> Windows/Mac.
>     In version 1.5, however, it seems possible to use passthrough by
> re-implementing usb host (libusb)  , right?
>
>     but i didn't find out any former work which uses USB passthrough on
> Windows and Mac
>
>  so my questions are 2 followings.
>
> 1.  is there any articles about using USB passthrough on Windows and MAC
> 2.  do you guys have some performance issues?
>      -  libusb vs former implementation (qemu ver 1.2)
>
>
> have good day
>
>
> 2013/7/8 Andreas Färber <afaerber@suse.de>
>
>> Hi,
>>
>> Am 08.07.2013 10:25, schrieb Geunhae Lee:
>> > hi,
>> > i have questions about USB passthrough .
>> >
>> > it seems that host usb passthrough is not working on Windows/Mac (as
>> host)
>> >
>> > is there any work-around solution for that?
>> > or
>> > is there some patches out there?
>>
>> Your question is lacking too much information to answer:
>> * Are you using today's Git version? Or which stable version?
>> * Define "not working": build errors? runtime errors?
>>
>> I would expect the new libusb-based backend to work on Windows/Mac but
>> it requires a very recent library version, which you may need to update.
>>
>> Also it may help if you CC'ed the USB maintainer on your question. :)
>>
>> Regards,
>> Andreas
>>
>> --
>> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
>> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
>>
>
>

[-- Attachment #2: Type: text/html, Size: 2902 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows.
  2013-07-08 15:08   ` Geunhae Lee
  2013-07-08 15:11     ` Geunhae Lee
@ 2013-07-10  7:39     ` Hans de Goede
  1 sibling, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2013-07-10  7:39 UTC (permalink / raw)
  To: Geunhae Lee; +Cc: Gerd Hoffmann, Andreas Färber, qemu-devel

Hi,

On 07/08/2013 05:08 PM, Geunhae Lee wrote:
> hi thanks for you kind answer,
> admit about lacking of infos haha..
>
> here's my situations.
>
> 1. i currently use QEMU ver 1.2, but plan to upgrade to 1.5 soon.
> 2. in version 1.2, i found that USB passthrough is not supported on Windows/Mac.
>      In version 1.5, however, it seems possible to use passthrough by re-implementing usb host (libusb)  , right?

libusb already is ported to windows and darwin, but support there is limited, mostly
because the OS tends to get in the way a lot more there then under Linux.

In general under Windows it requires uninstalling the windows driver for the device, and
replacing it with one of 3 supported generic usb drivers: winusb, libusb0 or libusbk.

Under Darwin there is a standard API for accessing USB devices from userspace (like under
Linux), and just like under Linux the native device driver needs to be detached first.

The problem is that unlike under Linux, the native driver can refuse to be detached, and
many drivers have stub code for this functionality like this:

int detach_driver(...)
{
     return -EPERM;
}

IOW most Darwin drivers refuse to be detached from their device, making it impossible to
redirect them. This can be circumvented by first replacing the driver with a so called
codeless kext.

So all in all doing usb redirection under Windows and Mac OS X is far from trivial, on paper
it is supported with the new libusb host redirection code, but the user will likely need
to first swap drivers manually before a device can be redirected (and then manually swap them
back to give the device back to the host os later).

>      but i didn't find out any former work which uses USB passthrough on Windows and Mac
>
>   so my questions are 2 followings.
>
> 1.  is there any articles about using USB passthrough on Windows and MAC

No.

> 2.  do you guys have some performance issues?
>       -  libusb vs former implementation (qemu ver 1.2)

libusb's passthrough performance under Linux should be identical (and in some cases slightly
better) then the DIY code we were using before.

Regards,

Hans

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows.
  2013-07-10 13:37 Geunhae Lee
@ 2013-07-11 10:01 ` Hans de Goede
  0 siblings, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2013-07-11 10:01 UTC (permalink / raw)
  To: Geunhae Lee; +Cc: Gerd Hoffmann, Andreas Färber, qemu-devel

Hi,

On 07/10/2013 03:37 PM, Geunhae Lee wrote:
> thank you for kind reply
>
> i personally tried to test QEMU on Windows with libusb feature (--enable-libusb)
>
> but, figured out qemu/hw/usb/host-libusb.c is linux-dependent .
> - because. it includes <poll.h> which  is not compatible.

Ah yes, that is true libusb does not support poll on windows (since
there is no such thing under windows).

> any plan on changing this  ?

No, I don't think it is likely this will get fixed in qemu, so usb-redirection
will simply not be supported under Windows.

> currently i've worked around this compile error, and keep testing.
> but i've not seen the result yet.

Fixing the compile error is not going to help (much), you will end up with code
which does not call libusb_handle_events when it should, so things won't work.

Regards,

Hans

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows.
@ 2013-07-10 13:37 Geunhae Lee
  2013-07-11 10:01 ` Hans de Goede
  0 siblings, 1 reply; 7+ messages in thread
From: Geunhae Lee @ 2013-07-10 13:37 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Gerd Hoffmann, Andreas Färber, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2804 bytes --]

thank you for kind reply

i personally tried to test QEMU on Windows with libusb feature
(--enable-libusb)

but, figured out qemu/hw/usb/host-libusb.c is linux-dependent .
- because. it includes <poll.h> which  is not compatible.
by the way, libusb has some OS-specific (porting) codes in it .

any plan on changing this  ?

currently i've worked around this compile error, and keep testing.
but i've not seen the result yet.
hopefully willl share some real result with you

Regards.

Geunhae




2013/7/10 Hans de Goede <hdegoede@redhat.com>

> Hi,
>
>
> On 07/08/2013 05:08 PM, Geunhae Lee wrote:
>
>> hi thanks for you kind answer,
>> admit about lacking of infos haha..
>>
>> here's my situations.
>>
>> 1. i currently use QEMU ver 1.2, but plan to upgrade to 1.5 soon.
>> 2. in version 1.2, i found that USB passthrough is not supported on
>> Windows/Mac.
>>      In version 1.5, however, it seems possible to use passthrough by
>> re-implementing usb host (libusb)  , right?
>>
>
> libusb already is ported to windows and darwin, but support there is
> limited, mostly
> because the OS tends to get in the way a lot more there then under Linux.
>
> In general under Windows it requires uninstalling the windows driver for
> the device, and
> replacing it with one of 3 supported generic usb drivers: winusb, libusb0
> or libusbk.
>
> Under Darwin there is a standard API for accessing USB devices from
> userspace (like under
> Linux), and just like under Linux the native device driver needs to be
> detached first.
>
> The problem is that unlike under Linux, the native driver can refuse to be
> detached, and
> many drivers have stub code for this functionality like this:
>
> int detach_driver(...)
> {
>     return -EPERM;
> }
>
> IOW most Darwin drivers refuse to be detached from their device, making it
> impossible to
> redirect them. This can be circumvented by first replacing the driver with
> a so called
> codeless kext.
>
> So all in all doing usb redirection under Windows and Mac OS X is far from
> trivial, on paper
> it is supported with the new libusb host redirection code, but the user
> will likely need
> to first swap drivers manually before a device can be redirected (and then
> manually swap them
> back to give the device back to the host os later).
>
>
>       but i didn't find out any former work which uses USB passthrough on
>> Windows and Mac
>>
>>   so my questions are 2 followings.
>>
>> 1.  is there any articles about using USB passthrough on Windows and MAC
>>
>
> No.
>
>
>  2.  do you guys have some performance issues?
>>       -  libusb vs former implementation (qemu ver 1.2)
>>
>
> libusb's passthrough performance under Linux should be identical (and in
> some cases slightly
> better) then the DIY code we were using before.
>
> Regards,
>
> Hans
>

[-- Attachment #2: Type: text/html, Size: 3905 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-11 10:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-08  8:25 [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows Geunhae Lee
2013-07-08  9:13 ` Andreas Färber
2013-07-08 15:08   ` Geunhae Lee
2013-07-08 15:11     ` Geunhae Lee
2013-07-10  7:39     ` Hans de Goede
2013-07-10 13:37 Geunhae Lee
2013-07-11 10:01 ` Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.