[Spice-devel] [PATCH spice 9/9] red-dispatcher: group cases

2015-12-09 Thread Marc-André Lureau
A small cleanup. Signed-off-by: Marc-André Lureau --- server/red-dispatcher.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/server/red-dispatcher.c b/server/red-dispatcher.c index 47c8179..0810798 100644 --- a/server/red-dispatcher.c +++ b/server/red-dispatcher.

[Spice-devel] [PATCH spice 4/9] reds-stream: add reds_stream_is_plain_unix()

2015-12-09 Thread Marc-André Lureau
From: Marc-André Lureau Utility function used in follow-up code. Signed-off-by: Marc-André Lureau --- server/reds-stream.c | 20 +++- server/reds-stream.h | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/server/reds-stream.c b/server/reds-stream.c index

[Spice-devel] [PATCH spice 5/9] reds-stream: add send_msgfd()

2015-12-09 Thread Marc-André Lureau
From: Marc-André Lureau A new function to send fd with unix socket anciliary data. Signed-off-by: Marc-André Lureau --- server/reds-stream.c | 42 ++ server/reds-stream.h | 1 + 2 files changed, 43 insertions(+) diff --git a/server/reds-stream.c b/serv

[Spice-devel] [PATCH spice 2/9] snd: remove duplicated snd_attach_*() code

2015-12-09 Thread Marc-André Lureau
From: Marc-André Lureau red_channel_set_data() already sets channel->data. Signed-off-by: Marc-André Lureau --- server/sound.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/sound.c b/server/sound.c index 0c94964..5c252c1 100644 --- a/server/sound.c +++ b/server/sound.c @@ -1520,7

[Spice-devel] [PATCH spice 6/9] red-channel: constify some callback structs

2015-12-09 Thread Marc-André Lureau
From: Marc-André Lureau Because we can. Signed-off-by: Marc-André Lureau --- server/red-channel.c | 6 +++--- server/red-channel.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/red-channel.c b/server/red-channel.c index 2a64bc8..ce4c691 100644 --- a/server/r

[Spice-devel] [PATCH spice 7/9] red-channel: do not call pipe_add with NULL item

2015-12-09 Thread Marc-André Lureau
From: Marc-André Lureau For some client, it might not be possible to create an item. In this case, don't call pipe_add() callback. Signed-off-by: Marc-André Lureau --- server/red-channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/red-channel.c b/server/red-

[Spice-devel] [PATCH spice 1/9] build-sys: disable static lib by default

2015-12-09 Thread Marc-André Lureau
From: Marc-André Lureau It's not used in general, so no need to build it by default. Signed-off-by: Marc-André Lureau --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 907a275..2eb8128 100644 --- a/configure.ac +++ b/configur

[Spice-devel] [PATCH spice 3/9] snd: simplify reds_register_channel() call

2015-12-09 Thread Marc-André Lureau
From: Marc-André Lureau Give channel argument directly Signed-off-by: Marc-André Lureau --- server/sound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/sound.c b/server/sound.c index 5c252c1..a8cf0b6 100644 --- a/server/sound.c +++ b/server/sound.c @@ -1533,7

[Spice-devel] [PATCH spice 8/9] red-channel: return number of created pipe items

2015-12-09 Thread Marc-André Lureau
This is useful in the following patches to count the number of replies to wait for. Signed-off-by: Marc-André Lureau --- server/red-channel.c | 21 + server/red-channel.h | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/server/red-channel.c b/server/re

[Spice-devel] [PATCH spice 0/9] A few accumulated patches

2015-12-09 Thread Marc-André Lureau
Hi, This is a small series of patches I have accumulated in the virgl branch. They are mostly cleanups and straightforward new functions necessary to use anciallary message for fd passing. This will make reviewing the remaing series easier. Marc-André Lureau (9): build-sys: disable static lib b

[Spice-devel] [PATCH v2 spice-protocol 0/2] Add OpenGL scanout messages

2015-12-09 Thread Marc-André Lureau
Hi, This is an updated version of the protocol change proposed earlier to support virgl display locally. v1->v2: - drop the scanout region and reuse MONITOR_CONFIG instead - rename GL_SCANOUT_UPDATE -> GL_DRAW - add GL_DRAW_DONE reply message, necessary to synchronize the renderer and the clien

[Spice-devel] [PATCH v2 spice-protocol 2/2] Add unix GL scanout messages

2015-12-09 Thread Marc-André Lureau
Add 2 new messages to the display channel to stream pre-rendered GL images of the display. This is only possible when the client supports SPICE_DISPLAY_CAP_GL_SCANOUT capability. The first message, SPICE_MSG_DISPLAY_GL_SCANOUT_UNIX, sends a gl image file handle via socket ancillary data, and can b

[Spice-devel] [PATCH v2 spice-protocol 1/2] marshaller: learn to describe fd passing in messages

2015-12-09 Thread Marc-André Lureau
Add a new type, "unix_fd", used to describe file descriptor sharing via socket ancillary data (these messages are local only). The marshaller/demarshaller can't serialize this in memory (consume_fd implementation is empty), so it is the responsability of the marshaller user to handle sending and r

