qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: spice-devel@lists.freedesktop.org, qemu-devel@nongnu.org
Subject: Re: [Spice-devel] [Qemu-devel] RFC: usb redirection over the network, interesting outside of spice?
Date: Tue, 30 Nov 2010 13:32:31 +0200	[thread overview]
Message-ID: <20101130113230.GD12522@playa.tlv.redhat.com> (raw)
In-Reply-To: <4CF4DF80.2090905@redhat.com>

On Tue, Nov 30, 2010 at 12:26:56PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 11/29/2010 06:49 PM, Anthony Liguori wrote:
> >On 11/29/2010 11:37 AM, Attila Sukosd wrote:
> >>Hi,
> >>
> >>I guess it should be abstract enough to support multiple back-ends, be it a kernel driver or through libusb?
> >
> >Is this something that should just live in libusb?
> >
> >If what libusb presented QEMU was actually implemented as USB-over-IP, QEMU wouldn't know the difference at all.  I think it would also be very useful to be able for libusb-based applications to work with remote devices.
> >
> 
> Well currently qemu is not using libusb but instead talking to usbfs directly when it comes
> to usb pass through. This is something worth looking into fixing (as doing the usbfs stuff
> ourselves is not nice), but looking at the smartcard support discussion I was left with the
> impression that using external libraries was deemed undesirable.
> 
> Even if qemu's usb pass through code were to use libusb though, I don't think that putting
> network direction into libusb is a good idea though. This clearly falls outside libusb's
> original design goals, and would require some major work on libusb. And although libusb
> upstream is not entirely dead, it also is not the most alive upstream either.
> 
> >What is unclear to me is what role QEMU would play in setting up remove USB-over-IP devices.
> 
> That would depend on the scenario, The way I see this is we get a usb-net-redir.c which
> sends packets through / from a real usb device like usb-linux.c does, but then over
> some reliable ordered transport channel.
> 
> Then there would be multiple ways to add a virtual usb device using usb-net-redir.c to
> the virtual machine. One way of adding such a device could be starting a tcp/ip server
> on a machine with an interesting usb device, say 192.168.1.100:2222 and then in
> the monitor type:
> usb_add net:192.168.1.100:2222:[vid]:[pid]
> or:
> usb_add net:192.168.1.100:2222:[busnr]:[addr]

Wouldn't you want to add a usb_add net:host:port that would just export anything it has
decided to export? or is this just the next step?

> 
> Another way would be for a spice client (viewer) to indicate through the spice main
> channel that it has a usb device which it wants to plug into the virtual machine, and
> the qemu spice code then adding this device to the vm, using a spice channel as the
> transport
> 
> Another way would be using a vnc client and somehow one of the sides indicating
> they want / are providing a usb device on the vnc client machine to show up inside
> the vm
> 
> > Pushing it down to the libusb layer completely takes QEMU out the picture which creates a clean separation layer.  There are emulated devices in QEMU which we create and control and then there are passthrough devices that QEMU doesn't have any role in creating.
> 
> IMHO the above 3 scenarios clearly indicates that when it comes to the device
> management (adding / removing) qemu needs to be involved.
> 
> I plan to write and submit a RFC for the protocol over the reliable ordered transport
> channel today + tomorrow, and once that is in place I'll start with focussing on
> making it possible to do:
> usb_add net:192.168.1.100:2222:[vid]:[pid]
> 
> Assuming that a usb device sharing server is running and ready
> to accept connections on 192.168.1.100:2222
> 
> Regards,
> 
> Hans
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

  reply	other threads:[~2010-12-01  5:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101129101727.2B64E2B679@zimbra14-e2.priv.proxad.net>
2010-11-29 14:33 ` [Qemu-devel] RFC: usb redirection over the network, interesting outside of spice? François Revol
2010-11-29 15:47   ` Gerd Hoffmann
2010-11-29 15:10     ` [Spice-devel] " Frédéric Grelot
2010-11-29 16:35       ` Gerd Hoffmann
2010-11-29 17:37         ` Attila Sukosd
2010-11-29 17:49           ` Anthony Liguori
2010-11-29 18:07             ` Alexander Graf
2010-11-30  8:54             ` Gerd Hoffmann
2010-11-30 11:26             ` Hans de Goede
2010-11-30 11:32               ` Alon Levy [this message]
2010-11-30 12:23                 ` Hans de Goede
2010-12-01 11:04                   ` Paul Brook
2010-12-01 11:49                     ` Hans de Goede
2010-12-01 12:12                       ` Paul Brook
2010-11-29 16:05     ` François Revol
2010-12-01 13:34       ` [Libusb-devel] " Peter Stuge
2010-11-29 17:13     ` Paul Brook
2010-11-30 11:07     ` [Qemu-devel] Using usbip for usb network redirection (was RFC: usb redirection over the network, interesting outside of spice?) Hans de Goede

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=20101130113230.GD12522@playa.tlv.redhat.com \
    --to=alevy@redhat.com \
    --cc=hdegoede@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=spice-devel@lists.freedesktop.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).