Re: [Spice-devel] Closing gitlab spice mirror

2018-07-11 Thread Christophe Fergeau
On Tue, Jul 10, 2018 at 06:00:29PM +0200, Victor Toso wrote: > Hi, > > Similarly to closing github spice mirror [0], I'd like to propose > closing the gitlab.com/spice one now that we have a gitlab > instance in gitlab.freedesktop.org > > [0]

Re: [Spice-devel] [PATCH spice-protocol] qxl_dev: Align QXLRam to 4 bytes

2018-07-10 Thread Christophe Fergeau
On Tue, Jul 10, 2018 at 06:28:34AM -0400, Frediano Ziglio wrote: > > > > On Mon, Jul 09, 2018 at 04:48:46AM -0400, Frediano Ziglio wrote: > > > > > > > > On Tue, Jul 03, 2018 at 11:38:56AM -0400, Frediano Ziglio wrote: > > > > > > > > > > > > On Thu, Jun 28, 2018 at 09:43:47PM +0100, Frediano

Re: [Spice-devel] [PATCH spice-protocol] qxl_dev: Align QXLRam to 4 bytes

2018-07-10 Thread Christophe Fergeau
On Mon, Jul 09, 2018 at 04:48:46AM -0400, Frediano Ziglio wrote: > > > > On Tue, Jul 03, 2018 at 11:38:56AM -0400, Frediano Ziglio wrote: > > > > > > > > On Thu, Jun 28, 2018 at 09:43:47PM +0100, Frediano Ziglio wrote: > > > > > This avoids compilers detect misaligned access. > > > > > > > >

Re: [Spice-devel] [PATCH spice-common] tests: Join test-overflow and test-marshallers

2018-07-10 Thread Christophe Fergeau
On Tue, Jul 10, 2018 at 04:51:35AM -0400, Frediano Ziglio wrote: > > > > On Tue, Jul 10, 2018 at 07:21:50AM +0100, Frediano Ziglio wrote: > > > test-overflow was doing a specific test on demarshalling code. > > > Joining the 2 tests also allows to remove the dependency from the main > > >

[Spice-devel] [spice-common v2 01/15] quic: Add UPDATE_MODEL_COMP macro to iterate over channels

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_rgb_tmpl.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/common/quic_rgb_tmpl.c b/common/quic_rgb_tmpl.c index e0a05ca..2e76645 100644 --- a/common

[Spice-devel] [spice-common v2 02/15] quic: Rework PIXEL_A/PIXEL_B macros

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio This makes them identical to their counterparts in quic_rgb_tmpl.c Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_tmpl.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/quic_tmpl.c b/common

[Spice-devel] [spice-common v2 08/15] quic: Add APPLY_ALL_COMP macro to iterate over channels

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio Use a APPLY_ALL_COMP macro to unify single/multiple channel processing. Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_rgb_tmpl.c | 58 +- common/quic_tmpl.c | 30 -- 2

[Spice-devel] [spice-common v2 04/15] quic: Make {UN, }COMPRESS_xx macros closer

2018-07-10 Thread Christophe Fergeau
), and call it with COMPRESS(a) Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_tmpl.c | 141 +++-- 1 file changed, 71 insertions(+), 70 deletions(-) diff --git a/common/quic_tmpl.c b/common/quic_tmpl.c index 3087466..9a991cd

[Spice-devel] [spice-common v2 03/15] quic: Add SAME_PIXEL macro

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio This helps making the code in quic_tmpl.c and quic_rgb_tmpl.c more similar. Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_tmpl.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common/quic_tmpl.c b/common

[Spice-devel] [spice-common v2 07/15] quic: Add CORRELATE*/DECORRELATE* macros

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio This will help to unify quic_tmpl.c and quic_rgb_tmpl.c Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_tmpl.c | 44 +--- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/common

[Spice-devel] [spice-common v2 12/15] quic: Introduce COPY_PIXEL macro

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio Define and reuse a COPY_PIXEL macro to copy a pixel. This will help in making quic_tmpl.c and quic_rgb_tmpl.c identical. Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_rgb_tmpl.c | 9 ++--- common/quic_tmpl.c | 5 - 2 files

[Spice-devel] [spice-common v2 09/15] quic: Wrap declaration/call of quic method in macros

2018-07-10 Thread Christophe Fergeau
This allows to pass an additional 'channel' argument when needed, and should eventually let us unify quic_tmpl.c and quic_rgb_tmpl.c Signed-off-by: Christophe Fergeau --- common/quic_rgb_tmpl.c | 122 --- common/quic_tmpl.c | 126

[Spice-devel] [spice-common v2 13/15] quic: Reorder macro declarations

2018-07-10 Thread Christophe Fergeau
was not there before. The next commit will unify the macro declarations and #undef. Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_rgb_tmpl.c | 53 +++-- common/quic_tmpl.c | 75 +- 2 files changed

[Spice-devel] [spice-common v2 06/15] quic: Call directly encode_state_run from templates.

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic.c | 21 - common/quic_rgb_tmpl.c | 6 +++--- common/quic_tmpl.c | 6 +++--- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/common/quic.c b

