[Spice-devel] [PATCH xf86-video-qxl 1/3] Add support for XSERVER_PLATFORM_BUS

2014-04-24 Thread Hans de Goede
This is a preparation patch for adding support for server managed fds. Signed-off-by: Hans de Goede hdego...@redhat.com --- src/qxl.h| 6 ++ src/qxl_driver.c | 48 ++-- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git

[Spice-devel] [PATCH xf86-video-qxl 3/3] Add support for server managed fds

2014-04-24 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- src/qxl_driver.c | 4 src/qxl_kms.c| 32 +++- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index c81b243..b9aa0e9 100644 --- a/src/qxl_driver.c +++

[Spice-devel] [PATCH xf86-video-qxl 2/3] Fix qxl_driver_func to adhere to the API

2014-04-24 Thread Hans de Goede
The driverFunc callback MUST check the passed in operand and only return TRUE it if understands it and has handled it. It must NOT blindly assume the op is GET_REQUIRED_HW_INTERFACES. While at also always define driverFunc, and welcome qxl to the 21st century. Signed-off-by: Hans de Goede

Re: [Spice-devel] Can SPICE server support 32bit system?

2014-04-24 Thread 소병철
Title: Samsung Enterprise Portal mySingle Hello. -Original Message- And I have another question. Currently, It seems 'qxl driver' and 'vdagent' doesn't support windows 8. Is there any plan to support windows 8? win8 qxl support is a significant amount of work as

[Spice-devel] [PATCH] Use PRI macros in printf to keep compatibility between 32/64bit system

2014-04-24 Thread 소병철
gcc's some integer type definitions are different between 32/64bit system. This causes platform dependency problem with printf function. However, we can avoid this problem by using PRI macros that supports platform independent printf. --- server/mjpeg_encoder.c |7 --- server/red_worker.c

[Spice-devel] [PATCH spice-gtk] option: check that default ca-file exists

2014-04-24 Thread Marc-André Lureau
Don't set default ca-file path if the file doesn't exists. --- gtk/spice-option.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/spice-option.c b/gtk/spice-option.c index 2d03912..0a0f9ef 100644 --- a/gtk/spice-option.c +++ b/gtk/spice-option.c @@ -226,6 +226,8 @@ void

Re: [Spice-devel] [PATCH spice-gtk] option: check that default ca-file exists

2014-04-24 Thread Christophe Fergeau
- Mail original - Don't set default ca-file path if the file doesn't exists. --- gtk/spice-option.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/spice-option.c b/gtk/spice-option.c index 2d03912..0a0f9ef 100644 --- a/gtk/spice-option.c +++ b/gtk/spice-option.c @@

Re: [Spice-devel] [PATCH spice-gtk 14/14] win-usb: try to connect to usbclerk during init

2014-04-24 Thread Jonathon Jongsma
ACK with comments. - Original Message - From: Marc-André Lureau marcandre.lur...@gmail.com To: spice-de...@freedesktop.org Sent: Wednesday, April 23, 2014 1:09:19 PM Subject: [Spice-devel] [PATCH spice-gtk 14/14] win-usb: try to connect to usbclerk during init Fail early

Re: [Spice-devel] [PATCH spice-gtk 06/14] win-usb: throw an error if reply.status != 0

2014-04-24 Thread Jonathon Jongsma
I have no experience with usbclerk, but reading the code, it seems that reply.status is set to a boolean value[1], with true meaning success. So the status!=0 below appears to be backward. Or am I reading it wrong? [1] http://cgit.freedesktop.org/spice/win32/usbclerk/tree/usbclerk.cpp#n396

Re: [Spice-devel] [PATCH spice-gtk 06/14] win-usb: throw an error if reply.status != 0

2014-04-24 Thread Marc-André Lureau
On Thu, Apr 24, 2014 at 4:50 PM, Jonathon Jongsma jjong...@redhat.comwrote: I have no experience with usbclerk, but reading the code, it seems that reply.status is set to a boolean value[1], with true meaning success. So the status!=0 below appears to be backward. Or am I reading it wrong?

Re: [Spice-devel] [PATCH spice-gtk 03/14] win-usb: rename async functions

2014-04-24 Thread Marc-André Lureau
On Wed, Apr 23, 2014 at 10:35 PM, Jonathon Jongsma jjong...@redhat.comwrote: Unrelated change, belongs in a different patch if necessary. corrected and moved to usb: use win-usb uninstall_finish() patch -- Marc-André Lureau ___ Spice-devel mailing

Re: [Spice-devel] [PATCH spice-gtk 04/14] win-usb: add uninstall_finish()

2014-04-24 Thread Marc-André Lureau
I am fine with that On Wed, Apr 23, 2014 at 10:43 PM, Jonathon Jongsma jjong...@redhat.comwrote: This patch is so small and doesn't do anything on its own, so I'd prefer to just fold it into the next one. - Original Message - From: Marc-André Lureau marcandre.lur...@gmail.com

Re: [Spice-devel] [PATCH spice-gtk 08/14] usb: remove useless device ref/unref

2014-04-24 Thread Marc-André Lureau
On Wed, Apr 23, 2014 at 11:15 PM, Jonathon Jongsma jjong...@redhat.comwrote: Hm, I agree that the existing code does look very suspicious, but in general I think that ensuring that a ref is held for the duration of the async operation is probably a good idea. From a very cursory investigation

Re: [Spice-devel] [PATCH spice-gtk 11/14] usb: call win_usb_driver_new() during initable_init()

