[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] spice-char: notify the server when chardev
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] spice-char: notify the server when chardev is writable |
Date: |
Mon, 27 Oct 2014 09:08:42 +0100 |
On Fr, 2014-10-24 at 11:00 +0200, Marc-André 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.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> spice-qemu-char.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> 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 = {
> #if SPICE_SERVER_VERSION >= 0x000c02
> .event = vmc_event,
> #endif
> +#if SPICE_SERVER_VERSION >= 0x000c06
> + .flags = SPICE_CHAR_DEVICE_NOTIFY_WRITABLE,
> +#endif
> };
>
>
> @@ -261,6 +264,13 @@ static void print_allowed_subtypes(void)
> fprintf(stderr, "\n");
> }
>
> +static void spice_chr_accept_input(struct CharDriverState *chr)
> +{
> + SpiceCharDriver *s = 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