Received: from eggs.gnu.org ([2001:4830:134:3::10]:43523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XifMD-0005gn-LS for qemu-devel@nongnu.org; Mon, 27 Oct 2014 04:08:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XifM7-0000B0-Cl for qemu-devel@nongnu.org; Mon, 27 Oct 2014 04:08:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XifM7-0000Am-4d for qemu-devel@nongnu.org; Mon, 27 Oct 2014 04:08:47 -0400 Message-ID: <1414397322.9909.4.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Mon, 27 Oct 2014 09:08:42 +0100 In-Reply-To: <1414141254-31960-2-git-send-email-marcandre.lureau@gmail.com> References: <1414141254-31960-1-git-send-email-marcandre.lureau@gmail.com> <1414141254-31960-2-git-send-email-marcandre.lureau@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] spice-char: notify the server when chardev is writable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Marc-Andr=E9?= Lureau Cc: amit.shah@redhat.com, qemu-devel@nongnu.org On Fr, 2014-10-24 at 11:00 +0200, Marc-Andr=C3=A9 Lureau wrote: > The spice server is polling on write, unless > SPICE_CHAR_DEVICE_NOTIFY_WRITABLE flag is set. In this case, qemu must > call spice_server_char_device_wakeup() when the frontend is writable. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > spice-qemu-char.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/spice-qemu-char.c b/spice-qemu-char.c > index 8106e06..3de01d1 100644 > --- a/spice-qemu-char.c > +++ b/spice-qemu-char.c > @@ -111,6 +111,9 @@ static SpiceCharDeviceInterface vmc_interface =3D { > #if SPICE_SERVER_VERSION >=3D 0x000c02 > .event =3D vmc_event, > #endif > +#if SPICE_SERVER_VERSION >=3D 0x000c06 > + .flags =3D SPICE_CHAR_DEVICE_NOTIFY_WRITABLE, > +#endif > }; > =20 >=20 > @@ -261,6 +264,13 @@ static void print_allowed_subtypes(void) > fprintf(stderr, "\n"); > } > =20 > +static void spice_chr_accept_input(struct CharDriverState *chr) > +{ > + SpiceCharDriver *s =3D chr->opaque; > + > + spice_server_char_device_wakeup(&s->sin); Does this build on older spice versions? I'd suspect this needs #if SPICE_SERVER_VERSION too ... cheers, Gerd