[Spice-devel] [PATCH v3] vdagent-win: Use wide characters in drapdrop code

2015-04-23 Thread Frediano Ziglio
This allow username to contain any extended characters (username is embedded in the directory name). Signed-off-by: Frediano Ziglio fzig...@redhat.com --- vdagent/file_xfer.cpp | 37 + vdagent/file_xfer.h | 9 + 2 files changed, 22 insertions(+), 24

[Spice-devel] [vdagent-win v4] Use wide characters in drapdrop code

2015-04-24 Thread Frediano Ziglio
This allow username to contain any extended characters (username is embedded in the directory name). Signed-off-by: Frediano Ziglio fzig...@redhat.com --- vdagent/file_xfer.cpp | 39 ++- vdagent/file_xfer.h | 9 + 2 files changed, 23 insertions

Re: [Spice-devel] [PATCH] vdagent-win: Assure you set a new HKEY_CURRENT_USER changing user.

2015-04-23 Thread Frediano Ziglio
Hey, On Thu, Apr 23, 2015 at 08:22:51AM -0400, Frediano Ziglio wrote: HKEY_CURRENT_USER is cached as first profile is loaded. Closing the key before setting the token allow the system to set a new HKEY_CURRENT_USER. Some informations are readed from this key (like Desktop folder using

[Spice-devel] [PATCH] vdagent-win: Fix compile under MingW

2015-04-23 Thread Frediano Ziglio
Including directly shlobj.h in some MingW environment lead to some missing definitions error. Including windows.h before fix the problem. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- vdagent/file_xfer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/vdagent/file_xfer.cpp b

[Spice-devel] [PATCH] vdagent-win: Assure you set a new HKEY_CURRENT_USER changing user.

2015-04-23 Thread Frediano Ziglio
HKEY_CURRENT_USER is cached as first profile is loaded. Closing the key before setting the token allow the system to set a new HKEY_CURRENT_USER. Some informations are readed from this key (like Desktop folder using shell APIs). Signed-off-by: Frediano Ziglio fzig...@redhat.com --- vdagent

Re: [Spice-devel] [PATCH] vdagent-win: Use wide characters in drapdrop code

2015-04-23 Thread Frediano Ziglio
On Thu, Apr 23, 2015 at 08:23:18AM -0400, Frediano Ziglio wrote: This allow username to contain any extended characters. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- vdagent/file_xfer.cpp | 32 +--- vdagent/file_xfer.h | 9 + 2

[Spice-devel] [PATCH v2] Use wide characters in drapdrop code

2015-04-23 Thread Frediano Ziglio
This allow username to contain any extended characters. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- vdagent/file_xfer.cpp | 35 +++ vdagent/file_xfer.h | 9 + 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/vdagent

Re: [Spice-devel] [PATCH] vdagent-win: Assure you set a new HKEY_CURRENT_USER changing user.

2015-04-23 Thread Frediano Ziglio
On Thu, Apr 23, 2015 at 09:09:05AM -0400, Frediano Ziglio wrote: During impersonation one thing that Windows does is to try to create HKEY_CURRENT_USER. This is done automatically for you by Windows when it launch a process. HKEY_CURRENT_KEY is a predefined key value. Anyway when you

Re: [Spice-devel] [PATCH] vdagent-win: Fix compile under MingW

2015-04-30 Thread Frediano Ziglio
On Thu, Apr 23, 2015 at 08:22:24AM -0400, Frediano Ziglio wrote: Including directly shlobj.h in some MingW environment lead to some missing definitions error. Including windows.h before fix the problem. This one should be fixed by https://admin.fedoraproject.org/updates/FEDORA-2015-6934

Re: [Spice-devel] [virt-tools] Feature Request - Secure clipboard

2015-04-27 Thread Frediano Ziglio
A secure clipboard is nice to have becuase there's no tradeoff between convenience and safety. A vm can read the global clipboard only when you want it. The Xen based Qubes has it and I don't see why KVM's spice and libvirt can't. Here is how they did it: slide 10 from

Re: [Spice-devel] [virt-tools] Feature Request - Secure clipboard

2015-04-27 Thread Frediano Ziglio
On 04/27/2015 11:38 AM, Frediano Ziglio wrote: A secure clipboard is nice to have becuase there's no tradeoff between convenience and safety. A vm can read the global clipboard only when you want it. The Xen based Qubes has it and I don't see why KVM's spice and libvirt can't. Here

[Spice-devel] Weird code

2015-05-06 Thread Frediano Ziglio
Hi, I was looking at spice-server code and I came into this piece of code /* drawable was already rendered, we may not be able to retrieve the lossless data for the lossy areas */ sync_rendered = TRUE; // checking if the drawable itself or one of the other

Re: [Spice-devel] Poor video performance

2015-05-11 Thread Frediano Ziglio
Hi, I think you should not recompile. I assume you installed successfully QXL drivers in any guest. However some more details are needed. - which type of guests are you using? - with which application type you have poor performances? - do you measure performance or just expect more

Re: [Spice-devel] [spice-common][PATCH 2/2] ppc: Fix quic magic endianess

2015-05-19 Thread Frediano Ziglio
--- common/quic.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/quic.c b/common/quic.c index 16290d4..0fbe6c5 100644 --- a/common/quic.c +++ b/common/quic.c @@ -23,6 +23,8 @@ #include config.h #endif +#include glib.h + #include quic.h

[Spice-devel] [PATCH] Do not loop on ERESTARTSYS using interruptible waits

2015-05-19 Thread Frediano Ziglio
CPU usage on Qemu side too. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- qxl/qxl_cmd.c | 12 +++- qxl/qxl_drv.h | 2 +- qxl/qxl_ioctl.c | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drivers/gpu/drm/qxl/qxl_cmd.c b/qxl/qxl_cmd.c index

Re: [Spice-devel] [PATCH] Allow Qemu to pass maximum head to guest

2015-06-08 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- spice/qxl_dev.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h index a3e91a5..b5c97e9 100644 --- a/spice/qxl_dev.h +++ b/spice/qxl_dev.h @@ -164,8 +164,14 @@ typedef struct

[Spice-devel] [PATCH] RFC: qxl: allow to specify head limit to qxl driver

2015-06-09 Thread Frediano Ziglio
looking anyway to a way to enforce this in spice-server. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- hw/display/qxl.c | 6 ++ hw/display/qxl.h | 1 + 2 files changed, 7 insertions(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index b220e2d..e9ccd30 100644 --- a/hw/display/qxl.c

[Spice-devel] [PATCH] Allow Qemu to pass maximum head to guest

2015-06-08 Thread Frediano Ziglio
not adding padding could lead to unaligned memory accesses. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- spice/qxl_dev.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h index a3e91a5..b5c97e9 100644 --- a/spice/qxl_dev.h +++ b/spice/qxl_dev.h

[Spice-devel] [PATCH 07/11] drm/qxl: Handle correctly failures in qxl_alloc_relase_reserved

2015-06-03 Thread Frediano Ziglio
Free resources correctly if function fails Signed-off-by: Frediano Ziglio fzig...@redhat.com Reviewed-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/qxl/qxl_release.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers

[Spice-devel] [PATCH 04/11] drm/qxl: Avoid double free on error

2015-06-03 Thread Frediano Ziglio
Is we are not able to get source bo object from handle we free destination bo object and call cleanup code however destination object was already inserted in reloc_info array (num_relocs was already incremented) so on cleanup we free destination again. Signed-off-by: Frediano Ziglio fzig

[Spice-devel] [PATCH 05/11] drm/qxl: Handle all errors in qxl_surface_evict

2015-06-03 Thread Frediano Ziglio
Only EBUSY error was handled. This could cause code to believe reserve was successful while it failed. Signed-off-by: Frediano Ziglio fzig...@redhat.com Reviewed-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/qxl/qxl_cmd.c | 8 1 file changed, 4 insertions(+), 4 deletions

[Spice-devel] [PATCH 08/11] drm/qxl: Remove format string errors

2015-06-03 Thread Frediano Ziglio
Enable format string checks for qxl_io_log and remove resulting warnings which could lead to memory errors on different platform or just printing wrong information. Signed-off-by: Frediano Ziglio fzig...@redhat.com Reviewed-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/qxl/qxl_cmd.c

[Spice-devel] [PATCH 00/11 v2] Miscellaneous stability patches

2015-06-03 Thread Frediano Ziglio
. Frediano Ziglio (11): drm/qxl: Do not cause spice-server to clean our objects drm/qxl: Do not leak memory if qxl_release_list_add fails drm/qxl: Fix print statement not using uninitialized variable drm/qxl: Avoid double free on error drm/qxl: Handle all errors in qxl_surface_evict drm/qxl

[Spice-devel] [PATCH 03/11] drm/qxl: Fix print statement not using uninitialized variable

2015-06-03 Thread Frediano Ziglio
reloc_info[i] is not still initialized in the print statement. Signed-off-by: Frediano Ziglio fzig...@redhat.com Reviewed-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/qxl/qxl_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b

[Spice-devel] [PATCH 10/11] drm/qxl: Simplify cleaning qxl processing command

2015-06-03 Thread Frediano Ziglio
In qxlhw_handle_to_bo we incremented counters twice, one time for release object and one for reloc_info. In the main function however reloc_info references was drop much earlier than release so keeping the pointer only on release is safe and make cleaning process easier. Signed-off-by: Frediano

[Spice-devel] [PATCH 02/11] drm/qxl: Do not leak memory if qxl_release_list_add fails

2015-06-03 Thread Frediano Ziglio
If the function fails reference counter to the object is not decremented causing leaks. This is hard to spot as it happens only on very low memory situations. Signed-off-by: Frediano Ziglio fzig...@redhat.com Reviewed-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/qxl/qxl_ioctl.c | 4

[Spice-devel] [PATCH 06/11] drm/qxl: Fix return for qxl_release_alloc

2015-06-03 Thread Frediano Ziglio
This function return handle to allocated release object which is an int. Signed-off-by: Frediano Ziglio fzig...@redhat.com Reviewed-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/qxl/qxl_release.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl

[Spice-devel] [PATCH 01/11] drm/qxl: Do not cause spice-server to clean our objects

2015-06-03 Thread Frediano Ziglio
If objects are moved back from system memory to VRAM (and spice id created again) memory is already initialized so we need to set flag to not clear memory. If you don't do it after a while using desktop many images turns to black or transparents. Signed-off-by: Frediano Ziglio fzig...@redhat.com

[Spice-devel] [PATCH 09/11] drm/qxl: Move main reference counter to GEM object instead of TTM ones

2015-06-03 Thread Frediano Ziglio
moving main counter (the one used by qxl_bo_(un)ref) to GEM object which cleanup routine (qxl_gem_object_free) remove the idr pointer (using qxl_surface_evict) when the counters are still valid. Signed-off-by: Frediano Ziglio fzig...@redhat.com Reviewed-by: Dave Airlie airl...@redhat.com --- drivers

[Spice-devel] [PATCH 11/11] drm/qxl: Propagate correctly errors from qxlhw_handle_to_bo

2015-06-03 Thread Frediano Ziglio
of assuming EINVAL. Signed-off-by: Frediano Ziglio fzig...@redhat.com Reviewed-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/qxl/qxl_ioctl.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm

Re: [Spice-devel] [Qemu-devel] [PATCH] RFC: qxl: allow to specify head limit to qxl driver

2015-06-09 Thread Frediano Ziglio
2015-06-09 10:12 GMT+01:00 Gerd Hoffmann kra...@redhat.com: On Di, 2015-06-09 at 09:49 +0100, Frediano Ziglio wrote: This patch allow to limit number of heads using qxl driver. By default qxl driver is not limited on any kind on head use so can decide to use as much heads. There is a hard

Re: [Spice-devel] [Qemu-devel] [PATCH] RFC: qxl: allow to specify head limit to qxl driver

2015-06-09 Thread Frediano Ziglio
2015-06-09 10:43 GMT+01:00 Gerd Hoffmann kra...@redhat.com: On Di, 2015-06-09 at 10:26 +0100, Frediano Ziglio wrote: 2015-06-09 10:12 GMT+01:00 Gerd Hoffmann kra...@redhat.com: On Di, 2015-06-09 at 09:49 +0100, Frediano Ziglio wrote: This patch allow to limit number of heads using qxl driver

[Spice-devel] [PATCH 2/5] Use MIN macro to compute a minumim

2015-06-10 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- server/red_channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red_channel.c b/server/red_channel.c index 0e34865..9c743a4 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -2308,7 +2308,7

[Spice-devel] [PATCH 1/5] Fix typo in comment

2015-06-10 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- server/red_channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red_channel.c b/server/red_channel.c index 5904381..0e34865 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -538,7 +538,7 @@ static

[Spice-devel] [PATCH 3/5] Use spice_malloc instead of malloc

2015-06-10 Thread Frediano Ziglio
Do not just check and give warning before crashing the program accessing a NULL pointer but use spice_malloc witch exit with a proper message. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- server/red_worker.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[Spice-devel] [PATCH] server: allow to set maximum monitors

2015-06-10 Thread Frediano Ziglio
try to enable more monitor. In this case the additional monitor guest can support will always be seen as heads with no attached monitors. This allows limiting monitors number without changing guest drivers. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- server/red_dispatcher.c | 11

[Spice-devel] [PATCH v2] Use spice_malloc instead of malloc

2015-06-10 Thread Frediano Ziglio
Do not just check and give warning before crashing the program accessing a NULL pointer but use spice_malloc which exits with a proper message. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- server/red_worker.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) Change from v1

Re: [Spice-devel] [PATCH 1/2] server: allows to set maximum monitors

2015-06-18 Thread Frediano Ziglio
more monitors than available, the guest OS will see them, but you won't be able to display them with remote-viewer). So ACK from me with the smaller issues fixed Christophe On Fri, Jun 12, 2015 at 03:17:37PM +0100, Frediano Ziglio wrote: spice-server will attempt to limit number

Re: [Spice-devel] [libvirt] [PATCH v2] qemu: Use heads parameter for QXL driver

2015-06-24 Thread Frediano Ziglio
On Fri, Jun 12, 2015 at 11:57:31AM +0100, Frediano Ziglio wrote: Allows to specify maximum number of head to QXL driver. Signed-off-by: Frediano Ziglio fzig...@redhat.com The patch to support the max_outputs in Qemu is still not merged but I got agreement on the name of the argument

[Spice-devel] [PATCH 1/2] server: allows to set maximum monitors

2015-06-19 Thread Frediano Ziglio
try to enable more monitor. In this case the additional monitor guest can support will always be seen as heads with no attached monitors. This allows limiting monitors number without changing guest drivers. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- server/red_dispatcher.c | 10

[Spice-devel] [PATCH 0/2 v4] allows to set maximum monitors

2015-06-19 Thread Frediano Ziglio
maximum; - use unsigned int instead of unsigned for types. Changes from v2: - fix typo in qxl.h header comment (version 0.12.8 - 0.12.6). Change from v1: - fixed next version in symbols; - added version information bump. Frediano Ziglio (2): server: allows to set maximum monitors build-sys: bump

[Spice-devel] [PATCH 2/2] build-sys: bump libtool version information

2015-06-19 Thread Frediano Ziglio
As one interface was added bump the version and put a comment to avoid too much updates. Signed-off-by: Frediano Ziglio fzig...@redhat.com Acked-by: Christophe Fergeau cferg...@redhat.com --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b

Re: [Spice-devel] [win32-qxl PATCH] Fix annoying typo in print format statement.

2015-06-22 Thread Frediano Ziglio
Missing useful information. --- xddm/display/res.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xddm/display/res.c b/xddm/display/res.c index bfb3571..84f9756 100644 --- a/xddm/display/res.c +++ b/xddm/display/res.c @@ -2005,7 +2005,7 @@ static BOOL

[Spice-devel] [RFC PATCH] qemu: Use heads parameter for QXL driver

2015-06-11 Thread Frediano Ziglio
Allow to specify maximum number of head to QXL driver. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 11 +++ tests

[Spice-devel] [PATCH v2] RFC: qxl: allow to specify head limit to qxl driver

2015-06-11 Thread Frediano Ziglio
could be confusing). This patch rely on some change in spice-protocol which are not still accepted. See http://lists.freedesktop.org/archives/spice-devel/2015-June/020221.html. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- hw/display/qxl.c | 20 +++- hw/display/qxl.h | 1