[Spice-devel] [spice-common v2 15/15] quic: Remove duplicate file

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio Now that the 2 template files are the same (except for whitespace differences), we can use a single file. Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/Makefile.am | 1 - common/quic.c | 8 +- common/quic_rgb_tmpl.c | 669

[Spice-devel] [spice-common v2 10/15] quic: Move all golomb decoding macros in a single place

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_rgb_tmpl.c | 42 +- common/quic_tmpl.c | 17 ++--- 2 files changed, 27 insertions(+), 32 deletions(-) diff --git a/common

[Spice-devel] [spice-common v2 11/15] quic: Add DECLARE_*_VARIABLES macros

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio They will help unify quic_rgb_tmpl.c and quic_tmpl.c Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_rgb_tmpl.c | 59 -- common/quic_tmpl.c | 34 ++-- 2 files changed, 44

[Spice-devel] [spice-common v2 14/15] quic: Unify rgb/non-rgb macro declarations

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio This commit adds a common block of macro declarations at the top of quic_tmpl.c and quic_rgb_tmpl.c. This block is identical between the 2 files, and is one big step towards making the 2 files identical. Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau

[Spice-devel] [spice-common v2 00/15] quic: Unify templates

2018-07-10 Thread Christophe Fergeau
Hey, This is the v2 of the patches sent by Frediano, split/reordered with better commit logs. The only new patch is 09/15 "quic: Wrap declaration/call of quic method in" which replaces the CHANNEL_ CHANNEL_ARGS_ macros which were in the initial series. Christophe

[Spice-devel] [spice-common v2 05/15] quic: Add missing #undef SET_a/GET_a

2018-07-10 Thread Christophe Fergeau
From: Frediano Ziglio These macros were added to quic_tmpl.c in 815223861 but without the corresponding #undef. This commit adds them for consistency. Signed-off-by: Frediano Ziglio Signed-off-by: Christophe Fergeau --- common/quic_tmpl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [Spice-devel] [PATCH spice-common v2] meson: Remove -std=c99

2018-07-10 Thread Christophe Fergeau
ly add flags to support C99 when needed. > For instance some Posix limitations changes (like _POSIX_OPEN_MAX). > As compiler feature for instance _Static_assert is not used. Acked-by: Christophe Fergeau though I'm starting to miss the various convenience macros we had in autoconf ;) "I wa

Re: [Spice-devel] [PATCH spice-common] tests: Join test-overflow and test-marshallers

2018-07-10 Thread Christophe Fergeau
On Tue, Jul 10, 2018 at 07:21:50AM +0100, Frediano Ziglio wrote: > test-overflow was doing a specific test on demarshalling code. > Joining the 2 tests also allows to remove the dependency from the main > protocol allowing to run the test independently from generation setting. > This is useful

Re: [Spice-devel] [PATCH spice-common] meson: Disable -std=c99

2018-07-09 Thread Christophe Fergeau
On Mon, Jul 09, 2018 at 05:41:42AM -0400, Frediano Ziglio wrote: > > > > In the shortlog, s/disable/remove/ > > > > I'll update > > > On Mon, Jul 09, 2018 at 09:04:07AM +0100, Frediano Ziglio wrote: > > > This flag disable some compiler feature which is used by some > > > system header

Re: [Spice-devel] [PATCH spice-common] meson: Disable -std=c99

2018-07-09 Thread Christophe Fergeau
In the shortlog, s/disable/remove/ On Mon, Jul 09, 2018 at 09:04:07AM +0100, Frediano Ziglio wrote: > This flag disable some compiler feature which is used by some > system header potentially introducing some limitations. > Autotools does not set this flag. Autotools checks whether this flag is

[Spice-devel] [spice-common 1/2] pixman: Use g_error() rather than g_abort()

2018-07-06 Thread Christophe Fergeau
g_abort() was only added in glib 2.50, which causes meson build failures since this defines GLIB_VERSION_MIN_REQUIRED/GLIB_VERSION_MAX_ALLOWED Signed-off-by: Christophe Fergeau --- common/pixman_utils.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common

[Spice-devel] [spice-common 2/2] build: Define GLIB_VERSION_MIN_REQUIRED/GLIB_VERSION_MAX_ALLOWED

2018-07-06 Thread Christophe Fergeau
This is defined for the meson build, but not the autotools build. This commit makes them consistent. Signed-off-by: Christophe Fergeau --- m4/spice-deps.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4 index 61290fe..1721d34 100644 --- a/m4/spice

Re: [Spice-devel] [PATCH spice-common] meson: Do not define -DGLIB_VERSION_MAX_ALLOWED

2018-07-06 Thread Christophe Fergeau
Ok, g_abort() is only available in 2.50, and only the meson build uses GLIB_VERSION_MAX_ALLOWED. However, since this can be useful, I'd prefer that we keep GLIB_VERSION_MAX_ALLOWED, and add it to the autotools build. This specific issue can be fixed by using g_error() instead of g_abort(). I'll

