Re: [Spice-devel] [RFC PATCH spice 0.8 01/19] server/spice.h: semi-seamless migration interface, RHBZ #738266

2011-09-19 Thread Yonit Halperin
On 09/19/2011 07:13 PM, Gerd Hoffmann wrote: Hi, We need to handle another case: New client. New source server. Old target server. Indeed. 2. When client connects to the server it sees that the server doesn't have the SEMI_SEAMLESS_CAP present. So it disconnects, and sends to the source a

Re: [Spice-devel] [RFC PATCH spice 0.8 01/19] server/spice.h: semi-seamless migration interface, RHBZ #738266

2011-09-19 Thread Yonit Halperin
On 09/19/2011 04:24 PM, Alon Levy wrote: On Mon, Sep 19, 2011 at 04:06:25PM +0300, Yonit Halperin wrote: On 09/19/2011 03:15 PM, Gerd Hoffmann wrote: On 09/19/11 11:46, Yonit Halperin wrote: semi-seamless migration details: migration source side - (1) spice_server_migrate_

Re: [Spice-devel] [systemd-devel] systemd -> consolekit, spice-vdagent questions

2011-09-19 Thread Lennart Poettering
On Wed, 14.09.11 16:26, Hans de Goede (hdego...@redhat.com) wrote: > Hi, > > The spice guest agent for Linux consists of a system level > process (a daemon) and a per session process (started for > each active xsession). > > Currently the linux spice-vdagent is using ConsoleKit to > figure out (

[Spice-devel] Mouse not working with agent

2011-09-19 Thread Damien Churchill
Hi, I was wondering what: channel-inputs.c:365 over SPICE_INPUT_MOTION_ACK_BUNCH * 2, dropping means in the debug log for spice-gtk. It seems to be related as it is being spewed out whenever I move the mouse within the spice widget. Thanks in advance, Damien

Re: [Spice-devel] [RFC PATCH spice 0.8 01/19] server/spice.h: semi-seamless migration interface, RHBZ #738266

2011-09-19 Thread Gerd Hoffmann
Hi, We need to handle another case: New client. New source server. Old target server. Indeed. 2. When client connects to the server it sees that the server doesn't have the SEMI_SEAMLESS_CAP present. So it disconnects, and sends to the source a SPICEC_MSG_MIGRATE_TARGET_CONNECTION_FAILED_T

Re: [Spice-devel] [systemd-devel] Using systemd/udev acl management to open up additional /dev nodes on request

2011-09-19 Thread Kay Sievers
On Mon, Sep 19, 2011 at 15:13, Hans de Goede wrote: >> On Wed, Sep 14, 2011 at 16:17, Hans de Goede wrote: >> You can set the ACLs yourself, but they might get removed with the >> next udev event, depending how the ACLs are managed. This is currently >> only safe, it the tool opens the device rig

Re: [Spice-devel] [PATCH] replace warning with comment in glz_usr_free_image

2011-09-19 Thread Christophe Fergeau
On Mon, Sep 19, 2011 at 05:30:46PM +0300, Yonit Halperin wrote: > ACK, with small note. Currently The glz dictionary is shared between > all DisplayChannelClient that belongs to the same client (i.e., for > each client different dictionary, shared between all its display > channels). Ah, I'll fix

Re: [Spice-devel] [RFC PATCH spice 0.8 02/19] server: handle migration interface addition

2011-09-19 Thread Alon Levy
On Mon, Sep 19, 2011 at 12:46:55PM +0300, Yonit Halperin wrote: > > Signed-off-by: Yonit Halperin > --- > server/reds.c | 15 +++ > server/reds.h |4 > 2 files changed, 19 insertions(+), 0 deletions(-) > > diff --git a/server/reds.c b/server/reds.c > index f082c53..05ebf6

Re: [Spice-devel] [PATCH] replace warning with comment in glz_usr_free_image

2011-09-19 Thread Yonit Halperin
On 09/19/2011 05:26 PM, Christophe Fergeau wrote: When running some xinerama tests, I got several glz_usr_free_image: error messages. Looking at the code, this error is reported when this function is called from a different DisplayChannelClient than the one which created the glz compressed image.

[Spice-devel] [PATCH] replace warning with comment in glz_usr_free_image

2011-09-19 Thread Christophe Fergeau
When running some xinerama tests, I got several glz_usr_free_image: error messages. Looking at the code, this error is reported when this function is called from a different DisplayChannelClient than the one which created the glz compressed image. When this happens, the backtrace is at glz_enco

Re: [Spice-devel] [systemd-devel] Using systemd/udev acl management to open up additional /dev nodes on request

2011-09-19 Thread Kay Sievers
On Wed, Sep 14, 2011 at 16:17, Hans de Goede wrote: > Currently when people want to use usbredirection to a virtual machine from > spice-client, they must launch the spice-client as root so that it can > access device nodes under /dev/bus/usb. > > Since the purpose is for usbredirection to just wo

Re: [Spice-devel] [RFC PATCH spice 0.8 01/19] server/spice.h: semi-seamless migration interface, RHBZ #738266

2011-09-19 Thread Alon Levy
On Mon, Sep 19, 2011 at 04:06:25PM +0300, Yonit Halperin wrote: > On 09/19/2011 03:15 PM, Gerd Hoffmann wrote: > >On 09/19/11 11:46, Yonit Halperin wrote: > >>semi-seamless migration details: > >> > >>migration source side > >>- > >>(1) spice_server_migrate_info (*): tell client

Re: [Spice-devel] [systemd-devel] Using systemd/udev acl management to open up additional /dev nodes on request

2011-09-19 Thread Hans de Goede
Hi, First of all many thanks for your input! On 09/19/2011 02:27 PM, Kay Sievers wrote: On Wed, Sep 14, 2011 at 16:17, Hans de Goede wrote: Currently when people want to use usbredirection to a virtual machine from spice-client, they must launch the spice-client as root so that it can access

Re: [Spice-devel] [RFC PATCH spice 0.8 01/19] server/spice.h: semi-seamless migration interface, RHBZ #738266

2011-09-19 Thread Yonit Halperin
On 09/19/2011 03:15 PM, Gerd Hoffmann wrote: On 09/19/11 11:46, Yonit Halperin wrote: semi-seamless migration details: migration source side - (1) spice_server_migrate_info (*): tell client to link to the target side - send SPICE_MSG_MAIN_MIGRATE_BEGIN. client_migrate_info c

Re: [Spice-devel] [RFC PATCH spice 0.8 03/19] server: support async client_migrate_info monitor command

2011-09-19 Thread Yonit Halperin
On 09/19/2011 03:18 PM, Gerd Hoffmann wrote: On 09/19/11 11:46, Yonit Halperin wrote: Signed-off-by: Yonit Halperin What happens on connect timeouts? immediately upon client_migrate_info I start a timer of 10 secs. If it timeouts before the connection is completed I call the async command co

Re: [Spice-devel] [RFC PATCH spice 0.8 05/19] server, proto: tell the client to connect to the migration target before migraton starts

2011-09-19 Thread Gerd Hoffmann
Hi, diff --git a/spice.proto b/spice.proto index 6160de1..d5b954e 100644 --- a/spice.proto +++ b/spice.proto @@ -167,9 +167,8 @@ channel MainChannel : BaseChannel { uint16 sport; uint32 host_size; uint8 *host_data[host_size] @zero_terminated @marshall @nonnull; -

Re: [Spice-devel] [RFC PATCH spice 0.8 03/19] server: support async client_migrate_info monitor command

2011-09-19 Thread Gerd Hoffmann
On 09/19/11 11:46, Yonit Halperin wrote: Signed-off-by: Yonit Halperin What happens on connect timeouts? cheers, Gerd ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [RFC PATCH spice 0.8 01/19] server/spice.h: semi-seamless migration interface, RHBZ #738266

2011-09-19 Thread Gerd Hoffmann
On 09/19/11 11:46, Yonit Halperin wrote: semi-seamless migration details: migration source side - (1) spice_server_migrate_info (*): tell client to link to the target side - send SPICE_MSG_MAIN_MIGRATE_BEGIN. client_migrate_info cmd is asynchronous. (2) Complete cli

Re: [Spice-devel] [RFC PATCH spice 0.8 01/19] server/spice.h: semi-seamless migration interface, RHBZ #738266

2011-09-19 Thread Alon Levy
On Mon, Sep 19, 2011 at 12:46:54PM +0300, Yonit Halperin wrote: > semi-seamless migration details: > > migration source side > - > (1) spice_server_migrate_info (*): tell client to link > to the target side - send SPICE_MSG_MAIN_MIGRATE_BEGIN. > client_migrate_info cmd

Re: [Spice-devel] [RFC PATCH spice-protocol 0.8] Release 0.8.2

2011-09-19 Thread Alon Levy
On Mon, Sep 19, 2011 at 12:49:07PM +0300, Yonit Halperin wrote: > semi-seamless migration RHBZ 738262 > ACK. One note below. > Signed-off-by: Yonit Halperin > --- > NEWS |4 > configure.ac |2 +- > spice/enums.h|2 ++ > spice/protocol.h |6 +- > 4 f

Re: [Spice-devel] [RFC PATCH spice 0.8 00/19] semi-seamless migration (RHBZ #738266, 725009)

2011-09-19 Thread Yonit Halperin
The first paragraph of the cover letter was omitted, here it is: Hi, this series of patches, and the spice-protocol and qemu patches that will follow it, change spice migration protocol. Spice client is required to connect to the migration target before/as migration starts. Before, the client h

[Spice-devel] [RFC PATCH spice-protocol 0.8] Release 0.8.2

2011-09-19 Thread Yonit Halperin
semi-seamless migration RHBZ 738262 Signed-off-by: Yonit Halperin --- NEWS |4 configure.ac |2 +- spice/enums.h|2 ++ spice/protocol.h |6 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index f238abc..bb11ed2 100644 --

[Spice-devel] [RFC PATCH qemu 2/2] spice: add migration interface

2011-09-19 Thread Yonit Halperin
- call spice_server_migrate_(start|end). - register client_migrate_info completion callback Signed-off-by: Yonit Halperin --- ui/spice-core.c | 54 +- 1 files changed, 53 insertions(+), 1 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-

[Spice-devel] [RFC PATCH qemu 1/2] spice: turn client_migrate_info to async

2011-09-19 Thread Yonit Halperin
RHBZ 737921 Spice client is required to connect to the migration target before/as migration starts. Since after migration starts, the target qemu is blocked and cannot accept new spice client we trigger the connection to the target upon client_migrate_info command. client_migrate_info completion c

[Spice-devel] [RFC PATCH spice 0.8 19/19] client: display channel - destroy all surfaces on disconnect

2011-09-19 Thread Yonit Halperin
Fix not destroying surfaces and other data (e.g., streams) upon disconnection. Signed-off-by: Yonit Halperin --- client/display_channel.cpp | 18 -- client/display_channel.h |1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/client/display_channel.cpp b

[Spice-devel] [RFC PATCH spice 0.8 18/19] client: display channel migration

2011-09-19 Thread Yonit Halperin
Signed-off-by: Yonit Halperin --- client/display_channel.cpp | 158 client/display_channel.h | 12 +++- client/red_gl_canvas.cpp |1 + 3 files changed, 155 insertions(+), 16 deletions(-) diff --git a/client/display_channel.cpp b/client/dis

[Spice-devel] [RFC PATCH spice 0.8 17/19] client: playback/record channels: implement on_disconnect

2011-09-19 Thread Yonit Halperin
Signed-off-by: Yonit Halperin --- client/audio_channels.h | 12 ++-- client/playback_channel.cpp | 22 -- client/record_channel.cpp | 39 --- 3 files changed, 54 insertions(+), 19 deletions(-) diff --git a/client/audio_

[Spice-devel] [RFC PATCH spice 0.8 16/19] client: main channel migration: do partial cleanup when switching hosts

2011-09-19 Thread Yonit Halperin
Implement on_disconnect_mig_src and on_connect_mig_target in order to avoid unnecessary cleanups done in on_(disconnet|connect). In addition, do not request guest display settings changes after migration. Signed-off-by: Yonit Halperin --- client/red_client.cpp | 37 ++--

[Spice-devel] [RFC PATCH spice 0.8 15/19] client: handle SPICE_MSG_MAIN_MIGRATE_END

2011-09-19 Thread Yonit Halperin
(1) disconnect all channels from the migration src (2) after all channels are disconnected, clean global resources (3) send SPICE_MSGC_MAIN_MIGRATE_END to migration target (4) wait for SPICE_MSG_MAIN_INIT (4) switch all channels to migration target Signed-off-by: Yonit Halperin --- client/red_ch

[Spice-devel] [RFC PATCH spice 0.8 14/19] client: handle SpiceMsgMainMigrationBegin for 0.8.2

2011-09-19 Thread Yonit Halperin
RHBZ 725009, 738270 Signed-off-by: Yonit Halperin --- client/red_client.cpp | 19 --- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/client/red_client.cpp b/client/red_client.cpp index 3de359d..a7f9cba 100644 --- a/client/red_client.cpp +++ b/client/red_client.

[Spice-devel] [RFC PATCH spice 0.8 13/19] client: RedPeer::HostAuthOptions::set_cert_subject

2011-09-19 Thread Yonit Halperin
Signed-off-by: Yonit Halperin --- client/application.cpp | 57 ++-- client/red_peer.cpp| 51 ++ client/red_peer.h |2 +- 3 files changed, 59 insertions(+), 51 deletions(-) diff --git a/client/ap

[Spice-devel] [RFC PATCH spice 0.8 12/19] client: rewrite surfaces cache

2011-09-19 Thread Yonit Halperin
use std::map instead of a specific template (CHash). There is no need for special template. Moreover, using std::map will allow easy iteration over the surfaces. Signed-off-by: Yonit Halperin --- client/canvas.cpp | 25 +++- client/canvas.h| 152 --

[Spice-devel] [RFC PATCH spice 0.8 11/19] server: turn spice_server_migrate_start into a valid call

2011-09-19 Thread Yonit Halperin
We will add a qemu call to spice_server_migrate_start when migration starts. For now, it does nothing, but we may need this notification in the future. Signed-off-by: Yonit Halperin --- server/reds.c |8 +--- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/server/reds.c b/

[Spice-devel] [RFC PATCH spice 0.8 10/19] server: handling semi-seamless migration in the target side

2011-09-19 Thread Yonit Halperin
(1) not sending anything to the client till we recieve SPICE_MSGC_MIGRATE_END (2) start a new migration (handle client_migrate_info) only after SPICE_MSGC_MIGRATE_END from the previous migration has been received Signed-off-by: Yonit Halperin --- server/reds.c | 125 +++

[Spice-devel] [RFC PATCH spice 0.8 09/19] server: move the linking of channels to a separate routine

2011-09-19 Thread Yonit Halperin
Signed-off-by: Yonit Halperin --- server/reds.c | 68 +++- 1 files changed, 42 insertions(+), 26 deletions(-) diff --git a/server/reds.c b/server/reds.c index e8544df..bd9a874 100644 --- a/server/reds.c +++ b/server/reds.c @@ -2612,12 +2612,

[Spice-devel] [RFC PATCH spice 0.8 08/19] server: move SPICE_MSG_MAIN_INIT sending code to a separate routine

2011-09-19 Thread Yonit Halperin
Signed-off-by: Yonit Halperin --- server/reds.c | 56 +--- 1 files changed, 33 insertions(+), 23 deletions(-) diff --git a/server/reds.c b/server/reds.c index a0a4924..e8544df 100644 --- a/server/reds.c +++ b/server/reds.c @@ -2078,6 +2078,3

[Spice-devel] [RFC PATCH spice 0.8 07/19] server: send SPICE_MSG_MAIN_MIGRATE_END on spice_server_migrate_end

2011-09-19 Thread Yonit Halperin
Signed-off-by: Yonit Halperin --- server/reds.c | 79 1 files changed, 62 insertions(+), 17 deletions(-) diff --git a/server/reds.c b/server/reds.c index 4aa2afb..a0a4924 100644 --- a/server/reds.c +++ b/server/reds.c @@ -275,6 +275,7 @

[Spice-devel] [RFC PATCH spice 0.8 06/19] spice.proto: add SPICE_MSG_MAIN_MIGRATE_END & SPICE_MSGC_MAIN_MIGRATE_END

2011-09-19 Thread Yonit Halperin
Signed-off-by: Yonit Halperin --- spice.proto |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/spice.proto b/spice.proto index d5b954e..235ec95 100644 --- a/spice.proto +++ b/spice.proto @@ -219,6 +219,8 @@ channel MainChannel : BaseChannel { uint8 *cert_subject

[Spice-devel] [RFC PATCH spice 0.8 05/19] server, proto: tell the client to connect to the migration target before migraton starts

2011-09-19 Thread Yonit Halperin
(1) send SPICE_MSG_MAIN_MIGRATE_BEGIN upon spice_server_migrate_info (2) wait for SPICE_MSGC_MAIN_MIGRATE_(CONNECTED|CONNECT_ERROR), or a timeout, in order to complete client_migrate_info monitor command Signed-off-by: Yonit Halperin --- common/messages.h |2 + server/reds.c | 104

[Spice-devel] [RFC PATCH spice 0.8 04/19] configure: spice-protocol >= 0.8.2 (semi-seamless migration protocol)

2011-09-19 Thread Yonit Halperin
Signed-off-by: Yonit Halperin --- configure.ac |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 3a86515..e169f36 100644 --- a/configure.ac +++ b/configure.ac @@ -126,7 +126,7 @@ fi dnl ===

[Spice-devel] [RFC PATCH spice 0.8 03/19] server: support async client_migrate_info monitor command

2011-09-19 Thread Yonit Halperin
Signed-off-by: Yonit Halperin --- server/reds.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/server/reds.c b/server/reds.c index 05ebf6e..31f34e2 100644 --- a/server/reds.c +++ b/server/reds.c @@ -4874,11 +4874,20 @@ SPICE_GNUC_VISIBLE int spice_server_

[Spice-devel] [RFC PATCH spice 0.8 02/19] server: handle migration interface addition

2011-09-19 Thread Yonit Halperin
Signed-off-by: Yonit Halperin --- server/reds.c | 15 +++ server/reds.h |4 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/server/reds.c b/server/reds.c index f082c53..05ebf6e 100644 --- a/server/reds.c +++ b/server/reds.c @@ -73,6 +73,7 @@ static SpiceKbd

[Spice-devel] [RFC PATCH spice 0.8 01/19] server/spice.h: semi-seamless migration interface, RHBZ #738266

2011-09-19 Thread Yonit Halperin
semi-seamless migration details: migration source side - (1) spice_server_migrate_info (*): tell client to link to the target side - send SPICE_MSG_MAIN_MIGRATE_BEGIN. client_migrate_info cmd is asynchronous. (2) Complete client_migrate_info only when the client has bee

[Spice-devel] [RFC PATCH spice 0.8 00/19] semi-seamless migration (RHBZ #738266, 725009)

2011-09-19 Thread Yonit Halperin
Here is a summary of the new migration scheme (copied from the commit msg of the first patch) migration source side - (1) spice_server_migrate_info (*): tell client to link to the target side - send SPICE_MSG_MAIN_MIGRATE_BEGIN. client_migrate_i

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-19 Thread Lennart Poettering
On Thu, 08.09.11 02:24, Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > Lennart, I wonder what today you think about it, if there is any > drawback or improvements. ie would you use it again? I'd always go for socketpair() unless you have a really really good reason to go for atomic op st