Re: [Spice-devel] [PATCH 9/9] server: move dispatcher GSource handling code

2015-12-09 Thread Jonathon Jongsma
On Wed, 2015-12-09 at 12:17 +, Frediano Ziglio wrote: > From: Marc-André Lureau > > Acked-by: Jonathon Jongsma Looks essentially equivalent to the previous version that I Acked, so I'll ACK it again ;) > --- > server/dispatcher.c | 25 + > server/dispatcher.h | 2

Re: [Spice-devel] [PATCH 8/9] worker: make sure we dispatch after releasing items

2015-12-09 Thread Jonathon Jongsma
Same comment as http://lists.freedesktop.org/archives/spice-devel/2015-December/024682.html "I don't really understand the reason for this patch. Why do we need to wakeup the worker immediately after a display pipe item has been released, but not a cursor item? Why can't we wait for the next work

Re: [Spice-devel] [PATCH 7/9] channel: do not free rcc->stream in red_channel_client_disconnect

2015-12-09 Thread Jonathon Jongsma
Same comments as http://lists.freedesktop.org/archives/spice-devel/2015-December/024681.html Reviewed-by: Jonathon Jongsma On Wed, 2015-12-09 at 12:17 +, Frediano Ziglio wrote: > From: Marc-André Lureau > > This fixes the following scary racy corruption after glib loop switch: > > ==281

Re: [Spice-devel] [PATCH 6/9] worker: update comment in red_process_display

2015-12-09 Thread Jonathon Jongsma
On Wed, 2015-12-09 at 12:17 +, Frediano Ziglio wrote: > From: Alon Levy > > Signed-off-by: Alon Levy > --- > server/red-worker.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/server/red-worker.c b/server/red-worker.c > index 91a116e..c6b34cf 100644 > --- a/se

Re: [Spice-devel] [PATCH 5/9] worker: do not use default context for timers

2015-12-09 Thread Jonathon Jongsma
On Wed, 2015-12-09 at 12:17 +, Frediano Ziglio wrote: > This avoid to use different thread for events. > All worker event should be attached to worker's context. > > Signed-off-by: Frediano Ziglio > --- > server/red-worker.c | 27 +++ > 1 file changed, 19 insertions(+

Re: [Spice-devel] [PATCH 4/9] worker: avoid server hanging when no client are connected.

2015-12-09 Thread Jonathon Jongsma
I've been staring at this patch for a while and I honestly can't figure out how this change would avoid the server hanging when no clients are connected. Hopefully somebody more perceptive than me can step in and review this one... On Wed, 2015-12-09 at 12:17 +, Frediano Ziglio wrote: > From:

Re: [Spice-devel] [PATCH 3/9] worker: use glib main loop

2015-12-09 Thread Jonathon Jongsma
On Wed, 2015-12-09 at 12:17 +, Frediano Ziglio wrote: > From: Marc-André Lureau > > Clean up, more extensible. > --- > server/Makefile.am | 2 - > server/red-worker.c| 357 > - > server/red-worker.h| 1 + > server/spice