[Spice-devel] [spice-server] tests: Add G_PID_FORMAT to glib compat header

2018-07-06 Thread Christophe Fergeau
G_PID_FORMAT was only added in glib 2.50. Signed-off-by: Christophe Fergeau --- server/tests/replay.c | 1 + server/tests/test-glib-compat.h | 9 + 2 files changed, 10 insertions(+) diff --git a/server/tests/replay.c b/server/tests/replay.c index 40fd10b69..bd9420b8c 100644

Re: [Spice-devel] [PATCH spice-common v2] canvas_base: Avoid misaligned access decoding LZ4 data

2018-07-05 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, Jul 04, 2018 at 04:27:11PM +0100, Frediano Ziglio wrote: > Make code faster on platforms not supporting unaligned access by > default. > SPICE_UNALIGNED_CAST is just silencing possible alignment warning and, > if enabled, produces some l

Re: [Spice-devel] Cannot send email to spice-devel-request address

2018-07-05 Thread Christophe Fergeau
Hey, On Wed, Jul 04, 2018 at 04:31:45PM -0500, Carlos González wrote: > Every attempt to send to such address results in the following error from > the SMTP server: > 550 5.1.1 : Recipient address > rejected: User unknown in local recipient table > > This same issue happened back when trying to

Re: [Spice-devel] [PATCH spice-common] canvas_base: Fix minor indentation issues

2018-07-05 Thread Christophe Fergeau
Sure, Acked-by: Christophe Fergeau On Wed, Jul 04, 2018 at 05:23:52PM +0100, Frediano Ziglio wrote: > This patch just changes some spaces fixing some possible misleading > indentation. > > Signed-off-by: Frediano Ziglio > --- > common/canvas_base.c | 4 ++-- > 1 file

Re: [Spice-devel] SPICE logging facilities

2018-07-05 Thread Christophe Fergeau
On Wed, Jul 04, 2018 at 12:29:15PM -0400, Frediano Ziglio wrote: > > > > On Wed, Jul 04, 2018 at 11:38:14AM -0400, Frediano Ziglio wrote: > > > Another question is however "Are we going to use g_critical as > > > g_critical?". It sounds a tricky question. Let say that a new person > > > starts to

Re: [Spice-devel] SPICE logging facilities

2018-07-04 Thread Christophe Fergeau
On Wed, Jul 04, 2018 at 11:38:14AM -0400, Frediano Ziglio wrote: > Another question is however "Are we going to use g_critical as > g_critical?". It sounds a tricky question. Let say that a new person > starts to look at the code and knows GLib. He see g_critical and > think "well, this by default

[Spice-devel] [spice-server] red-parse-qxl: Change license header to LGPLv2+

2018-07-04 Thread Christophe Fergeau
-by: Christophe Fergeau --- server/red-record-qxl.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/red-record-qxl.h b/server/red-record-qxl.h index 50bd7b731..d19843279 100644 --- a/server/red-record-qxl.h +++ b/server/red-record-qxl.h @@ -2,18 +2,18

Re: [Spice-devel] [spice-common v2 3/3] meson: Remove '(default: xxx)' from option description

2018-07-04 Thread Christophe Fergeau
On Wed, Jul 04, 2018 at 09:39:55AM -0300, Eduardo Lima (Etrunko) wrote: > On 06/06/18 09:00, Christophe Fergeau wrote: > > On Wed, Jun 06, 2018 at 07:26:23AM -0400, Frediano Ziglio wrote: > >>> > >>> 'meson configure' will show the current value of an option, s

Re: [Spice-devel] SCSI disk driver

2018-07-04 Thread Christophe Fergeau
Hey, On Tue, Jul 03, 2018 at 10:23:30AM -0500, Carlos González wrote: > Apologies beforehand if it's a bit offtopic; not sure what place would be > more suitable... > > Regarding storage devices, Proxmox wiki mentions that SCSI virtio driver is > in its way to replace current virtio block

Re: [Spice-devel] [PATCH spice-common] canvas_base: Avoid misaligned access decoding LZ4 data

2018-07-04 Thread Christophe Fergeau
On Tue, Jul 03, 2018 at 11:28:41AM -0400, Frediano Ziglio wrote: > > > > On Thu, Jun 28, 2018 at 07:40:19AM +0100, Frediano Ziglio wrote: > > > Make code faster on platforms not supporting unaligned access > > > by default. > > > > How does this work exactly? Rather than silencing the warning

Re: [Spice-devel] [PATCH spice-protocol] qxl_dev: Align QXLRam to 4 bytes

2018-07-04 Thread Christophe Fergeau
On Tue, Jul 03, 2018 at 11:38:56AM -0400, Frediano Ziglio wrote: > > > > On Thu, Jun 28, 2018 at 09:43:47PM +0100, Frediano Ziglio wrote: > > > This avoids compilers detect misaligned access. > > > > Maybe "This helps some compilers to realize QXLRam is correctly aligned"? > > > > Well, the

Re: [Spice-devel] SPICE logging facilities

2018-07-04 Thread Christophe Fergeau
On Tue, Jul 03, 2018 at 05:10:23PM +0200, Christophe de Dinechin wrote: > There is a lot of debate, distributed across a large number of patches, > regarding similar SPICE and glib facilities. For a number of things, there > are two sets of parallel APIs with slightly different behaviour. This

Re: [Spice-devel] [PATCH spice-common 0/6] quic: Unify the 2 template files

2018-07-04 Thread Christophe Fergeau
On Tue, Jul 03, 2018 at 04:59:12PM -0500, Jonathon Jongsma wrote: > On Thu, 2018-06-28 at 14:23 +0100, Frediano Ziglio wrote: > > QUIC is implemented using 2 C template files. > > One for single channel and one for multiple (RGB) channels. > > Unify the 2 templates to have a single source. > > >

Re: [Spice-devel] [PATCH] Avoid NULL-dereference if canvas_get_image errors out

2018-07-04 Thread Christophe Fergeau
On Wed, Jul 04, 2018 at 09:22:40AM +0200, Christophe de Dinechin wrote: > > If that's what > > you want, I would not bother with the cleanups. > > I want spice_ctitical because that’s what is being used in the file > today (irrespective of what I may otherwise think about the incredibly >

Re: [Spice-devel] [PATCH spice-protocol] qxl_dev: Align QXLRam to 4 bytes

2018-07-03 Thread Christophe Fergeau
On Thu, Jun 28, 2018 at 09:43:47PM +0100, Frediano Ziglio wrote: > This avoids compilers detect misaligned access. Maybe "This helps some compilers to realize QXLRam is correctly aligned"? > The structure is allocated at the beginning of a page so surely > will be 4 bytes aligned. Not

Re: [Spice-devel] [PATCH spice-common] canvas_base: Avoid misaligned access decoding LZ4 data

2018-07-03 Thread Christophe Fergeau
On Thu, Jun 28, 2018 at 07:40:19AM +0100, Frediano Ziglio wrote: > Make code faster on platforms not supporting unaligned access > by default. How does this work exactly? Rather than silencing the warning with SPICE_UNALIGNED_CAST, and then potentially dereferencing a non-aligned 32 bit value,

Re: [Spice-devel] Recommended place to get drivers

2018-07-03 Thread Christophe Fergeau
On Tue, Jul 03, 2018 at 09:47:38AM -0500, Carlos González wrote: > Thanks yet again. > > https://lists.freedesktop.org/archives/spice-devel/2018-June/044236.html > If this patch makes it to release, which win-virtio ISO branch is it > normally put in? "Latest"? I don't know how Cole handles

Re: [Spice-devel] [PATCH] Avoid NULL-dereference if canvas_get_image errors out

2018-07-03 Thread Christophe Fergeau
On Tue, Jul 03, 2018 at 04:31:10PM +0200, Christophe de Dinechin wrote: > I think we never had a discussion of what we really want in each case, and > that’s causing the confusion. > > First, a meta-rule. Like you, there is a lot in SPICE code I don’t > like. When in doubt, I try to use

[Spice-devel] [spice-common] swcanvas: Remove canvas_create()

2018-07-03 Thread Christophe Fergeau
Nothing calls it in spice-gtk or spice-server Signed-off-by: Christophe Fergeau --- common/sw_canvas.c | 26 -- common/sw_canvas.h | 11 --- 2 files changed, 37 deletions(-) diff --git a/common/sw_canvas.c b/common/sw_canvas.c index c41edb1..c5528c2 100644

Re: [Spice-devel] [PATCH] Avoid NULL-dereference if canvas_get_image errors out

2018-07-03 Thread Christophe Fergeau
On Tue, Jul 03, 2018 at 03:51:58PM +0200, Christophe Fergeau wrote: > > Depending on context, it may. So what? Are you suggesting to do something > > else? > > if (d == NULL) { > abort(); > free(d); (obviously not 'd' here, but free(something);) Christophe s

Re: [Spice-devel] [PATCH] Avoid NULL-dereference if canvas_get_image errors out

2018-07-03 Thread Christophe Fergeau
On Tue, Jul 03, 2018 at 03:16:19PM +0200, Christophe de Dinechin wrote: > >> diff --git a/common/canvas_base.c b/common/canvas_base.c > >> index 6bf6e5d..bbaaf96 100644 > >> --- a/common/canvas_base.c > >> +++ b/common/canvas_base.c > >> @@ -3072,6 +3072,7 @@ static void

Re: [Spice-devel] [PATCH spice-server v2] red-parse-qxl: Avoid invalid flag usage

2018-07-03 Thread Christophe Fergeau
is > + * command so reset it. */ > +red_drawable->self_bitmap = false; Looks to me, ideally we could warn once when this is unexpectedly set, but we are missing helpers for that at the moment. Looks good otherwise, Acked-by: Christophe Fergeau Christophe > + > +

Re: [Spice-devel] [PATCH spice-common v3] lz: Avoid buffer reading overflow checking for image type

2018-07-03 Thread Christophe Fergeau
Hey, On Tue, Jun 26, 2018 at 10:31:00AM +0100, Frediano Ziglio wrote: > The type of the image is just copied from network without > any check and later used for array indexing. Have you considered something like this? This way we can be sure no code can overflow the IS_IMAGE_TYPE_PLT[] array.

Re: [Spice-devel] [PATCH spice-common] test-marshallers: Check for "zero" attribute

2018-07-03 Thread Christophe Fergeau
Acked-by: Christophe Fergeau (when reverting this commit, compilation of the test case fails, with this commit in, the test case succeeds) Christophe On Thu, Jun 28, 2018 at 07:40:20AM +0100, Frediano Ziglio wrote: > Check the previous fix for "zero" attribute works correc

Re: [Spice-devel] [PATCH spice-server v3] memslot: Remove error parameter from memslot_get_virt

2018-07-03 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Jul 03, 2018 at 11:24:03AM +0100, Frediano Ziglio wrote: > Pointers to memory allocated in user space are never NULL. > The only exception can be if you explicitly map memory at zero. > There is however no reasons for such requirement and this

[Spice-devel] [spice-common v2 3/3] build: Remove spice_common.h

2018-07-03 Thread Christophe Fergeau
Most users of spice_common.h don't need it, or only need log.h. It only has a few users outside of spice-common. It's not very well defined which headers it should contain. This commit removes spice_common.h in favour of direct inclusion of the needed headers. Signed-off-by: Christophe Fergeau

[Spice-devel] [spice-common v2 1/3] log: Remove SPICE_DISABLE_ABORT

2018-07-03 Thread Christophe Fergeau
spice-gtk was the last user, and stopped using it on Jun 14th 2017 in 040090ccba34 "build-sys: remove -DSPICE_DISABLE_ABORT" Signed-off-by: Christophe Fergeau --- common/log.c | 4 common/spice_common.h | 4 tests/test-logging.c | 14 ++ 3 files

[Spice-devel] [spice-common v2 2/3] common: Remove spice_abort()

2018-07-03 Thread Christophe Fergeau
There are only 2 users in spice-common, and none in spice-gtk/spice Signed-off-by: Christophe Fergeau --- common/pixman_utils.c | 4 ++-- common/spice_common.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/common/pixman_utils.c b/common/pixman_utils.c index 81806c9

[Spice-devel] [spice-server] build: Remove unneeded spice_common.h includes

2018-07-03 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/dispatcher.c | 1 - server/red-common.h | 1 - 2 files changed, 2 deletions(-) diff --git a/server/dispatcher.c b/server/dispatcher.c index 0953db875..48dc915a6 100644 --- a/server/dispatcher.c +++ b/server/dispatcher.c @@ -26,7 +26,6 @@ #include

Re: [Spice-devel] [PATCH] Avoid NULL-dereference if canvas_get_image errors out

2018-07-03 Thread Christophe Fergeau
On Fri, Jun 29, 2018 at 05:21:22PM +0200, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > In some error cases, canvas_get_image may return NULL. > When this happens, calls like pixman_image_get_width(s) > will crash. Add additional error paths to deal with > these cases. I

[Spice-devel] [spice-common] log: Remove SPICE_DISABLE_ABORT

2018-07-03 Thread Christophe Fergeau
spice-gtk was the last user, and stopped using it in 90ccba34 "build-sys: remove -DSPICE_DISABLE_ABORT" Signed-off-by: Christophe Fergeau --- common/log.c | 4 common/spice_common.h | 4 tests/test-logging.c | 14 ++ 3 files changed, 2 inserti

Re: [Spice-devel] [PATCH spice-server 2/3] test-codecs-parsing: Add test case

2018-07-03 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, Jun 27, 2018 at 08:00:36AM +0100, Frediano Ziglio wrote: > Check if encoder contains an invalid character. > > Signed-off-by: Frediano Ziglio > --- > server/tests/test-codecs-parsing.c | 6 ++ > 1 file changed, 6 insertions(+) >

Re: [Spice-devel] [PATCH spice-server 3/3] reds: Fix one case parsing invalid codec string

2018-07-03 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, Jun 27, 2018 at 08:00:37AM +0100, Frediano Ziglio wrote: > In case we pass something like "spice:mjpeg$%*" the last part is > ignore making the string parse correctly. > A single pair should end by either string terminator or pair terminat

Re: [Spice-devel] Recommended place to get drivers

2018-07-03 Thread Christophe Fergeau
On Mon, Jul 02, 2018 at 01:20:39PM -0500, Carlos González wrote: > https://lists.freedesktop.org/archives/spice-devel/2018-June/044237.html > I just read spice-server thing is actually a hypervisor part. So if this > patch makes it to release, what would I need to update in order to test? > All

Re: [Spice-devel] Recommended place to get drivers

2018-07-02 Thread Christophe Fergeau
On Fri, Jun 29, 2018 at 06:25:23PM -0500, Carlos González wrote: > 2018-06-29 10:34 GMT-05:00 Christophe Fergeau : > > > The way things flow are individual driver releases/builds (eg the > > qxl-wddm-dod build you found on spice-space.org), then they are gathered > > in t

Re: [Spice-devel] [PATCH spice-gtk] Replace spice_printerr() with g_warning()

2018-07-02 Thread Christophe Fergeau
e replaced with g_warning() so > > > that users of spice-server can redirect them with > > > g_log_set_default_handler(). > > > > Maybe squash this in? > > > > Either way, Acked-by: Christophe Fergeau > > > > I can do a follow up but IMO they don't see

Re: [Spice-devel] [PATCH spice-common] log: Remove spice_printerr macro

2018-06-29 Thread Christophe Fergeau
Once the spice-gtk patch is in, Acked-by: Christophe Fergeau On Thu, Jun 28, 2018 at 04:42:25PM +0100, Frediano Ziglio wrote: > All usages of this macro were removed. > A library should not log to standard error but use log facilities > so remove this macro to avoid possible fut

Re: [Spice-devel] [PATCH spice-gtk] Replace spice_printerr() with g_warning()

2018-06-29 Thread Christophe Fergeau
er(). Maybe squash this in? Either way, Acked-by: Christophe Fergeau diff --git a/src/channel-display.c b/src/channel-display.c index 44ba0439..1c28aed1 100644 --- a/src/channel-display.c +++ b/src/channel-display.c @@ -1211,7 +1211,7 @@ static void report_invalid_stream(SpiceChannel *channel,

Re: [Spice-devel] Recommended place to get drivers

2018-06-29 Thread Christophe Fergeau
On Thu, Jun 28, 2018 at 01:42:40PM -0500, Carlos González wrote: > First thanks all for helping in my previous thread. > Since last answers were posted under a different thread title, I realized I > did make a mistake in trying to mix different topics in a single thread. > Sorry. > > Back to

Re: [Spice-devel] [spice-server 3/4] docs: Add documentation for the streaming device

2018-06-29 Thread Christophe Fergeau
On Wed, Jun 27, 2018 at 10:37:29AM -0500, Jonathon Jongsma wrote: > Quick review from a native english speaker, as Frediano suggested. Thanks a lot! I've adjusted the patch following your comments! Christophe signature.asc Description: PGP signature

[Spice-devel] [spice-server] test-agent-msg-filter: Adjust for recent logging changes

2018-06-28 Thread Christophe Fergeau
Now warnings are printed through g_warning which causes the test to fail. We need to use g_test_expect_message() to prevent that failure. Signed-off-by: Christophe Fergeau --- server/tests/test-agent-msg-filter.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/server/tests/test

Re: [Spice-devel] [PATCH spice-common 1/2] build: Reuse TEST_MARSHALLERS macro

2018-06-28 Thread Christophe Fergeau
For the 2 patches, Acked-by: Christophe Fergeau On Thu, Jun 28, 2018 at 08:14:01AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > tests/Makefile.am | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/tests/Makefile.am b

[Spice-devel] [spice-server 3/4] Replace remaining spice_printerr() with g_warning()

2018-06-28 Thread Christophe Fergeau
The remaining occurrences of spice_printerr() are warnings when something unexpected happens, they can be replaced with g_warning() so that users of spice-server can redirect them with g_log_set_default_handler(). --- server/agent-msg-filter.c | 8 server/char-device.c| 8

[Spice-devel] [spice-server 1/4] Remove unneeded spice_printerr() calls

2018-06-28 Thread Christophe Fergeau
These calls seem to have been added for debugging for a very specific purpose. At the very least, they should have been using g_debug() rather than spice_printerr(). This commit removes these. --- server/char-device.c | 1 - server/inputs-channel.c | 2 --

[Spice-devel] [spice-server 2/4] Replace spice_printerr() use with red_channel_{debug, warning}

2018-06-28 Thread Christophe Fergeau
Depending on the context, we want to output a warning or just a debug log. --- server/dcc.c | 6 +++-- server/inputs-channel-client.c| 3 ++- server/inputs-channel.c | 6 ++--- server/main-channel-client.c | 42 ++-

[Spice-devel] [spice-server 4/4] qxl: Remove red_channel_printerr()

2018-06-28 Thread Christophe Fergeau
It was only used twice, for what looks like adhoc debugging. This commit removes it, similarly to what was done for some spice_printerr() calls. --- server/red-channel.h | 3 --- server/red-qxl.c | 4 2 files changed, 7 deletions(-) diff --git a/server/red-channel.h

[Spice-devel] [spice-common] snd: Replace spice_printerr() use with g_warning

2018-06-28 Thread Christophe Fergeau
This allows users of the library to redirect where these messages go through use of g_log_set_default_handler() rather than unconditionally printing on stderr. Signed-off-by: Christophe Fergeau --- Let's first address spice-common use of spice_printerr, more patches will be coming for spice

Re: [Spice-devel] [PATCH spice-server 1/2] fixup! sound: Don't mute recording when client reconnects

2018-06-27 Thread Christophe Fergeau
Yup, integrated something similar already, forgot to resend. Christophe On Wed, Jun 27, 2018 at 03:46:38PM +0100, Frediano Ziglio wrote: > Style: > - split long lines; > - remove space between function and parameters. > --- > server/sound.c | 10 ++ > 1 file changed, 6 insertions(+), 4

[Spice-devel] [spice-server v3] sound: Don't mute recording when client reconnects

2018-06-27 Thread Christophe Fergeau
and RecordChannelClient implement GInitable, and move the code interacting with the client in their _initable_init() function, as at this point the objects will be able to send data. https://bugzilla.redhat.com/show_bug.cgi?id=1549132 Signed-off-by: Christophe Fergeau --- server/sound.c | 62

[Spice-devel] [spice-common 2/2] test-region: Don't call region_dump() by default

2018-06-27 Thread Christophe Fergeau
This prints to stdout, which is not desirable in an automated test. Signed-off-by: Christophe Fergeau --- tests/test-region.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/test-region.c b/tests/test-region.c index a5a5351..b7f5a22

[Spice-devel] [spice-common 1/2] test-region: Replace direct printf with g_debug() calls

2018-06-27 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- tests/test-region.c | 106 ++-- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/tests/test-region.c b/tests/test-region.c index 5a00cce..a5a5351 100644 --- a/tests/test-region.c +++ b/tests/test

Re: [Spice-devel] [PATCH spice-server 1/3] Add support for building with meson

2018-06-27 Thread Christophe Fergeau
On Wed, Jun 27, 2018 at 06:15:55AM -0400, Frediano Ziglio wrote: > > > > On Mon, Jun 18, 2018 at 12:04:18PM -0400, Frediano Ziglio wrote: > > > Not much replies to this specific patch, but I agree was better to > > > integrate dependencies (spice-protocol and spice-common) projects > > > first. >

Re: [Spice-devel] [spice-common v3 3/6] test-region: Replace direct printf with g_debug() calls

2018-06-27 Thread Christophe Fergeau
On Wed, Jun 27, 2018 at 06:04:16AM -0400, Frediano Ziglio wrote: > > > > Signed-off-by: Christophe Fergeau > > --- > > common/region.c | 28 ++-- > > tests/test-region.c | 106 ++-- > > 2 files cha

[Spice-devel] [spice-common v3 6/6] test-region: Add g_assert() checks

2018-06-27 Thread Christophe Fergeau
At the moment, test success/failure is only printed to stdout. This commit adds some g_assert() so that test failures can be automatically detected. --- tests/test-region.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tests/test-region.c

[Spice-devel] [spice-common v3 2/6] test-region: Use GTest API

2018-06-27 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- tests/test-region.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/test-region.c b/tests/test-region.c index 38b3203..5a00cce 100644 --- a/tests/test-region.c +++ b/tests/test-region.c @@ -127,7 +127,7 @@ enum

[Spice-devel] [spice-common v3 1/6] test-region: Create proper test for region from source code

2018-06-27 Thread Christophe Fergeau
From: Frediano Ziglio region.c contained code to test the module. Separate test code into a proper test. Test is copied verbatim from the original code. Signed-off-by: Frediano Ziglio --- common/region.c | 378 - tests/Makefile.am | 12 ++

[Spice-devel] [spice-common v3 5/6] test-region: Replace spice_assert() with g_assert_true()

2018-06-27 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- tests/test-region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-region.c b/tests/test-region.c index 12fdfce..ec451c4 100644 --- a/tests/test-region.c +++ b/tests/test-region.c @@ -73,7 +73,7 @@ static void rect_set

[Spice-devel] [spice-common v3 4/6] test-region: Remove unneeded printf

2018-06-27 Thread Christophe Fergeau
__FUNCTION__ will always be rect_is_valid, and there is a g_assert to check the region is valid, so we will get notified anyway if the validity check fails. Signed-off-by: Christophe Fergeau --- tests/test-region.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test-region.c b/tests

[Spice-devel] [spice-common v3 3/6] test-region: Replace direct printf with g_debug() calls

2018-06-27 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- common/region.c | 28 ++-- tests/test-region.c | 106 ++-- 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/common/region.c b/common/region.c index c950a9b..d690167 100644 --- a/common

Re: [Spice-devel] [PATCH spice-common v2] test-region: Create proper test for region from source code

2018-06-27 Thread Christophe Fergeau
On Tue, Jun 26, 2018 at 01:42:20PM -0400, Frediano Ziglio wrote: > Why use GTest API ? Mostly for consistency. > I honestly just created a test and I prefer to have at least a first commit > with a verbatim copy of the old test, in case we found some bugs later. > For me is more important to

Re: [Spice-devel] Windows 10 KVM guest very slow in SPICE console

2018-06-27 Thread Christophe Fergeau
VM, run some testing, ... which I don't really have time for right now, hence the lack of precise answer on my side ;) Christophe > > 2018-06-26 10:20 GMT-05:00 Christophe Fergeau : > > > On Tue, Jun 26, 2018 at 09:45:33AM -0500, Carlos González wrote: > > > 2018-06-

Re: [Spice-devel] [PATCH spice-server] red-channel: Store client callback data in ClientCbs

2018-06-27 Thread Christophe Fergeau
On Wed, Jun 27, 2018 at 03:13:00AM -0400, Frediano Ziglio wrote: > > ClientCbs is definitely not something which needs to be registered > > per-channel instance, it's more of a class thing, and the dispatcher is > > more something which could be thread local. I would not stick everything > >

Re: [Spice-devel] Windows 10 KVM guest very slow in SPICE console

2018-06-26 Thread Christophe Fergeau
On Tue, Jun 26, 2018 at 09:45:33AM -0500, Carlos González wrote: > 2018-06-26 4:54 GMT-05:00 Christophe Fergeau : > > > > > Not fully clear whether you installed the qxl-wddm-dod driver as > > suggested earlier or not. Are you using it in the guest? > > > > Ch

Re: [Spice-devel] [PATCH spice-server 2/2] memslot: Remove error parameter from memslot_get_virt

2018-06-26 Thread Christophe Fergeau
On Tue, Jun 19, 2018 at 11:05:26AM +0100, Frediano Ziglio wrote: > Pointers to memory allocated in user space are never NULL. > The only exception can be if you explicitly map memory at zero. > There is however no reasons for such requirement and this practise > was also removed from Linux due to

Re: [Spice-devel] [PATCH spice-server 1/2] memslot: Return void* from memslot_get_virt

2018-06-26 Thread Christophe Fergeau
ers. Acked-by: Christophe Fergeau but why isn't this removing all the other (Foo*)memslots_get_virt() casts from red-parse-qxl.c? I can send a followup patch. Christophe > > Signed-off-by: Frediano Ziglio > --- > server/memslot.c | 14 +++--- > server/memslot.h

Re: [Spice-devel] [PATCH spice-server 2/2] jpeg-encoder: Remove JPEG_IMAGE_TYPE_RGB24

2018-06-26 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Jun 19, 2018 at 11:05:25AM +0100, Frediano Ziglio wrote: > Never used. > > Signed-off-by: Frediano Ziglio > --- > server/jpeg-encoder.c | 16 ++-- > server/jpeg-encoder.h | 1 - > 2 files changed, 2 insertions(+), 15 d

Re: [Spice-devel] [PATCH spice-server 1/2] jpeg-encoder: Avoid useless conversions

2018-06-26 Thread Christophe Fergeau
On Tue, Jun 19, 2018 at 11:05:23AM +0100, Frediano Ziglio wrote: > Define JpegEncoderContext as an abstract structure. > This allows to reduce casts. > Also remove some alignment warnings on some architecture like mips. Hmm indeed, the indirection is a bit odd.. Acked-by: Christoph

Re: [Spice-devel] [PATCH spice-common] ssl_verify: Fix build for newer LibreSSL

2018-06-26 Thread Christophe Fergeau
own implementation for backward compatibility. Acked-by: Christophe Fergeau with the log fixed. Christophe signature.asc Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/sp

Re: [Spice-devel] [PATCH spice-gtk] Fix build for newer LibreSSL

2018-06-26 Thread Christophe Fergeau
_VERSION_NUMBER < > 0x2070) An alternative to this version checking would be to directly check for the function we need in configure.ac. This should be good enough for now, I'll look into that when we need to update that test again. Acked-by: Christophe Fergeau Christophe > static BIO_ME

Re: [Spice-devel] [PATCH spice-server 1/3] Add support for building with meson

2018-06-26 Thread Christophe Fergeau
On Mon, Jun 18, 2018 at 12:04:18PM -0400, Frediano Ziglio wrote: > Not much replies to this specific patch, but I agree was better to > integrate dependencies (spice-protocol and spice-common) projects > first. > > > diff --git a/subprojects/spice-common.wrap b/subprojects/spice-common.wrap > >

Re: [Spice-devel] [PATCH spice-common v2] test-region: Create proper test for region from source code

2018-06-26 Thread Christophe Fergeau
On Thu, Jun 21, 2018 at 10:32:53PM +0100, Frediano Ziglio wrote: > region.c contained code to test the module. > Separate test code into a proper test. > Test is copied verbatim from the original code. > > Signed-off-by: Frediano Ziglio > --- > common/region.c | 378

Re: [Spice-devel] [PATCH spice-common] test-quic: Increase test timeout using Meson

2018-06-26 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Thu, Jun 21, 2018 at 10:32:52PM +0100, Frediano Ziglio wrote: > This test can take quite some amount of time to run. > > Signed-off-by: Frediano Ziglio > --- > tests/meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [Spice-devel] [PATCH spice-server] red-channel: Store client callback data in ClientCbs

2018-06-26 Thread Christophe Fergeau
Hey, This loops back on that old/unresolved discussion https://lists.freedesktop.org/archives/spice-devel/2017-August/039541.html I'd rather not make changes like this for now as we don't know where we want to go with these ClientCbs ;) The only reason why we have these ClientCbs is to be able

<    1   2   3   4   5   6   7   8   9   10   >