[Spice-devel] [PATCH 1/2] server: allows to set maximum monitors

2015-06-12 Thread Frediano Ziglio
try to enable more monitor. In this case the additional monitor guest can support will always be seen as heads with no attached monitors. This allows limiting monitors number without changing guest drivers. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- server/red_dispatcher.c | 11

[Spice-devel] [PATCH 0/2 v2] allows to set maximum monitors

2015-06-12 Thread Frediano Ziglio
This patch set allows to set maximum monitors. Mainly change is contained in first patch while the second just bump some version information. Change from v1: - fixed next version in symbols; - added version information bump. Frediano Ziglio (2): server: allow to set maximum monitors build

[Spice-devel] [PATCH 2/2] build-sys: bump libtool version information

2015-06-12 Thread Frediano Ziglio
As one interface was added bump the version and put a comment to avoid too much updates. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 7a9fc4b..3fe3939 100644

Re: [Spice-devel] [PATCH] Allow Qemu to pass maximum head to guest

2015-06-12 Thread Frediano Ziglio
Decided to drop these changes as new ones are much better. Frediano - Original Message - From: Marc-André Lureau marcandre.lur...@gmail.com To: Frediano Ziglio fzig...@redhat.com Cc: spice-devel spice-devel@lists.freedesktop.org Sent: Monday, June 8, 2015 6:44:50 PM Subject: Re

