[Spice-devel] [PATCH] [spice-gtk v2] usb-device: Expose libusb device

2014-11-12 Thread Fabiano Fidêncio
As we only can filter USB devices by their Classes and sometimes it is not enough (eg: I do not want to have Keyboard and Mouse, but I want to have Joysticks, being all of them part of HID Class), let's expose the libusb device associated to the SpiceUsbDevice, so the applications can have access t

Re: [Spice-devel] [spice-gtk] [PATCH] Provide a method to check if a USB device matches a specific class, subclass and protocol

2014-11-12 Thread Uri Lublin
On 11/12/2014 07:22 PM, Fabiano Fidêncio wrote: Hi Uri, On Wed, Nov 12, 2014 at 6:01 PM, Uri Lublin wrote: Hi Fabiano, Please see some comments below. On 11/11/2014 04:29 PM, Fabiano Fidêncio wrote: As we only can filter USB devices by their Classes and sometimes it is not enough (eg: I do

Re: [Spice-devel] [PATCH spice-gtk 06/13] migration: set connecting state before fd request

2014-11-12 Thread Marc-André Lureau
On Wed, Nov 12, 2014 at 6:35 PM, Christophe Fergeau wrote: > 'git grep spice_channel_disconnect' gives: > doc/reference/spice-gtk-sections.txt:spice_channel_disconnect > gtk/channel-main.c:spice_channel_disconnect(channel, > SPICE_CHANNEL_SWITCHING); > gtk/map-file:spice_channel_disconnect; >

Re: [Spice-devel] [PATCH spice-gtk 11/13] coroutine: reference object when signaling

2014-11-12 Thread Marc-André Lureau
- Original Message - > On Wed, Nov 12, 2014 at 12:10:26PM -0500, Marc-André Lureau wrote: > > > > > > - Original Message - > > > Hey, > > > > > > On Sun, Nov 09, 2014 at 05:31:43PM +0100, Marc-André Lureau wrote: > > > > Before the signal is acutally emitted, the channel may be

Re: [Spice-devel] [PATCH spice-gtk 03/13] migration: add connection state

2014-11-12 Thread Marc-André Lureau
- Original Message - > Hey, > > On Sun, Nov 09, 2014 at 05:31:35PM +0100, Marc-André Lureau wrote: > > Add a new migration state to track early migration step, when migration > > session is connecting to destination > > I'd say some preconditions need to be updated in channel-inputs.c:

Re: [Spice-devel] [PATCH spice-gtk 06/13] migration: set connecting state before fd request

2014-11-12 Thread Christophe Fergeau
On Wed, Nov 12, 2014 at 12:13:07PM -0500, Marc-André Lureau wrote: > > > - Original Message - > > On Wed, Nov 12, 2014 at 11:27:28AM -0500, Marc-André Lureau wrote: > > > > > > > > > - Original Message - > > > > On Sun, Nov 09, 2014 at 05:31:38PM +0100, Marc-André Lureau wrote:

Re: [Spice-devel] [PATCH spice-gtk 11/13] coroutine: reference object when signaling

2014-11-12 Thread Christophe Fergeau
On Wed, Nov 12, 2014 at 12:10:26PM -0500, Marc-André Lureau wrote: > > > - Original Message - > > Hey, > > > > On Sun, Nov 09, 2014 at 05:31:43PM +0100, Marc-André Lureau wrote: > > > Before the signal is acutally emitted, the channel may be > > > > 'actually' > > > > > released. Simil

Re: [Spice-devel] [spice-gtk] [PATCH] Provide a method to check if a USB device matches a specific class, subclass and protocol

2014-11-12 Thread Fabiano Fidêncio
Hi Uri, On Wed, Nov 12, 2014 at 6:01 PM, Uri Lublin wrote: > Hi Fabiano, > > Please see some comments below. > > On 11/11/2014 04:29 PM, Fabiano Fidêncio wrote: >> >> As we only can filter USB devices by their Classes and sometimes it is >> not enough (eg: I do not want to have Keyboard and Mouse

Re: [Spice-devel] [PATCH spice-gtk 03/13] migration: add connection state

2014-11-12 Thread Christophe Fergeau
Hey, On Sun, Nov 09, 2014 at 05:31:35PM +0100, Marc-André Lureau wrote: > Add a new migration state to track early migration step, when migration > session is connecting to destination I'd say some preconditions need to be updated in channel-inputs.c: g_return_if_fail(SPICE_CHANNEL(channel)->pri

Re: [Spice-devel] [PATCH spice-gtk 06/13] migration: set connecting state before fd request

2014-11-12 Thread Marc-André Lureau
- Original Message - > On Wed, Nov 12, 2014 at 11:27:28AM -0500, Marc-André Lureau wrote: > > > > > > - Original Message - > > > On Sun, Nov 09, 2014 at 05:31:38PM +0100, Marc-André Lureau wrote: > > > > During migration, the main channel initiating the process is waiting on > >

Re: [Spice-devel] [PATCH spice-gtk 11/13] coroutine: reference object when signaling

2014-11-12 Thread Marc-André Lureau
- Original Message - > Hey, > > On Sun, Nov 09, 2014 at 05:31:43PM +0100, Marc-André Lureau wrote: > > Before the signal is acutally emitted, the channel may be > > 'actually' > > > released. Similarly to g_signal_emit, take a reference before yielding > > to main context. > > I would

Re: [Spice-devel] [PATCH spice-gtk 06/13] migration: set connecting state before fd request

2014-11-12 Thread Christophe Fergeau
On Wed, Nov 12, 2014 at 11:27:28AM -0500, Marc-André Lureau wrote: > > > - Original Message - > > On Sun, Nov 09, 2014 at 05:31:38PM +0100, Marc-André Lureau wrote: > > > During migration, the main channel initiating the process is waiting on > > > connection completion or error. However,

Re: [Spice-devel] [spice-gtk] [PATCH] Provide a method to check if a USB device matches a specific class, subclass and protocol

2014-11-12 Thread Uri Lublin
Hi Fabiano, Please see some comments below. On 11/11/2014 04:29 PM, Fabiano Fidêncio wrote: As we only can filter USB devices by their Classes and sometimes it is not enough (eg: I do not want to have Keyboard and Mouse, but want to have have Joysticks, being all of them part of HID Class), pro

Re: [Spice-devel] [PATCH spice-gtk 11/13] coroutine: reference object when signaling

2014-11-12 Thread Christophe Fergeau
Hey, On Sun, Nov 09, 2014 at 05:31:43PM +0100, Marc-André Lureau wrote: > Before the signal is acutally emitted, the channel may be 'actually' > released. Similarly to g_signal_emit, take a reference before yielding > to main context. I would drop the "similarly to g_signal_emit" as your purpos

Re: [Spice-devel] [PATCH spice-gtk 06/13] migration: set connecting state before fd request

2014-11-12 Thread Marc-André Lureau
On Wed, Nov 12, 2014 at 5:08 PM, Christophe Fergeau wrote: > Rereading the commit log, > this movement seems unrelated to what you are fixing anyway? > It is related, since we change the state to connecting before requesting the fd, but we want to keep a warning when calling open_fd() on invalid

Re: [Spice-devel] [PATCH spice-gtk 13/13] migration: delay switch host reconnect

2014-11-12 Thread Christophe Fergeau
On Sun, Nov 09, 2014 at 05:31:45PM +0100, Marc-André Lureau wrote: > Wait until the main channel is reset() before initiating a reconnect. > > With the added precondition checks in previous patch, we hit the > following critical otherwise: > > (remote-viewer:4617): GSpice-CRITICAL **: channel_con

Re: [Spice-devel] [PATCH spice-gtk 12/13] migration: don't check socket error

2014-11-12 Thread Christophe Fergeau
On Sun, Nov 09, 2014 at 05:31:44PM +0100, Marc-André Lureau wrote: > During migration, the original socket is closed before coroutine > finishes, so it's not guarantee to have c->sock on errors. I'd go with something like "During migration, the original socket is closed before the coroutine finis

Re: [Spice-devel] [PATCH spice-gtk 10/13] migration: use spice_session_abort_migration() on error

2014-11-12 Thread Christophe Fergeau
On Sun, Nov 09, 2014 at 05:31:42PM +0100, Marc-André Lureau wrote: > Use a more complete method for the job ACK > --- > gtk/channel-main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gtk/channel-main.c b/gtk/channel-main.c > index 826b10b..18fa0a0 100644 > --- a

Re: [Spice-devel] [PATCH spice-gtk 08/13] migration: create the migration session earlier

2014-11-12 Thread Christophe Fergeau
ACK. On Sun, Nov 09, 2014 at 05:31:40PM +0100, Marc-André Lureau wrote: > The migration session creation may fail. Instead of delaying the session > creation to the main_connect() callback, do it directly from the message > handler context, to report failure early to server. > --- > gtk/channel-m

Re: [Spice-devel] [PATCH spice-gtk 06/13] migration: set connecting state before fd request

2014-11-12 Thread Marc-André Lureau
- Original Message - > On Sun, Nov 09, 2014 at 05:31:38PM +0100, Marc-André Lureau wrote: > > During migration, the main channel initiating the process is waiting on > > connection completion or error. However, if the migration is cancelled, > > but the main channel state is still NONE, n

Re: [Spice-devel] [PATCH spice-gtk 09/13] migration: remove unnecessary reference

2014-11-12 Thread Christophe Fergeau
On Wed, Nov 12, 2014 at 05:03:37PM +0100, Marc-André Lureau wrote: > On Wed, Nov 12, 2014 at 4:14 PM, Christophe Fergeau > wrote: > > > Hey, this one can be squashed in patch 04/13 > > > I prefer to keep this seperate to ease bisection if it introduces issues. > Furthermore, it's not directly r

Re: [Spice-devel] [PATCH spice-gtk 04/13] migration: set session migration during connect

2014-11-12 Thread Christophe Fergeau
On Wed, Nov 12, 2014 at 10:53:16AM -0500, Marc-André Lureau wrote: > > > - Original Message - > > Hi, > > > > On Sun, Nov 09, 2014 at 05:31:36PM +0100, Marc-André Lureau wrote: > > > Track the migration session earlier, so that disconnecting before > > > migration finished will abort and

Re: [Spice-devel] [PATCH spice-gtk 07/13] migration: remove migration cleanup from dispose

2014-11-12 Thread Christophe Fergeau
On Sun, Nov 09, 2014 at 05:31:39PM +0100, Marc-André Lureau wrote: > The spice_session_disconnect() method now call 'now calls' I think > spice_session_abort_migration(), so it is not necessary to do migration > cleanups in dispose anymore > --- > gtk/spice-session.c | 27 +++

Re: [Spice-devel] [PATCH spice-gtk 06/13] migration: set connecting state before fd request

2014-11-12 Thread Christophe Fergeau
On Sun, Nov 09, 2014 at 05:31:38PM +0100, Marc-André Lureau wrote: > During migration, the main channel initiating the process is waiting on > connection completion or error. However, if the migration is cancelled, > but the main channel state is still NONE, no error event will be fired, > and the

Re: [Spice-devel] [PATCH spice-gtk 09/13] migration: remove unnecessary reference

2014-11-12 Thread Marc-André Lureau
On Wed, Nov 12, 2014 at 4:14 PM, Christophe Fergeau wrote: > Hey, this one can be squashed in patch 04/13 I prefer to keep this seperate to ease bisection if it introduces issues. Furthermore, it's not directly related to 4/13. -- Marc-André Lureau ___

Re: [Spice-devel] [PATCH spice-gtk 04/13] migration: set session migration during connect

2014-11-12 Thread Marc-André Lureau
- Original Message - > Hi, > > On Sun, Nov 09, 2014 at 05:31:36PM +0100, Marc-André Lureau wrote: > > Track the migration session earlier, so that disconnecting before > > migration finished will abort and release it. > > --- > > gtk/channel-main.c | 2 +- > > gtk/spice-session-p

Re: [Spice-devel] [PATCH spice-gtk 05/13] migration: fail with client provided fd

2014-11-12 Thread Marc-André Lureau
- Original Message - > On Sun, Nov 09, 2014 at 05:31:37PM +0100, Marc-André Lureau wrote: > > This is not yet supported, so fail early. > > Seems like this bit from your cover letter would fit in the log here: > "Currently the fd request is done on the migration session, which is > not c

Re: [Spice-devel] [PATCH spice-gtk 04/13] migration: set session migration during connect

2014-11-12 Thread Christophe Fergeau
I think short log should talk about "migration session", not "session migration" ? Christophe On Sun, Nov 09, 2014 at 05:31:36PM +0100, Marc-André Lureau wrote: > Track the migration session earlier, so that disconnecting before > migration finished will abort and release it. > --- > gtk/channel

Re: [Spice-devel] [PATCH spice-gtk 05/13] migration: fail with client provided fd

2014-11-12 Thread Christophe Fergeau
On Sun, Nov 09, 2014 at 05:31:37PM +0100, Marc-André Lureau wrote: > This is not yet supported, so fail early. Seems like this bit from your cover letter would fit in the log here: "Currently the fd request is done on the migration session, which is not connected with the client session, so the cl

Re: [Spice-devel] [PATCH spice-gtk 04/13] migration: set session migration during connect

2014-11-12 Thread Christophe Fergeau
Hi, On Sun, Nov 09, 2014 at 05:31:36PM +0100, Marc-André Lureau wrote: > Track the migration session earlier, so that disconnecting before > migration finished will abort and release it. > --- > gtk/channel-main.c | 2 +- > gtk/spice-session-priv.h | 1 - > gtk/spice-session.c | 12 +

Re: [Spice-devel] [PATCH spice-gtk 09/13] migration: remove unnecessary reference

2014-11-12 Thread Christophe Fergeau
Hey, this one can be squashed in patch 04/13 Christophe On Sun, Nov 09, 2014 at 05:31:41PM +0100, Marc-André Lureau wrote: > --- > gtk/channel-main.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/gtk/channel-main.c b/gtk/channel-main.c > index 2b88391..826b10b 10064

Re: [Spice-devel] [PATCH spice-gtk 03/13] migration: add connection state

2014-11-12 Thread Christophe Fergeau
Maybe change the shortlog to 'Add "connecting" state', this makes it slightly more obvious. On Sun, Nov 09, 2014 at 05:31:35PM +0100, Marc-André Lureau wrote: > Add a new migration state to track early migration step, when migration > session is connecting to destination > --- > gtk/channel-main

Re: [Spice-devel] [PATCH spice-gtk 02/13] migration: abort migrate on disconnect

2014-11-12 Thread Christophe Fergeau
On Sun, Nov 09, 2014 at 05:31:34PM +0100, Marc-André Lureau wrote: > If the session has an ongoing migration, but it is disconnected, > abort it. ACK > --- > gtk/spice-session.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/gtk/spice-session.c b/gtk/spice-session.c > index 88bca

Re: [Spice-devel] [PATCH spice-gtk 01/13] migration: add a few more pre-conditions in migration code

2014-11-12 Thread Christophe Fergeau
ACK. On Sun, Nov 09, 2014 at 05:31:33PM +0100, Marc-André Lureau wrote: > Those preconditions help to figure out several issues related to > migration. > --- > gtk/channel-main.c | 2 ++ > gtk/spice-channel.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/gtk/channel-main.c b/gtk/c

Re: [Spice-devel] [Xen-devel] Is: QXL in Xen (busted) Was :Re: Xen 4.5-rc1 update (RC1 is out 2014-Oct-24th)

2014-11-12 Thread Fabio Fantoni
Il 06/11/2014 16:12, Fabio Fantoni ha scritto: Il 03/11/2014 17:03, Konrad Rzeszutek Wilk ha scritto: On Mon, Nov 03, 2014 at 12:05:44PM +0100, Fabio Fantoni wrote: Il 31/10/2014 15:33, Konrad Rzeszutek Wilk ha scritto: I always posted all versions of the patch in xen-devel, the latest was lon

[Spice-devel] [PATCH spice-gtk v2] Release keyboard grab using keyboard shortcut

2014-11-12 Thread Pavel Grunt
This commit adds the ability to release the keyboard grab when the release keys (ctrl+alt) are pressed and released. It allows to use keyboard shortcuts (eg alt+tab, alt+f4) on the client. The keyboard is grabbed again when the release keys are pressed and released or when the mouse moves. https: