qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Doug Evans <dje@google.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: Ethernet-over-usb with linux guest using USB Device Controller ?
Date: Tue, 4 May 2021 08:35:53 +0200	[thread overview]
Message-ID: <20210504063553.3wsmrwnzvuipzsmj@sirius.home.kraxel.org> (raw)
In-Reply-To: <CADPb22Qz3E-nyvkQSaiPPpghd1bYy_+_Qm0o7DnUPXdcrv+gxw@mail.gmail.com>

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	other threads:[~2021-05-04  7:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 16:48 Ethernet-over-usb with linux guest using USB Device Controller ? Doug Evans
2021-04-27  7:30 ` Gerd Hoffmann
2021-05-03 21:27   ` Doug Evans
2021-05-04  6:35     ` Gerd Hoffmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210504063553.3wsmrwnzvuipzsmj@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=dje@google.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).