Re: [Spice-devel] [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-12-09 Thread Jeremy White
I've parked some working code, and I wanted to leave a pointer to it to end this thread. That is, the sense was that usbredir was not appropriate for the linux kernel, because Intel was working on a driver implementing the Media Agnostic USB standard, and having a proliferation of drivers didn't m

[Spice-devel] [PATCH usbredir 8/9] Add the ability to use a unix domain socket and a one shot ability.

2015-12-09 Thread Jeremy White
This makes it easier to build complex test scripts on a single machine. Signed-off-by: Jeremy White --- usbredirtestserver/usbredirtestserver.c | 65 ++--- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/usbredirtestserver/usbredirtestserver.c b/usbre

[Spice-devel] [PATCH usbredir 7/9] Provide stub implementations for the missing functions.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- usbredirtestserver/usbredirtestserver.c | 89 +++-- 1 file changed, 85 insertions(+), 4 deletions(-) diff --git a/usbredirtestserver/usbredirtestserver.c b/usbredirtestserver/usbredirtestserver.c index 0bca621..53204c1 100644 --- a/usb

[Spice-devel] [PATCH usbredir 3/9] Add a script for the HP Scan Jet 4370

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- usbredirtestserver/scanjet4370.script | 63 +++ 1 file changed, 63 insertions(+) create mode 100644 usbredirtestserver/scanjet4370.script diff --git a/usbredirtestserver/scanjet4370.script b/usbredirtestserver/scanjet4370.script n

[Spice-devel] [PATCH usbredir 2/9] Expand usbredirtestserver substantially; we can now simulate a real device.

2015-12-09 Thread Jeremy White
This adds device, interface, and endpoint commands, along with fixing the ctrl command and adding a new expect ctrl command. Put all together and we can simulate the attachment of a HP Scanjet 4370. Signed-off-by: Jeremy White --- usbredirtestserver/usbredirtestserver.c | 423 ++

[Spice-devel] [PATCH usbredir 9/9] Eliminate some warnings.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- usbredirtestserver/usbredirtestserver.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usbredirtestserver/usbredirtestserver.c b/usbredirtestserver/usbredirtestserver.c index 4a071f0..81bdda2 100644 --- a/usbredirtestserver/usbredirtest

[Spice-devel] [PATCH usbredir 4/9] Pick up the incoming id so we respond correctly.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- usbredirtestserver/usbredirtestserver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usbredirtestserver/usbredirtestserver.c b/usbredirtestserver/usbredirtestserver.c index 4937fba..2539182 100644 --- a/usbredirtestserver/usbredirtestserv

[Spice-devel] [PATCH usbredir 4/5] Be sure to close files on error.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- connectkernel/connectkernel.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/connectkernel/connectkernel.c b/connectkernel/connectkernel.c index b9ed114..f45cf62 100644 --- a/connectkernel/connectkernel.c +++ b/connectkernel/c

[Spice-devel] [PATCH usbredir 3/5] Update the connectkernel man page to reflect the socket option more accurately.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- connectkernel/connectkernel.1 | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/connectkernel/connectkernel.1 b/connectkernel/connectkernel.1 index 8e5d3d5..12257b8 100644 --- a/connectkernel/connectkernel.1 +++ b/connectkernel/connectkernel

[Spice-devel] [PATCH usbredir 2/5] Revise to support a UNIX domain socket.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- connectkernel/connectkernel.c | 133 +- 1 file changed, 92 insertions(+), 41 deletions(-) diff --git a/connectkernel/connectkernel.c b/connectkernel/connectkernel.c index cf665e5..b9ed114 100644 --- a/connectkernel/connectke

[Spice-devel] [PATCH usbredir 1/9] Add a usbredirtestserver.

2015-12-09 Thread Jeremy White
This server can create a large number of dummy usbredir test devices. This is particularly useful in testing the usbredir kernel module. Signed-off-by: Jeremy White --- Makefile.am | 2 +- configure.ac| 1 + usbredirtestserver/Makefile

[Spice-devel] [PATCH usbredir 5/9] Add a goto functionality, and take advantage of it.

2015-12-09 Thread Jeremy White
We should now be able to do sane-find-scanner indefinitely. Signed-off-by: Jeremy White --- usbredirtestserver/scanjet4370.script | 12 ++ usbredirtestserver/usbredirtestserver.c | 224 +++- 2 files changed, 176 insertions(+), 60 deletions(-) diff --git a/usbredir

[Spice-devel] [PATCH usbredir 6/9] Add a few log messages.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- usbredirtestserver/usbredirtestserver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usbredirtestserver/usbredirtestserver.c b/usbredirtestserver/usbredirtestserver.c index 00c82ae..0bca621 100644 --- a/usbredirtestserver/usbredirtestserver.c +++ b/usbre

[Spice-devel] [PATCH usbredir 4/8] Have each thread signal it's death.

2015-12-09 Thread Jeremy White
This prevents a kernel panic when removing a module at exactly the right time. Signed-off-by: Jeremy White --- kernel/rx.c | 4 kernel/tx.c | 5 + 2 files changed, 9 insertions(+) diff --git a/kernel/rx.c b/kernel/rx.c index 92ffa97..16d87af 100644 --- a/kernel/rx.c +++ b/kernel/rx.c @

[Spice-devel] [PATCH usbredir 1/5] Add a connectkernel utility to support the usbredir kernel module.

2015-12-09 Thread Jeremy White
This utility will connect to a remote system running usbredirserver, and then write the socket to the sysfs attach point of usbredir, thereby injecting the remote device into the local kernel. Signed-off-by: Jeremy White --- Makefile.am | 2 +- configure.ac |

[Spice-devel] [PATCH usbredir 2/8] Add whitelists and blacklists to control access.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- kernel/main.c | 10 ++ kernel/redir.c | 34 ++ 2 files changed, 44 insertions(+) diff --git a/kernel/main.c b/kernel/main.c index cf11cbb..7b52b94 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -88,6 +88,16 @@ module_par

[Spice-devel] [PATCH usbredir 5/5] Use a named constant for buffer sizing, and check the buffer size.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- connectkernel/connectkernel.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/connectkernel/connectkernel.c b/connectkernel/connectkernel.c index f45cf62..03bd881 100644 --- a/connectkernel/connectkernel.c +++ b/connectkernel/connect

[Spice-devel] [PATCH usbredir 3/8] Add a timer to make sure that urb dequeue requests go through, one way or another.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- kernel/device.c | 42 ++ kernel/urb.c | 16 kernel/usbredir.h | 8 3 files changed, 66 insertions(+) diff --git a/kernel/device.c b/kernel/device.c index e39e264..f8d1f83 100644 --- a/kernel

[Spice-devel] [PATCH usbredir 5/8] Enable compatibility with older Linux kernels.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- kernel/hub.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/kernel/hub.c b/kernel/hub.c index 66ba64b..1c5f24d 100644 --- a/kernel/hub.c +++ b/kernel/hub.c @@ -305,6 +305,18 @@ static struct hc_driver usbredir_hc_driver = { };

[Spice-devel] [PATCH usbredir 1/8] Add a usbredir kernel module to allow redirection directly into a running Linux system.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- kernel/.gitignore | 6 + kernel/Makefile | 10 + kernel/README | 24 +++ kernel/TODO | 7 + kernel/device.c | 359 +++ kernel/hub.c | 503 + kernel/includes.c |

[Spice-devel] [PATCH usbredir 7/8] Add a make install target for the kernel module.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- kernel/Makefile | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index d14501e..dd67ac2 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -1,10 +1,21 @@ includes := -I$(PWD)/../usbredirpar

[Spice-devel] [PATCH usbredir 8/8] Create a sysconfig modules script, and install it.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- kernel/Makefile | 11 +++ kernel/usbredir.modules | 30 ++ 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 kernel/usbredir.modules diff --git a/kernel/Makefile b/kernel/Makefile index dd67ac2..481dc

[Spice-devel] [PATCH usbredir 6/8] Implement a disconnect function.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- kernel/redir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/redir.c b/kernel/redir.c index 0c71aee..26ab373 100644 --- a/kernel/redir.c +++ b/kernel/redir.c @@ -208,7 +208,8 @@ static void redir_device_connect(void *priv, static v

[Spice-devel] [PATCH usbredir 2/8] Adjust include file structure to enable kernel compilation.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- usbredirparser/strtok_r.c | 4 usbredirparser/usbredirfilter.c | 5 + usbredirparser/usbredirfilter.h | 2 ++ usbredirparser/usbredirparser.c | 8 usbredirparser/usbredirproto-compat.h | 2 ++ usbredirparser/usbredirp

[Spice-devel] [PATCH usbredir 6/8] Implement a strtol cover function.

2015-12-09 Thread Jeremy White
This allows us to use the kernel strol function to implement the cover function. Signed-off-by: Jeremy White --- usbredirparser/usbredirfilter.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/usbredirparser/usbredirfilter.c b/usbredirparser/usbredi

[Spice-devel] [PATCH usbredir 3/8] Use strtok_r with the kernel as well as Windows.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- usbredirparser/usbredirfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usbredirparser/usbredirfilter.c b/usbredirparser/usbredirfilter.c index 65d65e4..dfabacb 100644 --- a/usbredirparser/usbredirfilter.c +++ b/usbredirparser/usbredirfi

[Spice-devel] [PATCH usbredir 7/8] We cannot use abort() in the kernel.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- usbredirparser/usbredirparser.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usbredirparser/usbredirparser.c b/usbredirparser/usbredirparser.c index 991b6b8..6d8735d 100644 --- a/usbredirparser/usbredirparser.c +++ b/usbredirparser/usb

[Spice-devel] [PATCH usbredir 4/8] Do not provide the filter print utility when building for the kernel.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- usbredirparser/usbredirfilter.c | 2 ++ usbredirparser/usbredirfilter.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/usbredirparser/usbredirfilter.c b/usbredirparser/usbredirfilter.c index dfabacb..6b5310b 100644 --- a/usbredirparser/usbredirfilter.c +++

[Spice-devel] [PATCH usbredir 5/8] Use DEBUGMSG to print a debug message, as DEBUG conflicts with the kernel.

2015-12-09 Thread Jeremy White
Signed-off-by: Jeremy White --- usbredirparser/usbredirparser.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/usbredirparser/usbredirparser.c b/usbredirparser/usbredirparser.c index 366654c..991b6b8 100644 --- a/usbredirparser/usbredirparser.c +++ b/usbredirpa

[Spice-devel] [PATCH usbredir 8/8] Use a smaller buffer to Skip forward in error conditions.

2015-12-09 Thread Jeremy White
The kernel limits stack size to 2048, so using a large local variable does not work there. This only happens in error conditions, and should not make a material difference to the non kernel cases. Signed-off-by: Jeremy White --- usbredirparser/usbredirparser.c | 2 +- 1 file changed, 1 insertio

[Spice-devel] [PATCH usbredir 1/8] Abstract memory management calls.

2015-12-09 Thread Jeremy White
This allows us to compile this code for use in the kernel where we do not have libc functions available. Signed-off-by: Jeremy White --- usbredirparser/usbredirfilter.c | 11 +- usbredirparser/usbredirparser.c | 46 - usbredirparser/usbredirparser.

[Spice-devel] [PATCH usbredir 0/??] Patch series providing working usbredir kernel module

2015-12-09 Thread Jeremy White
I developed a usbredir kernel module to provide USB transport capabilities for Xspice. I started a discussion of it's value to the Linux kernel in a thread here: http://marc.info/?l=linux-usb&m=143570167111406&w=2 The ending consensus of that discussion was that an upcoming ma-usb kernel module

Re: [Spice-devel] [PATCH 2/9] server: misc header cleanups

2015-12-09 Thread Jonathon Jongsma
On Wed, 2015-12-09 at 12:17 +, Frediano Ziglio wrote: > Signed-off-by: Marc-André Lureau > Signed-off-by: Frediano Ziglio > Signed-off-by: Jonathon Jongsma > --- > server/Makefile.am | 2 ++ > server/dispatcher.h | 3 +-- > server/glz-encoder-priv.h | 2 ++ > server/gl

Re: [Spice-devel] [PATCH 1/9] server: merge spice-bitmap-utils and spice_bitmap_utils

2015-12-09 Thread Jonathon Jongsma
On Wed, 2015-12-09 at 12:17 +, Frediano Ziglio wrote: > Signed-off-by: Marc-André Lureau > Signed-off-by: Frediano Ziglio > --- > server/Makefile.am | 2 - > server/display-channel.h| 2 +- > server/spice-bitmap-utils.c | 162 ++ > server/

Re: [Spice-devel] Arbitrary resolutions on Windows 8.1

2015-12-09 Thread fabrox
On 15-12-09 12:41:16, Christophe Fergeau wrote: > Hey, > > On Tue, Dec 08, 2015 at 10:32:34PM +0100, fabrox wrote: > > I'm currently moving my virtual machines from VirtualBox to > > QEMU/KVM/Spice and even though everything is working fine so far I'm > > missing a feature that is really important

Re: [Spice-devel] [PATCH spice-gtk RFC] Call spice_marshaller_flush on message write

2015-12-09 Thread Javier Celaya
Hello El 15/09/15 a las 17:57, Christophe Fergeau escribió: Hey, On Fri, Jul 31, 2015 at 03:25:32PM +0200, Christophe Fergeau wrote: On Mon, Jul 27, 2015 at 03:06:12PM +0200, Javier Celaya wrote: spice_marshaller_flush must be called before writing a message to calculate pointer offsets. Yes

Re: [Spice-devel] [PATCH v3 2/3] stat: use a better design for statistic functions

2015-12-09 Thread Jonathon Jongsma
On Wed, 2015-12-09 at 15:58 +, Frediano Ziglio wrote: > make sure code compile with statistics enabled or disabled. > Dummy (empty) structures and functions are used instead of preprocessor. > Also fix a problem as stat_compress_init did not initialize clock > field. > > Signed-off-by: Fredian

Re: [Spice-devel] server: Use g_get_monotonic_time() to get the time in microseconds

2015-12-09 Thread Jonathon Jongsma
On Wed, 2015-12-09 at 10:45 -0500, Frediano Ziglio wrote: > > > > On Wed, 9 Dec 2015, Frediano Ziglio wrote: > > [...] > > > > > -clock_gettime(CLOCK_MONOTONIC, &time_space); > > > > > -ping.timestamp = time_space.tv_sec * 100LL + > > > > > time_space.tv_nsec / > > > > > 1000LL; > > >

Re: [Spice-devel] [PATCH v3 3/3] stat: add test for statistic functions

2015-12-09 Thread Jonathon Jongsma
On Wed, 2015-12-09 at 15:59 +, Frediano Ziglio wrote: > Make sure code compile with and without statistics enabled (beside > printing functions). > > Signed-off-by: Frediano Ziglio > --- > server/tests/.gitignore | 5 +++ > server/tests/Makefile.am | 35 > server/tests

Re: [Spice-devel] [PATCH v3 1/3] stat: fix portability problem in stat_time_t declaration

2015-12-09 Thread Jonathon Jongsma
On Wed, 2015-12-09 at 15:58 +, Frediano Ziglio wrote: > Assure stat_time_t is 64 bit on all architectures. > long is not 64 bit on 32 bit systems so use uint64_t intead. > Also avoid 32 bit overflows for such architectures. > > Signed-off-by: Frediano Ziglio > --- > server/stat.h | 4 ++-- >

[Spice-devel] [PATCH v3 1/3] stat: fix portability problem in stat_time_t declaration

2015-12-09 Thread Frediano Ziglio
Assure stat_time_t is 64 bit on all architectures. long is not 64 bit on 32 bit systems so use uint64_t intead. Also avoid 32 bit overflows for such architectures. Signed-off-by: Frediano Ziglio --- server/stat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/stat

[Spice-devel] [PATCH v3 3/3] stat: add test for statistic functions

2015-12-09 Thread Frediano Ziglio
Make sure code compile with and without statistics enabled (beside printing functions). Signed-off-by: Frediano Ziglio --- server/tests/.gitignore | 5 +++ server/tests/Makefile.am | 35 server/tests/stat-main.c | 49 server/tests/stat-test.c |

[Spice-devel] [PATCH v3 0/3] Improvements for statistic code

2015-12-09 Thread Frediano Ziglio
This is my updated patchset for statistic functions. First patch is just a fix. Second is a way to reduce preprocessor usage and reduce the need to compile with different options to get statistics right. Third is a test for third patch. Changes: - updated on new master; - change test names as re

[Spice-devel] [PATCH v3 2/3] stat: use a better design for statistic functions

2015-12-09 Thread Frediano Ziglio
make sure code compile with statistics enabled or disabled. Dummy (empty) structures and functions are used instead of preprocessor. Also fix a problem as stat_compress_init did not initialize clock field. Signed-off-by: Frediano Ziglio Reviewed-by: Jonathon Jongsma --- server/dcc.c

Re: [Spice-devel] [PATCH 13/18] display: replace some dubious asserts

2015-12-09 Thread Frediano Ziglio
> On 12/02/2015 02:02 PM, Frediano Ziglio wrote: > >> > >> On 11/27/2015 11:54 AM, Frediano Ziglio wrote: > > >>> What about: > >>> > >>> > >>> display: move checks inside display_channel_wait_for_migrate_data > >>> > >>> Instead of relaying on the caller to use > >>> red_channel_waits_for_mig

Re: [Spice-devel] server: Use g_get_monotonic_time() to get the time in microseconds

2015-12-09 Thread Frediano Ziglio
> > On Wed, 9 Dec 2015, Frediano Ziglio wrote: > [...] > > > > -clock_gettime(CLOCK_MONOTONIC, &time_space); > > > > -ping.timestamp = time_space.tv_sec * 100LL + > > > > time_space.tv_nsec / > > > > 1000LL; > > Here we convert the nanoseconds to microseconds. > > [...] > > > > -

Re: [Spice-devel] server: Use g_get_monotonic_time() to get the time in microseconds

2015-12-09 Thread Francois Gouget
On Wed, 9 Dec 2015, Frediano Ziglio wrote: [...] > > > -clock_gettime(CLOCK_MONOTONIC, &time_space); > > > -ping.timestamp = time_space.tv_sec * 100LL + time_space.tv_nsec / > > > 1000LL; Here we convert the nanoseconds to microseconds. [...] > > > -clock_gettime(CLOCK_MONOTON

Re: [Spice-devel] RFC: Time functions in Spice

2015-12-09 Thread Frediano Ziglio
> > On Sun, 2015-12-06 at 21:00 +0100, Francois Gouget wrote: > > So the Spice server has a red_get_monotonic_time() function which, as is > > the tradition, has a very similar name to a regular Glib function, > > g_get_monotonic_time(), except that one returns the time in nanoseconds > > and the

Re: [Spice-devel] server: Use g_get_monotonic_time() to get the time in microseconds

2015-12-09 Thread Frediano Ziglio
> > On Sat, Dec 5, 2015 at 1:07 PM, Francois Gouget > wrote: > > Signed-off-by: Francois Gouget > > --- > > server/main-channel.c | 8 ++-- > > 1 file changed, 2 insertions(+), 6 deletions(-) > > > > diff --git a/server/main-channel.c b/server/main-channel.c > > index 25e3868..75fea82 10064

Re: [Spice-devel] [spice-gtk] gst: Fix typo in preprocessor symbol

2015-12-09 Thread Victor Toso
On Wed, Dec 09, 2015 at 12:21:30PM +0100, Christophe Fergeau wrote: > When the GStreamer backend is used, HAVE_GSTAUDIO is defined, not > HAVE_GST_AUDIO. Acked-by: Victor Toso Thanks! > --- > src/spice-audio.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/spi

[Spice-devel] [PATCH 3/3] channel: make sure we retain RedChannelClient while processing it

2015-12-09 Thread Frediano Ziglio
During display_channel_handle_migrate_data the pointer is passed to different functions which could release it making the pointer invalid. Make sure pointer is not freed while processing. Signed-off-by: Frediano Ziglio --- server/display-channel.c | 8 ++-- server/red-channel.c | 6 ++---

[Spice-devel] [PATCH 0/3] display_channel_wait_for_migrate_data related updates

2015-12-09 Thread Frediano Ziglio
This patchset improve some function name and make sure we don't have a use-after-free usage on display_channel_wait_for_migrate_data. Frediano Ziglio (3): channel: rename red_channel_(client_)waits_* functions display: rename display_channel_wait_for_migrate_data channel: make sure we retain

[Spice-devel] [PATCH 2/3] display: rename display_channel_wait_for_migrate_data

2015-12-09 Thread Frediano Ziglio
Make it clean this function is handling data and not only checking some condition. Signed-off-by: Frediano Ziglio --- server/display-channel.c | 2 +- server/display-channel.h | 2 +- server/red-worker.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/display-c

[Spice-devel] [PATCH 1/3] channel: rename red_channel_(client_)waits_* functions

2015-12-09 Thread Frediano Ziglio
Make clear that these funcion are just checking a condition. Signed-off-by: Frediano Ziglio --- server/dcc.c | 2 +- server/display-channel.c | 4 ++-- server/red-channel.c | 8 server/red-channel.h | 4 ++-- server/reds.c| 6 +++--- server/smartcard.c

Re: [Spice-devel] Arbitrary resolutions on Windows 8.1

2015-12-09 Thread Christophe Fergeau
Hey, On Tue, Dec 08, 2015 at 10:32:34PM +0100, fabrox wrote: > I'm currently moving my virtual machines from VirtualBox to > QEMU/KVM/Spice and even though everything is working fine so far I'm > missing a feature that is really important to me and I'm used to from > VirtualBox - Automatic setting

[Spice-devel] [PATCH 8/9] worker: make sure we dispatch after releasing items

2015-12-09 Thread Frediano Ziglio
From: Marc-André Lureau --- server/display-channel.c | 2 ++ server/red-worker.c | 8 server/red-worker.h | 1 + 3 files changed, 11 insertions(+) diff --git a/server/display-channel.c b/server/display-channel.c index 32d87af..60170cb 100644 --- a/server/display-channel.c +++

[Spice-devel] [PATCH 5/9] worker: do not use default context for timers

2015-12-09 Thread Frediano Ziglio
This avoid to use different thread for events. All worker event should be attached to worker's context. Signed-off-by: Frediano Ziglio --- server/red-worker.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/server/red-worker.c b/server/red-worker.

[Spice-devel] [PATCH 6/9] worker: update comment in red_process_display

2015-12-09 Thread Frediano Ziglio
From: Alon Levy Signed-off-by: Alon Levy --- server/red-worker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/red-worker.c b/server/red-worker.c index 91a116e..c6b34cf 100644 --- a/server/red-worker.c +++ b/server/red-worker.c @@ -244,8 +244,8 @@ static int red

[Spice-devel] [PATCH 9/9] server: move dispatcher GSource handling code

2015-12-09 Thread Frediano Ziglio
From: Marc-André Lureau Acked-by: Jonathon Jongsma --- server/dispatcher.c | 25 + server/dispatcher.h | 2 ++ server/red-worker.c | 40 3 files changed, 39 insertions(+), 28 deletions(-) diff --git a/server/dispatcher.c b/serve

[Spice-devel] [PATCH 7/9] channel: do not free rcc->stream in red_channel_client_disconnect

2015-12-09 Thread Frediano Ziglio
From: Marc-André Lureau This fixes the following scary racy corruption after glib loop switch: ==28173== ==28173== Debugger has detached. Valgrind regains control. We continue. ==28173== Invalid read of size 8 ==28173==at 0x4C7871E: reds_stream_read (reds.c:4521) ==28173==by 0x4C2F9D7:

[Spice-devel] [PATCH 0/9] Backported some patches from refactory branches (9th Dec)

2015-12-09 Thread Frediano Ziglio
Changes: - removed merged patches; - updated on master; - reverted some changes on "worker: use glib main loop"; - move some fixes to "worker: use glib main loop"; - add a patch to fix "worker: use glib main loop" timeout handling; - split "worker: use glib main loop"; - make "server: merge spice

[Spice-devel] [PATCH 3/9] worker: use glib main loop

2015-12-09 Thread Frediano Ziglio
From: Marc-André Lureau Clean up, more extensible. --- server/Makefile.am | 2 - server/red-worker.c| 357 - server/red-worker.h| 1 + server/spice_timer_queue.c | 273 -- server/spice_timer_q

[Spice-devel] [PATCH 4/9] worker: avoid server hanging when no client are connected.

2015-12-09 Thread Frediano Ziglio
From: Marc-André Lureau --- server/red-worker.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/server/red-worker.c b/server/red-worker.c index 9f2aba1..a57301c 100644 --- a/server/red-worker.c +++ b/server/red-worker.c @@ -227,7 +227,6 @@ static

[Spice-devel] [PATCH 1/9] server: merge spice-bitmap-utils and spice_bitmap_utils

2015-12-09 Thread Frediano Ziglio
Signed-off-by: Marc-André Lureau Signed-off-by: Frediano Ziglio --- server/Makefile.am | 2 - server/display-channel.h| 2 +- server/spice-bitmap-utils.c | 162 ++ server/spice-bitmap-utils.h | 14 ++-- server/spice_bitmap_utils.c | 188 -

[Spice-devel] [PATCH 2/9] server: misc header cleanups

2015-12-09 Thread Frediano Ziglio
Signed-off-by: Marc-André Lureau Signed-off-by: Frediano Ziglio Signed-off-by: Jonathon Jongsma --- server/Makefile.am | 2 ++ server/dispatcher.h | 3 +-- server/glz-encoder-priv.h | 2 ++ server/glz-encoder.h| 2 +- server/memslot.c| 1 - server/red

[Spice-devel] [PATCH] server: merge spice-bitmap-utils and spice_bitmap_utils

2015-12-09 Thread Frediano Ziglio
Signed-off-by: Marc-André Lureau Signed-off-by: Frediano Ziglio --- server/Makefile.am | 2 - server/display-channel.h| 2 +- server/spice-bitmap-utils.c | 162 ++ server/spice-bitmap-utils.h | 14 ++-- server/spice_bitmap_utils.c | 188 -

Re: [Spice-devel] [client 1/3] build-sys: Allow simultaneous support for Pulse and GStreamer audio

2015-12-09 Thread Christophe Fergeau
On Wed, Dec 09, 2015 at 12:00:25PM +0100, Victor Toso wrote: > Hi, > > On Wed, Dec 09, 2015 at 11:48:11AM +0100, Christophe Fergeau wrote: > > On Wed, Dec 09, 2015 at 10:10:51AM +0100, Victor Toso wrote: > > > Hi, > > > > > > On Wed, Dec 02, 2015 at 02:54:55PM +0100, Francois Gouget wrote: > > > >

[Spice-devel] [spice-gtk] gst: Fix typo in preprocessor symbol

2015-12-09 Thread Christophe Fergeau
When the GStreamer backend is used, HAVE_GSTAUDIO is defined, not HAVE_GST_AUDIO. --- src/spice-audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spice-audio.c b/src/spice-audio.c index 550d02a..64d9bca 100644 --- a/src/spice-audio.c +++ b/src/spice-audio.c @@ -45

Re: [Spice-devel] [spice-gtk] smartcard: Fix compilation with older libcacard

2015-12-09 Thread Marc-André Lureau
ack On Wed, Dec 9, 2015 at 12:06 PM, Christophe Fergeau wrote: > e0c2182937 dropped some #include from channel-smartcard.c and spicy.c as > they were redundant with the headers already included from > spice-common/common/messages.h. While this is true for the newer > libcacard.h header, we need t

Re: [Spice-devel] [PATCH spice-gtk 3/3] Use libcacard.h if possible

2015-12-09 Thread Marc-André Lureau
Hi On Wed, Dec 9, 2015 at 9:31 AM, Victor Toso wrote: > This seems to break the build with libcacard 2.5.0 ? > Not sure why, the m4 checks looks good. I suppose it's because I removed some 2.5.0 headers includes. I should have kept them for a while. This fixes it: diff --git a/src/channel-smart

Re: [Spice-devel] [PATCH spice-gtk 3/3] Use libcacard.h if possible

2015-12-09 Thread Christophe Fergeau
On Wed, Dec 09, 2015 at 09:31:11AM +0100, Victor Toso wrote: > Hi, > > On Mon, Nov 30, 2015 at 11:06:05PM +0100, Marc-André Lureau wrote: > > Drop unneeded includes (that are already undirectly included). > > > > Signed-off-by: Marc-André Lureau > > --- > > src/channel-smartcard.c | 4 > >

[Spice-devel] [spice-gtk] smartcard: Fix compilation with older libcacard

2015-12-09 Thread Christophe Fergeau
e0c2182937 dropped some #include from channel-smartcard.c and spicy.c as they were redundant with the headers already included from spice-common/common/messages.h. While this is true for the newer libcacard.h header, we need to include more headers to support older libcacard, or compilation breaks.

Re: [Spice-devel] [client 1/3] build-sys: Allow simultaneous support for Pulse and GStreamer audio

2015-12-09 Thread Victor Toso
Hi, On Wed, Dec 09, 2015 at 11:48:11AM +0100, Christophe Fergeau wrote: > On Wed, Dec 09, 2015 at 10:10:51AM +0100, Victor Toso wrote: > > Hi, > > > > On Wed, Dec 02, 2015 at 02:54:55PM +0100, Francois Gouget wrote: > > > Rather than GStreamer/PulseAudio backend being mutually exclusive at > > > c

Re: [Spice-devel] [client 1/3] build-sys: Allow simultaneous support for Pulse and GStreamer audio

2015-12-09 Thread Christophe Fergeau
On Wed, Dec 09, 2015 at 10:10:51AM +0100, Victor Toso wrote: > Hi, > > On Wed, Dec 02, 2015 at 02:54:55PM +0100, Francois Gouget wrote: > > Rather than GStreamer/PulseAudio backend being mutually exclusive at > > compile-time, this commit allows to enable both at the same time. > > PulseAudio will

Re: [Spice-devel] [PATCH qemu 1/2] add the ability to specify Spice keepalive

2015-12-09 Thread Christophe Fergeau
On Tue, Dec 08, 2015 at 06:55:14PM +0100, Christophe Fergeau wrote: > This is similar to what is done for the disabling of file transfer, but > I'm not sure this is good enough for libvirt support. Maybe they will > prefer that -spice keepalive-timeout does not appear in qemu -help when > support w

Re: [Spice-devel] [PATCH] spicevmc: Drop unsent data on client disconnection

2015-12-09 Thread Christophe Fergeau
Hi, On Wed, Dec 09, 2015 at 08:39:33AM +0100, Victor Toso wrote: > On Tue, Dec 08, 2015 at 11:23:36AM -0600, Jonathon Jongsma wrote: > > Hi Christophe, > > > > I just ran across this patch while looking through some bugs and noticed > > that it > > doesn't seem to ever have gone upstream. Is it s

Re: [Spice-devel] [client 1/3] build-sys: Allow simultaneous support for Pulse and GStreamer audio

2015-12-09 Thread Victor Toso
Hi, On Wed, Dec 02, 2015 at 02:54:55PM +0100, Francois Gouget wrote: > Rather than GStreamer/PulseAudio backend being mutually exclusive at > compile-time, this commit allows to enable both at the same time. > PulseAudio will then be favoured, with a fallback to GStreamer if it's > not available.

Re: [Spice-devel] [PATCH spice-gtk 3/3] Use libcacard.h if possible

2015-12-09 Thread Victor Toso
Hi, On Mon, Nov 30, 2015 at 11:06:05PM +0100, Marc-André Lureau wrote: > Drop unneeded includes (that are already undirectly included). > > Signed-off-by: Marc-André Lureau > --- > src/channel-smartcard.c | 4 > src/smartcard-manager.c | 6 +- > src/spicy.c | 5 - > 3 fi