[Spice-devel] [PATCH v2] qemu: Use heads parameter for QXL driver

2015-06-12 Thread Frediano Ziglio
Allows to specify maximum number of head to QXL driver. Signed-off-by: Frediano Ziglio fzig...@redhat.com The patch to support the max_outputs in Qemu is still not merged but I got agreement on the name of the argument. Actually can be a compatiblity problem as heads in the XML configuration

[Spice-devel] [RFC PATCH v2] qxl: allows to specify head limit to qxl driver

2015-06-12 Thread Frediano Ziglio
could be confusing). This patch rely on some change in spice-protocol which are not still accepted. See http://lists.freedesktop.org/archives/spice-devel/2015-June/020221.html. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- hw/display/qxl.c | 26 +- hw/display/qxl.h

Re: [Spice-devel] [Qemu-devel] [PATCH v2] RFC: qxl: allow to specify head limit to qxl driver

2015-06-12 Thread Frediano Ziglio
On Do, 2015-06-11 at 10:38 +0100, Frediano Ziglio wrote: libvirt has this as a video card parameter (actually set to 1 but not used). This parameter will allow to limit setting a use can do (which could be confusing). Hmm. So heads is '1' by default but ignored today. When

[Spice-devel] [PATCH 0/2 v3] allows to set maximum monitors

