From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38506 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Paob7-0003zT-Gs for qemu-devel@nongnu.org; Thu, 06 Jan 2011 07:05:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Paob5-0002DI-7o for qemu-devel@nongnu.org; Thu, 06 Jan 2011 07:05:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Paob4-0002DC-Mg for qemu-devel@nongnu.org; Thu, 06 Jan 2011 07:05:39 -0500 Message-ID: <4D25B00D.1090500@redhat.com> Date: Thu, 06 Jan 2011 13:05:33 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] spice: add chardev (v3) References: <1292593198-10091-1-git-send-email-alevy@redhat.com> <4D0B7B4B.4040500@codemonkey.ws> In-Reply-To: <4D0B7B4B.4040500@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Alon Levy , qemu-devel@nongnu.org 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 ... > 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