Re: [Spice-devel] [PATCH spice-server 03/14] char_device: Introducing shared flow control code for char devices.

2012-07-03 Thread Yonit Halperin
Hi, On 07/02/2012 02:11 PM, Alon Levy wrote: On Wed, Jun 27, 2012 at 06:16:41PM +0300, Yonit Halperin wrote: I didn't review the whole series, but since I see Hans already provided some comments on this patch I'll add my own. I also think the patchset looks very good. For the future, it

Re: [Spice-devel] [PATCH spice-xpi] add missing interface attributes

2012-07-03 Thread Christophe Fergeau
On Mon, Jul 02, 2012 at 01:01:08PM +0200, Peter Hatina wrote: when finishing test page generator, I noticed, that there are 2 attributes missing in the IDL file. I would like to push this, are you ok with those two? Looks good to me Christophe pgpNfn87AhdLY.pgp Description: PGP signature

Re: [Spice-devel] [PATCH spice-gtk] controller: async flush read/write

2012-07-03 Thread Alon Levy
On Tue, Jul 03, 2012 at 03:41:21AM +0200, Marc-André Lureau wrote: Windows namedpipes behave a bit differently from Unix socket, and may return incomplete read/write. By using 2 read/write() helpers, try to complete the operation before returning. Since the IO operation may be splitted over

[Spice-devel] Usb-redirect

2012-07-03 Thread Шарапов Салават
Hello! Project Wonderful! Using SPICE for six months. Satisfied. It took a traverse USB-device on the virtual machine, read the How to .. seems to be understood. Does not work. Brought together with the package SPICE usbredirserver. The resulting package is included in the kernel Thinstation

[Spice-devel] [PATCH spice-server v2 00/14] char device flow control v2

2012-07-03 Thread Yonit Halperin
Changes from v1: Fixes for the comments Hans and Alon made. Mainly for patch 3: * use do_flow_control flag, instead of ~0 for infinite tokens * avoid code duplication in spice_char_device_send_to_client_tokens_set/add * fix bug in num_self_token counting when the cur_write_buf was associated with

[Spice-devel] [PATCH spice-server v2 02/14] smartcard: fix an error message

2012-07-03 Thread Yonit Halperin
--- server/smartcard.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/smartcard.c b/server/smartcard.c index cb6b40b..fcf210f 100644 --- a/server/smartcard.c +++ b/server/smartcard.c @@ -535,7 +535,7 @@ static void smartcard_init(void)

[Spice-devel] [PATCH spice-server v2 03/14] char_device: Introducing shared flow control code for char devices.

2012-07-03 Thread Yonit Halperin
SpiceCharDeviceState manages the (1) write-to-device queue (2) wakeup and reading from the device (3) client tokens (4) sending messages from the device to the client/s, considering the available tokens. SpiceCharDeviceState can be also stopped and started. When the device is stopped, no reading

[Spice-devel] [PATCH spice-server v2 04/14] agent: Fix tokens handling in main_channel

2012-07-03 Thread Yonit Halperin
- Allow sending tokens to a specific client. - Do not ignore tokens that are sent from the client to the server. The tokens support for multiple clients and for server side tokens is still broken in reds. It will be fixed in following patches, when the server-side agent code will use the

[Spice-devel] [PATCH spice-server v2 05/14] agent: remove save/restore migration data code

2012-07-03 Thread Yonit Halperin
This code is never called, it was relevant for seamless migration. Most of the data that needs to be migrated was moved to SpiceCharDeviceState. When we implement seamless migration, we will have routines in char_device.c for migrating the relevant data. --- server/reds.c | 252

[Spice-devel] [PATCH spice-server v2 06/14] agent: employ SpiceCharDeviceState for managing reading from the device

2012-07-03 Thread Yonit Halperin
--- server/main_channel.c | 52 +++--- server/main_channel.h |4 +- server/reds.c | 296 +++-- 3 files changed, 228 insertions(+), 124 deletions(-) diff --git a/server/main_channel.c b/server/main_channel.c index ce467f8..f9492b0

[Spice-devel] [PATCH spice-server v2 07/14] agent: use SpiceCharDeviceWriteBuffer for agent data from the client

2012-07-03 Thread Yonit Halperin
This is an intermediate patch. The next patch will actually push the buffer to the device, instead of copying it. --- server/main_channel.c | 10 +- server/reds.c | 34 ++ server/reds.h |2 ++ 3 files changed, 45 insertions(+), 1

[Spice-devel] [PATCH spice-server v2 08/14] agent: employ SpiceCharDeviceState for writing to the device

2012-07-03 Thread Yonit Halperin
--- server/reds.c | 255 ++--- 1 files changed, 44 insertions(+), 211 deletions(-) diff --git a/server/reds.c b/server/reds.c index 8abf19e..5ca0d21 100644 --- a/server/reds.c +++ b/server/reds.c @@ -167,11 +167,6 @@ typedef struct