2015-06-12 Thread Frediano Ziglio
- 0.12.6). Frediano Ziglio (2): server: allows to set maximum monitors build-sys: bump libtool version information configure.ac | 5 +++-- server/red_dispatcher.c | 11 +++ server/red_dispatcher.h | 1 + server/red_worker.c | 12 +++- server/spice-qxl.h

[Spice-devel] [PATCH 1/2] server: allows to set maximum monitors

2015-06-12 Thread Frediano Ziglio
try to enable more monitor. In this case the additional monitor guest can support will always be seen as heads with no attached monitors. This allows limiting monitors number without changing guest drivers. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- server/red_dispatcher.c | 11

[Spice-devel] [PATCH 2/2] build-sys: bump libtool version information

2015-06-12 Thread Frediano Ziglio
As one interface was added bump the version and put a comment to avoid too much updates. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 7a9fc4b..3fe3939 100644

[Spice-devel] [PATCH 04/11] Avoid double free on error

2015-05-27 Thread Frediano Ziglio
Is we are not able to get source bo object from handle we free destination bo object and call cleanup code however destination object was already inserted in reloc_info array (num_relocs was already incremented) so on cleanup we free destination again. Signed-off-by: Frediano Ziglio fzig

[Spice-devel] [PATCH 05/11] Handle all errors in qxl_surface_evict

