qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ethernet-over-usb with linux guest using USB Device Controller ?


From: Gerd Hoffmann
Subject: Re: Ethernet-over-usb with linux guest using USB Device Controller ?
Date: Tue, 4 May 2021 08:35:53 +0200

On Mon, May 03, 2021 at 02:27:39PM -0700, Doug Evans wrote:
> On Tue, Apr 27, 2021 at 12:31 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
> 
> >   Hi,
> >
> > > Questions: Is this support in QEMU and if so got any pointers to source
> > for
> > > existing examples?
> > > If not, any guidance on how to proceed?
> >
> > qemu has only usb host controller emulation, not any usb device
> > controller emulation.  So you are entering new territory and there are
> > no existing code exsamples, sorry.
> >
> 
> 
> Thanks. Any suggestions on how you would do it? Even just high level design
> points would be helpful.
> 
> As far as implementation goes:
> 1) Is there a "libusb" kinda thing for devices?
>   [any sort of utility library that takes the device's point of view]

No clue, sorry.

> 2) Would it make sense to use the usbredir protocol for speaking USB over
> sockets?
>   [where in this case QEMU is the device and not the host]
>   ref: https://www.spice-space.org/usbredir.html

Depends on how you design this.  Running usbredir-over-vsock is clearly
one option, and it would for the most part take qemu out of the loop.
Drawback is that this wouldn't be transparent to the guest, the guest
would have to implement the usb device as usbredir server instead of
using the usual usb gadget interfaces which one would use on physical
hardware.

Another obvious option would be to implement a usb device controller in
qemu (either emulate existing hardware, or design something paravirtual,
probably using virtio).  Reusing existing software would be easier that
way.

take care,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]