Received: from [140.186.70.92] (port=58088 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaosF-0000kx-4S for qemu-devel@nongnu.org; Thu, 06 Jan 2011 07:23:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaosE-00056g-0C for qemu-devel@nongnu.org; Thu, 06 Jan 2011 07:23:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaosD-00056c-ML for qemu-devel@nongnu.org; Thu, 06 Jan 2011 07:23:21 -0500 Date: Thu, 6 Jan 2011 14:23:14 +0200 From: Alon Levy Subject: Re: [Qemu-devel] [PATCH] spice: add chardev (v3) Message-ID: <20110106122313.GC8288@playa.tlv.redhat.com> References: <1292593198-10091-1-git-send-email-alevy@redhat.com> <4D0B7B4B.4040500@codemonkey.ws> <4D25B00D.1090500@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D25B00D.1090500@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On Thu, Jan 06, 2011 at 01:05:33PM +0100, Gerd Hoffmann wrote: > On 12/17/10 16:01, Anthony Liguori wrote: > >On 12/17/2010 07:39 AM, Alon Levy wrote: > >>Adding a chardev backend for spice, for usage by spice vdagent in > >>conjunction with a properly named virtio-serial device. > >> > >>Example usage: > >>qemu -device virtio-serial -chardev spicevmc,name=vdagent,id=vdagent > >>-devic > > This example is incomplete btw ... oops - the complete example is: -device virtio-serial -device spicevmc,subtype=vdagent -chardev spicevmc,id=vdagent,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 > > >What doe this channel do? > > It is a communication path between spice client and guest. > > There used to be just one, for vdagent (spice guest agent) which > sends mouse events for example. There will be more in the future, > and using chardevs allows us to handle that. > > >I really don't feel comfortable with this. This is not connecting QEMU > >to an existing interface that happens to fit our model. > > > >This is clearly a "library" that provides thin wrappers around internal > >QEMU interfaces to implement code that belongs in QEMU outside of QEMU. > > No. This is about tunneling server/client connections through > spice, so we can reuse the authentication and encryption provided by > spice. > > Assume you have your VM running on machine A and you are sitting in > front of machine B. You want use the smartcard attached to host B > in your virtual machine. > > Without spice you'll use this on machine A: > qemu -chardev socket,server,host=0.0.0.0,port=2001,id=ccid,nowait \ > -usb -device usb-ccid -device ccid-card-passthru,chardev=ccid > > and run "vscclient 2001" on machine B. > > With spice you'll use this on machine A: > qemu -chardev spicevmc,id=ccid,name=smartcard \ > -usb -device usb-ccid -device ccid-card-passthru,chardev=ccid > > and the spice client on machine B will forward the requests to > vscclient (well, I think it is actually linked to libcaccard, which > is effectively the same as vscclient just forwards the requests from > the network to libcaccard too). > > There is no hidden magic. > > cheers, > Gerd >