2015-05-27 Thread Frediano Ziglio
Only EBUSY error was handled. This could cause code to believe reserve was successful while it failed. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- qxl/qxl_cmd.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qxl/qxl_cmd.c b/qxl/qxl_cmd.c index 85ed5dc

[Spice-devel] [PATCH 09/11] Move main reference counter to GEM object instead of TTM ones

2015-05-27 Thread Frediano Ziglio
moving main counter (the one used by qxl_bo_(un)ref) to GEM object which cleanup routine (qxl_gem_object_free) remove the idr pointer (using qxl_surface_evict) when the counters are still valid. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- qxl/qxl_gem.c| 10 -- qxl/qxl_object.c

[Spice-devel] [PATCH 06/11] Fix return for qxl_release_alloc

2015-05-27 Thread Frediano Ziglio
This function return handle to allocated release object which is an int. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- qxl/qxl_release.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qxl/qxl_release.c b/qxl/qxl_release.c index d9b2568..6fd8e50 100644 --- a/qxl

[Spice-devel] [PATCH 11/11] Propagate correctly errors from qxlhw_handle_to_bo

2015-05-27 Thread Frediano Ziglio
of assuming EINVAL. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- qxl/qxl_ioctl.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/qxl/qxl_ioctl.c b/qxl/qxl_ioctl.c index bb326ff..37f1faf 100644 --- a/qxl/qxl_ioctl.c +++ b/qxl/qxl_ioctl.c