[Spice-devel] [PATCH spice-server v2 09/14] spicevmc: employ SpiceCharDeviceState for managing reading from the guest device

2012-07-03 Thread Yonit Halperin
This patch and the following one do not introduce tokening to the spicevmc channel. But this can be done easily later, by setting the appropriate variables in SpiceCharDeviceState (after adding the appropriate protocol messages, and implementing this in the client side). --- server/char_device.h

[Spice-devel] [PATCH spice-server v2 10/14] spicevmc: use SpiceCharDeviceState for writing to the guest device

2012-07-03 Thread Yonit Halperin
With SpiceCharDeviceState, spicevmc now supports partial writes, and storing data that is received from the client after the device is stopped, instead of attempting to write it to the guest. --- server/spicevmc.c | 49 - 1 files changed, 24

[Spice-devel] [PATCH spice-server v2 11/14] smartcard: use SpiceCharDeviceState for managing reading from the device

2012-07-03 Thread Yonit Halperin
This patch and the following one do not introduce tokening to the smartcard channel. But this can be done easily later, by setting the appropriate variables in SpiceCharDeviceState (after adding the appropriate protocol messages, and implementing this in the client side). --- server/reds.c

[Spice-devel] [PATCH spice-server v2 12/14] smartcard: creating SmartCardChannelClient type

2012-07-03 Thread Yonit Halperin
The lifetime of the channel is not necessarily correlated to the life time of the device. In the next patch, we need to keep a reference to SpiceCharDeviceWriteBuffer, which might be in use even if the SpiceCharDeviceState is destroyed, but the channel is still connected. The next patch keeps this

[Spice-devel] [PATCH spice-server v2 13/14] smartcard: use SpiceCharDeviceState for writing to the guest device

2012-07-03 Thread Yonit Halperin
With SpiceCharDeviceState, the smartcard code now supports partial writes, and storing data that is received from the client after the device is stopped, instead of attempting to write it to the guest. --- server/smartcard.c | 115 ++-- 1 files

[Spice-devel] [PATCH spice-server v2 14/14] char_device: move SpiceCharDeviceState from the header

2012-07-03 Thread Yonit Halperin
In addition, I also removed the no longer used wakeup callback --- server/char_device.c | 23 +++ server/char_device.h | 28 server/reds.c|8 3 files changed, 27 insertions(+), 32 deletions(-) diff --git

Re: [Spice-devel] [PATCH spice-server v2 00/14] char device flow control v2

2012-07-03 Thread Hans de Goede
Series looks good to me, ack series! Regards, Hans On 07/03/2012 01:33 PM, Yonit Halperin wrote: Changes from v1: Fixes for the comments Hans and Alon made. Mainly for patch 3: * use do_flow_control flag, instead of ~0 for infinite tokens * avoid code duplication in

Re: [Spice-devel] [PATCH spice-gtk] controller: async flush read/write

2012-07-03 Thread Uri Lublin
On 07/03/2012 04:41 AM, Marc-André Lureau wrote: Windows namedpipes behave a bit differently from Unix socket, and may return incomplete read/write. By using 2 read/write() helpers, try to complete the operation before returning. Since the IO operation may be splitted over several call, we make

Re: [Spice-devel] [PATCH spice-gtk] controller: async flush read/write

2012-07-03 Thread Marc-André Lureau
Hi - Mensaje original - On 07/03/2012 04:41 AM, Marc-André Lureau wrote: + while (i length) { + var n = yield stream.write_async (buffer[i:length]); Does stream.write_async throws exceptions on errors ? If not, then this code needs to handle errors

[Spice-devel] multi-touch input

2012-07-03 Thread Brian Vetter
We are experimenting with multi-touch client/host instead of the regular Windows mouse interface. Getting WM_TOUCH type messages into the client with the multiple touch points is easy but the approach for how to support these in the server (Spice/QEMU) and the guest OS raises some questions. It

[Spice-devel] [protocol] Add spice/Makefile to the generated .gitignore

2012-07-03 Thread Jeremy White
--- Makefile.am |1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index d2e49a4..ff7c78f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,6 +19,7 @@ MAINTAINERCLEANFILES = \ $(srcdir)/missing

[Spice-devel] [PATCH] char_device.h: Remove redefinition of typedef 'SpiceCharDeviceState'

2012-07-03 Thread Yonit Halperin
The original definition is in spice.h --- server/char_device.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/server/char_device.h b/server/char_device.h index 4a70075..ef8ce3a 100644 --- a/server/char_device.h +++ b/server/char_device.h @@ -107,8 +107,6 @@ typedef