2014-04-24 Thread Marc-André Lureau
On Wed, Apr 23, 2014 at 11:29 PM, Jonathon Jongsma jjong...@redhat.comwrote: unrelated format changes... ok, moved { SpiceUsbDeviceManager *self; SpiceUsbDeviceManagerPrivate *priv; @@ -260,6 +260,17 @@ static gboolean spice_usb_device_manager_initable_init(GInitable

[Spice-devel] High dom0 cpu usage using spice

2014-04-24 Thread Fabio Fantoni
After endless troubles I'm finally approaching to use spice on xen in production in place of vnc+rdp. I have noticed an high dom0 cpu usage by guest's qemu process when spice is used (in particular using video streaming). This is my test system: Dom0: Dell Poweredge T310 with cpu xeon X3450

Re: [Spice-devel] [PATCH spice-gtk 13/14] usb: do not return GError on programmer pre-condition checks

2014-04-24 Thread Marc-André Lureau
On Wed, Apr 23, 2014 at 11:43 PM, Jonathon Jongsma jjong...@redhat.comwrote: Why return FALSE without setting error? Doesn't that violate the contract for initable? From the docs: Returns: TRUE if successful. If an error has occurred, this function will return FALSE and set error

Re: [Spice-devel] [PATCH spice-gtk 14/14] win-usb: try to connect to usbclerk during init

2014-04-24 Thread Marc-André Lureau
On Thu, Apr 24, 2014 at 4:37 PM, Jonathon Jongsma jjong...@redhat.comwrote: Perhaps there should be a g_warning here to aid debugging? Or alternately in the function that calls this one? The spice_usb_device_manager_get() will return NULL , with a GError. Since this function is called many

[Spice-devel] [PATCH spice-gtk 00/14] USB fail early on win32 without usbclerk v2

2014-04-24 Thread Marc-André Lureau
Hi, Here is a small series, of little cleanups, and of goal to throw early an error when the win32 usbclerk can't be reached. In turn, the error can be catched by client code to show a useful dialog. In v2: - fixes after Jonathon Jongsma review Marc-André Lureau (14): usb: remove useless

[Spice-devel] [PATCH spice-gtk 02/14] win-usb: introduce a spice_win_usb_driver_op_finish

2014-04-24 Thread Marc-André Lureau
We want the exported functions to follow the gio async idom. Currently, both install() and uninstall() are paired with install_finish(). In the following patch we introduce uninstall_async() uninstall_finish() using that common internal op_finish() function. Then we correctly pair associated

[Spice-devel] [PATCH spice-gtk 03/14] win-usb: rename async functions

2014-04-24 Thread Marc-André Lureau
--- gtk/usb-device-manager.c | 12 ++-- gtk/win-usb-driver-install.c | 22 +++--- gtk/win-usb-driver-install.h | 22 ++ 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index

[Spice-devel] [PATCH spice-gtk 07/14] usb: remove useless device ref/unref

2014-04-24 Thread Marc-André Lureau
A code doing an unref() on an object just before manipulating it looks horribly suspicious... --- gtk/usb-device-manager.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index a505c19..af993aa 100644 ---

[Spice-devel] [PATCH spice-gtk 12/14] win-usb: remove useless function

2014-04-24 Thread Marc-André Lureau
--- gtk/win-usb-driver-install.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gtk/win-usb-driver-install.c b/gtk/win-usb-driver-install.c index 5eb7dcc..80f617b 100644 --- a/gtk/win-usb-driver-install.c +++ b/gtk/win-usb-driver-install.c @@ -61,20 +61,13 @@

[Spice-devel] [PATCH spice-gtk 06/14] win-usb: get rid of status code return in async ops

2014-04-24 Thread Marc-André Lureau
--- gtk/usb-device-manager.c | 17 ++--- gtk/win-usb-driver-install.c | 10 +- gtk/win-usb-driver-install.h | 8 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index 147026c..a505c19 100644 ---

[Spice-devel] [PATCH spice-gtk 04/14] usb: use win-usb uninstall_finish()

2014-04-24 Thread Marc-André Lureau
--- gtk/usb-device-manager.c | 57 +++- gtk/win-usb-driver-install.c | 7 ++ gtk/win-usb-driver-install.h | 4 3 files changed, 46 insertions(+), 22 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index

[Spice-devel] [PATCH spice-gtk 05/14] win-usb: throw an error if reply.status == 0

2014-04-24 Thread Marc-André Lureau
--- gtk/win-usb-driver-install.c | 8 1 file changed, 8 insertions(+) diff --git a/gtk/win-usb-driver-install.c b/gtk/win-usb-driver-install.c index c3a7ace..865f795 100644 --- a/gtk/win-usb-driver-install.c +++ b/gtk/win-usb-driver-install.c @@ -175,6 +175,14 @@ void

[Spice-devel] [PATCH spice-gtk 11/14] usb: misc code formatting

2014-04-24 Thread Marc-André Lureau
--- gtk/usb-device-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index e941904..81e3c80 100644 --- a/gtk/usb-device-manager.c +++ b/gtk/usb-device-manager.c @@ -227,8 +227,8 @@ static void

[Spice-devel] [PATCH spice-gtk 08/14] usb: remove useless assignment

2014-04-24 Thread Marc-André Lureau
The struct is g_new0() already. --- gtk/usb-device-manager.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index af993aa..c87efd5 100644 --- a/gtk/usb-device-manager.c +++ b/gtk/usb-device-manager.c @@ -1565,9 +1565,6 @@ void

[Spice-devel] [PATCH spice-gtk 10/14] usb: call win_usb_driver_new() during initable_init()

2014-04-24 Thread Marc-André Lureau
Throw an error when initialization failed. --- gtk/spice-client.h | 2 ++ gtk/usb-device-manager.c | 23 --- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gtk/spice-client.h b/gtk/spice-client.h index e734cca..39765db 100644 --- a/gtk/spice-client.h

[Spice-devel] [PATCH spice-gtk 13/14] usb: do not return GError on programmer pre-condition checks

2014-04-24 Thread Marc-André Lureau
Use regular g_return precondition checks. --- gtk/usb-device-manager.c | 26 +++--- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index 81e3c80..5f6bde1 100644 --- a/gtk/usb-device-manager.c +++

[Spice-devel] [PATCH spice-gtk 09/14] usb: use SPICE_CLIENT_ERROR_ prefix

2014-04-24 Thread Marc-André Lureau
To be consistent with GLib idioms, the code should use a common prefix for errors. --- gtk/channel-usbredir.c | 4 ++-- gtk/spice-client.h | 11 +-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c index 239fe12..64487b3

[Spice-devel] [PATCH spice-gtk 14/14] win-usb: try to connect to usbclerk during init

2014-04-24 Thread Marc-André Lureau
Fail early during initialization if the usbclerk service can't be reached. This changes the current behaviour that would retry to connect to usbclerk every time to perform an operation. Now, it will try each time the UsbDeviceManager is initialized. --- gtk/usb-device-manager.c | 6 ++--