[Spice-devel] [PATCH 03/11] Fix print statement not using uninitialized variable

2015-05-27 Thread Frediano Ziglio
reloc_info[i] is not still initialized in the print statement. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- qxl/qxl_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qxl/qxl_ioctl.c b/qxl/qxl_ioctl.c index e8b5207..230ab84 100644 --- a/qxl/qxl_ioctl.c +++ b/qxl

[Spice-devel] [PATCH 10/11] Simplify cleaning qxl processing command

2015-05-27 Thread Frediano Ziglio
In qxlhw_handle_to_bo we incremented counters twice, one time for release object and one for reloc_info. In the main function however reloc_info references was drop much earlier than release so keeping the pointer only on release is safe and make cleaning process easier. Signed-off-by: Frediano

[Spice-devel] [PATCH 07/11] Handle correctly failures in qxl_alloc_relase_reserved

2015-05-27 Thread Frediano Ziglio
Free resources correctly if function fails Signed-off-by: Frediano Ziglio fzig...@redhat.com --- qxl/qxl_release.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qxl/qxl_release.c b/qxl/qxl_release.c index 6fd8e50..00604ed 100644 --- a/qxl/qxl_release.c +++ b/qxl

[Spice-devel] [PATCH 01/11] Do not cause spice-server to clean our objects

2015-05-27 Thread Frediano Ziglio
If objects are moved back from system memory to VRAM (and spice id created again) memory is already initialized so we need to set flag to not clear memory. If you don't do it after a while using desktop many images turns to black or transparents. Signed-off-by: Frediano Ziglio fzig...@redhat.com

[Spice-devel] [PATCH 00/11] Miscellaneous stability patches

2015-05-27 Thread Frediano Ziglio
This set of patches mainly contains fix for some memory issues using quite aggressively surfaces and other minor problems like images going black after a while. Frediano Ziglio (11): Do not cause spice-server to clean our objects Do not leak memory if qxl_release_list_add fails Fix print

[Spice-devel] [PATCH 02/11] Do not leak memory if qxl_release_list_add fails

2015-05-27 Thread Frediano Ziglio
If the function fails reference counter to the object is not decremented causing leaks. This is hard to spot as it happens only on very low memory situations. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- qxl/qxl_ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

Re: [Spice-devel] [PATCH 09/11] Move main reference counter to GEM object instead of TTM ones

