Received: from [140.186.70.92] (port=35681 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTH12-00050i-HL for qemu-devel@nongnu.org; Thu, 16 Dec 2010 11:49:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTH0v-00074F-Cf for qemu-devel@nongnu.org; Thu, 16 Dec 2010 11:49:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTH0v-00072T-5d for qemu-devel@nongnu.org; Thu, 16 Dec 2010 11:49:09 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBGGn4pX015101 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 16 Dec 2010 11:49:05 -0500 Date: Thu, 16 Dec 2010 18:48:59 +0200 From: Alon Levy Subject: Re: [Qemu-devel] [PATCH 1/1] spice: add chardev Message-ID: <20101216164859.GA27251@playa.tlv.redhat.com> References: <1292498949-16933-1-git-send-email-alevy@redhat.com> <4D0A124C.6080108@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D0A124C.6080108@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, Dec 16, 2010 at 02:21:16PM +0100, Gerd Hoffmann wrote: > On 12/16/10 12:29, Alon Levy wrote: > >Adding a chardev backend for spice, for usage by spice vdagent in > >conjunction with a properly named virtio-serial device. > > Usage example would be nice here. > > >+#ifdef CONFIG_SPICE > >+#include "spice-qemu-char.h" > >+#endif > > #ifdef can be dropped. > ok. > >+#ifdef CONFIG_SPICE > >+ { > >+ .name = "name", > >+ .type = QEMU_OPT_STRING, > >+ },{ > >+ .name = "debug", > >+ .type = QEMU_OPT_NUMBER, > >+ }, > >+#endif > > This too. ok. > > >@@ -1381,7 +1384,10 @@ Backend is one of: > > @option{stdio}, > > @option{braille}, > > @option{tty}, > >-@option{parport}. > >+@option{parport} > >+#if defined(CONFIG_SPICE) > >+@option{spicevmc}. > >+#endif > > This too, documentation should be there unconditionally. > ok. > >+//#define SPICE_QEMU_CHAR_USE_IOCTL > > Why is this disabled? > Does it depend on the chardev patches from Amit? > There was a long discussion that concluded we don't want IOCTL's at all, and that there should be some other mechanism for connection state communication between the two sides. Meanwhile I found out I don't need these (I don't remember exactly what I used instead, but basically just the regular results of write/read). > >diff --git a/spice-qemu-char.h b/spice-qemu-char.h > >new file mode 100644 > >index 0000000..32d5009 > >--- /dev/null > >+++ b/spice-qemu-char.h > >@@ -0,0 +1,9 @@ > >+#ifndef __SPICE_QEMU_CHAR_H__ > >+#define __SPICE_QEMU_CHAR_H__ > >+ > >+#include "qemu-char.h" > >+ > >+CharDriverState *qemu_chr_open_spice(QemuOpts *opts); > >+ > >+#endif // __SPICE_QEMU_CHAR_H__ > >+ > > Hmm, maybe add this to ui/qemu-spice.h instead, so we don't clutter > the tree with lots of tiny includes? ok. > > cheers, > Gerd