2015-05-29 Thread Frediano Ziglio
On 27 May 2015 at 20:04, Frediano Ziglio fzig...@redhat.com wrote: qxl_bo structure has two reference counters, one in the GEM object and another in the TTM object. The GEM object keep a counter to the TTM object so when GEM counter reached zero the TTM counter (using qxl_bo_unref

Re: [Spice-devel] [PATCH 00/11] Miscellaneous stability patches

2015-05-27 Thread Frediano Ziglio
On Wed, May 27, 2015 at 8:47 AM, Josh Boyer jwbo...@fedoraproject.org wrote: On Wed, May 27, 2015 at 6:03 AM, Frediano Ziglio fzig...@redhat.com wrote: This set of patches mainly contains fix for some memory issues using quite aggressively surfaces and other minor problems like

Re: [Spice-devel] [PATCH 00/11] Miscellaneous stability patches

2015-05-28 Thread Frediano Ziglio
I was using a different repository with only QXL driver. I tested and all patches apply and compile perfectly even with Linus master branch. Lets only post patches people can apply, it makes it harder to figure out stuff. I'll take a look at the patches, but it would be good to get them

[Spice-devel] [PATCH 08/33] codegen: Remove old ptr32 attribute

2015-07-01 Thread Frediano Ziglio
This attribute is not use in code. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/ptypes.py | 4 1 file changed, 4 deletions(-) diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py index 3a307ed..f94fd24 100644 --- a/python_modules/ptypes.py +++ b

[Spice-devel] [PATCH 01/33] codegen: Import six module before first use

2015-07-01 Thread Frediano Ziglio
The module was used in the initial try/except so make sure it is already imported. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/spice_parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python_modules/spice_parser.py b/python_modules

[Spice-devel] [PATCH 07/33] codegen: Do some check on attributes

2015-07-01 Thread Frediano Ziglio
Verify that the attribute is known. This could help for instance to avoid some future typo mistake. Also we have a list of attributes we can comment. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/ptypes.py | 69 1 file

[Spice-devel] [PATCH 13/33] Decorate writer class to make easier ifdef/endif handling

2015-07-01 Thread Frediano Ziglio
I'm generating code for dissector from demarshaller. Make simple to hangle ifdef/endif not having to check manually attribute. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 18 ++ 1 file changed, 18 insertions(+) diff --git a/python_modules

[Spice-devel] [PATCH 16/33] Allows to specify descriptions for enumerations

2015-07-01 Thread Frediano Ziglio
These descriptions will be used to show in wireshark dissector. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/ptypes.py | 16 python_modules/spice_parser.py | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/python_modules

[Spice-devel] [PATCH 09/33] Start adding code to generate wireshark dissector

2015-07-01 Thread Frediano Ziglio
Added a stub dissector.py code. Added file to Makefiles. Add option to call dissector and code to call it. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- common/Makefile.am | 1 + python_modules/Makefile.am | 1 + python_modules/dissector.py | 14

[Spice-devel] [PATCH 10/33] Allows to specify C type for index variable

2015-07-01 Thread Frediano Ziglio
This to prepare to generate wireshark dissector which use glib types instead of new C ones (for compatibility with some compiler). Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/codegen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python_modules

[Spice-devel] [PATCH 15/33] Allows to specify some new attributes for wireshark

2015-07-01 Thread Frediano Ziglio
-by: Frediano Ziglio fzig...@redhat.com --- python_modules/ptypes.py | 29 +++-- python_modules/spice_parser.py | 13 +++-- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py index f94fd24..0ba5384

[Spice-devel] [PATCH 02/33] codegen: Simplify if/else blocks

2015-07-01 Thread Frediano Ziglio
Blocks was mainly the same, reduce code. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/marshal.py | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/python_modules/marshal.py b/python_modules/marshal.py index b77b910

[Spice-devel] [PATCH 05/33] codegen: Remove duplicate variable initialization

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/spice_parser.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python_modules/spice_parser.py b/python_modules/spice_parser.py index 80b559b..97af8b2 100644 --- a/python_modules/spice_parser.py +++ b/python_modules

[Spice-devel] [PATCH 03/33] codegen: Fix typo in variable name

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/codegen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_modules/codegen.py b/python_modules/codegen.py index f324498..55500b7 100644 --- a/python_modules/codegen.py +++ b/python_modules/codegen.py

[Spice-devel] [PATCH 18/33] Change code generated index type

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 9971140..598cc3b 100644 --- a/python_modules/dissector.py +++ b/python_modules/dissector.py

[Spice-devel] [PATCH 12/33] Add new_ett function to be able to create new trees

2015-07-01 Thread Frediano Ziglio
. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 28 1 file changed, 28 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index d9d8a87..6751534 100644 --- a/python_modules/dissector.py +++ b

[Spice-devel] [PATCH 28/33] Handle pointers

2015-07-01 Thread Frediano Ziglio
Read the pointer and if not 0 create a function to parse it and call it. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 49 + 1 file changed, 49 insertions(+) diff --git a/python_modules/dissector.py b

[Spice-devel] [PATCH 25/33] Handle array

2015-07-01 Thread Frediano Ziglio
If just data increment the pointer if not handle the items with a loop. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py

[Spice-devel] [PATCH 29/33] Handle base fields

2015-07-01 Thread Frediano Ziglio
Add fields to base tree (so basically there is no tree). Names is now generated from container + member name. The check for duplicate is not that strong, should check if same field is defined with same attributes. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py

[Spice-devel] [PATCH 14/33] Generate scheleton for messages and channels

2015-07-01 Thread Frediano Ziglio
Messages are not generated as stub. Code partially from demarshaller. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 138 +++- 1 file changed, 137 insertions(+), 1 deletion(-) diff --git a/python_modules/dissector.py b

[Spice-devel] [PATCH 17/33] Decorate protocol file with attributes for wireshark

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- spice.proto | 414 1 file changed, 218 insertions(+), 196 deletions(-) diff --git a/spice.proto b/spice.proto index 2889802..0bcb421 100644 --- a/spice.proto +++ b/spice.proto

[Spice-devel] [PATCH 27/33] Implement ws_inline attribute

2015-07-01 Thread Frediano Ziglio
This attribute allow structure to be aligned instead of be contained in a separate function. This is helpful as variable are declared in the function so allows other member to reference to a nested structure. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 11

[Spice-devel] [PATCH 23/33] Read array size

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 50 +++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index cb07ab6..4db2f3c 100644

[Spice-devel] [PATCH 32/33] Use a class to register wireshark fields

2015-07-01 Thread Frediano Ziglio
Allow to reuse code and check better if field was already registered Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 59 + 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/python_modules/dissector.py b

[Spice-devel] [PATCH 30/33] Allow to override default values generated for the fields

2015-07-01 Thread Frediano Ziglio
attributes. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 46 ++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 23bb96a..5b14b92 100644

[Spice-devel] [PATCH 33/33] Handle flags

2015-07-01 Thread Frediano Ziglio
Instead of only show the hexadecimal value show all bits. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 77 ++--- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/python_modules/dissector.py b

[Spice-devel] [PATCH 11/33] Generate some definition for dissector

2015-07-01 Thread Frediano Ziglio
Generate global definitions. Generate function to registers various dissector components. For the moment the field array is empty bu we save some global to be able to register new ones. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 69

[Spice-devel] [PATCH 24/33] Generate code to output parse structure

2015-07-01 Thread Frediano Ziglio
Write a function and call it to be able to reuse it. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 20 1 file changed, 20 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 4db2f3c..c9331cd 100644

[Spice-devel] [PATCH 04/33] codegen: Optimize code indentation avoiding loop

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/codegen.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python_modules/codegen.py b/python_modules/codegen.py index 55500b7..02ffdb9 100644 --- a/python_modules/codegen.py +++ b/python_modules/codegen.py

[Spice-devel] [PATCH 26/33] Handle switch

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 6e9f0d6..f18b5b4 100644

[Spice-devel] [PATCH 31/33] Allow to specify 'CHANNEL' as type

2015-07-01 Thread Frediano Ziglio
Type will be mapped to an enumerator containing all channel types. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index

[Spice-devel] [PATCH 20/33] Parse containers

2015-07-01 Thread Frediano Ziglio
Parse all members of the containers Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 19 +++ 1 file changed, 19 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index bd68262b..47d4031 100644

[Spice-devel] [PATCH 22/33] Read values from primitive fields

2015-07-01 Thread Frediano Ziglio
Store into references for future usage. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 32 1 file changed, 32 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 707eae9..cb07ab6 100644

[Spice-devel] [PATCH 21/33] Write function to write members

2015-07-01 Thread Frediano Ziglio
Check members are all of a giver type and call stubs for each type. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 50 +++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/python_modules/dissector.py b

  1   2   3   4   5   6   7   8   9   10   >