[Spice-devel] [PATCH spice-gtk] coroutine: abort on OOM or impossible conditions

2013-11-19 Thread Marc-André Lureau
Make the coroutine code more glib-like, by aborting on OOM or unhandled conditions. --- gtk/continuation.c| 9 - gtk/continuation.h| 2 +- gtk/coroutine.h | 3 ++- gtk/coroutine_gthread.c | 12 ++-- gtk/coroutine_ucontext.c | 17 - gt

Re: [Spice-devel] building spice-gtk fails

2013-11-19 Thread Christophe Fergeau
On Tue, Nov 19, 2013 at 02:54:10PM -0500, Marc-André Lureau wrote: > > Also building out of tree does not work even with pyparse. > > Each release is done with "make distcheck", and allow out of tree build. > If it doesn't work from git, it's a very recent regression and it will be > fixed at leas

Re: [Spice-devel] building spice-gtk fails

2013-11-19 Thread Marc-André Lureau
- Original Message - > Excerpts from Christophe Fergeau's message of Tue Nov 19 18:23:22 +0100 2013: > > On Tue, Nov 19, 2013 at 06:19:23PM +0100, Michal Suchanek wrote: > > > Hello, > > > > > > I tried to build spice-gtk but I get an error about demarshaller without > > > any error mess

Re: [Spice-devel] Implementing channel between module at spice client and guest OS

2013-11-19 Thread Alon Bar-Lev
Thank you for the details! Back to drawing board. - Original Message - > From: "Marc-André Lureau" > To: "Alon Bar-Lev" > Cc: "Marc-André Lureau" , "spice-devel" > > Sent: Tuesday, November 19, 2013 3:22:47 PM > Subject: Re: [Spice-devel] Implementing channel between module at spice

Re: [Spice-devel] building spice-gtk fails

2013-11-19 Thread Michal Suchanek
Excerpts from Christophe Fergeau's message of Tue Nov 19 18:23:22 +0100 2013: > On Tue, Nov 19, 2013 at 06:19:23PM +0100, Michal Suchanek wrote: > > Hello, > > > > I tried to build spice-gtk but I get an error about demarshaller without > > any error message. > > > > The README says to install v

[Spice-devel] building spice-gtk fails

2013-11-19 Thread Michal Suchanek
Hello, I tried to build spice-gtk but I get an error about demarshaller without any error message. The README says to install vala but even with vala installed and enabled the file is not generated. Any idea what might be wrong? Thanks Michal PKG_CONFIG_PATH=/scratch/celt-bin/lib/pkgconfig

Re: [Spice-devel] building spice-gtk fails

2013-11-19 Thread Christophe Fergeau
On Tue, Nov 19, 2013 at 06:19:23PM +0100, Michal Suchanek wrote: > Hello, > > I tried to build spice-gtk but I get an error about demarshaller without any > error message. > > The README says to install vala but even with vala installed and enabled the > file is not generated. > > Any idea wha

Re: [Spice-devel] [PATCH spice-gtk 3/4] tests: add some coroutine tests

2013-11-19 Thread Christophe Fergeau
I haven't retested this, I'll just assume all tests are passing this time, ACK. Christophe On Tue, Nov 19, 2013 at 04:14:24PM +0100, Marc-André Lureau wrote: > --- > tests/Makefile.am | 18 +--- > tests/coroutine.c | 136 > ++ > 2 files c

Re: [Spice-devel] [PATCH spice-gtk 4/4] coroutine: make gthread coroutine pass tests

2013-11-19 Thread Christophe Fergeau
On Tue, Nov 19, 2013 at 04:14:25PM +0100, Marc-André Lureau wrote: > The coroutine entry() return value must be passed via the caller->data, > since coroutine_swap() returns from->data. (this is needed because > coroutine_swap() argument is used both to return from entry() or to send > data to a ru

Re: [Spice-devel] [PATCH spice-gtk] Add SPICE_MAX_CLIPBOARD environment variable

2013-11-19 Thread Jonathon Jongsma
If you want to keep it, I won't object. just noting that it isn't strictly necessary. - Original Message - > From: "Marc-André Lureau" > To: "Jonathon Jongsma" > Cc: "Marc-André Lureau" , > spice-devel@lists.freedesktop.org, "Marc-André Lureau" > > Sent: Tuesday, November 19, 2013

Re: [Spice-devel] [PATCH spice-gtk] coroutine: abort on OOM or impossible conditions

2013-11-19 Thread Marc-André Lureau
ok - Original Message - > On Tue, Nov 19, 2013 at 05:30:55PM +0100, Marc-André Lureau wrote: > > @@ -75,21 +73,13 @@ int coroutine_init(struct coroutine *co) > > PROT_READ | PROT_WRITE, > > MAP_PRIVATE | MAP_ANONYMOUS, > >

Re: [Spice-devel] [PATCH spice-gtk] Add SPICE_MAX_CLIPBOARD environment variable

2013-11-19 Thread Marc-André Lureau
I just wanted to have environment value in ->max_clipboard too, to make it more obvious when debugging (if printing *self for example) Furthermore, since the environment value can be adjusted dynamically now, it could as well be removed. And I think it's better to keep the SPICE_MAX_CLIPBOARD v

Re: [Spice-devel] [PATCH spice-gtk] coroutine: abort on OOM or impossible conditions

2013-11-19 Thread Christophe Fergeau
On Tue, Nov 19, 2013 at 05:30:55PM +0100, Marc-André Lureau wrote: > @@ -75,21 +73,13 @@ int coroutine_init(struct coroutine *co) > PROT_READ | PROT_WRITE, > MAP_PRIVATE | MAP_ANONYMOUS, > -1, 0); > - if (co->cc.stack

Re: [Spice-devel] [PATCH spice-gtk] Add SPICE_MAX_CLIPBOARD environment variable

2013-11-19 Thread Jonathon Jongsma
I don't think you need the 'constructed' vfunc at all anymore. You're accessing the max clipboard value exclusively through the getter now, so it doesn't really matter whether priv->max_clipboard gets overwritten with the environment value at construction or not. Otherwise ACK. - Original

Re: [Spice-devel] [PATCH spice-gtk 1/4] coroutine: don't force coroutine_init checking

2013-11-19 Thread Christophe Fergeau
On Tue, Nov 19, 2013 at 05:38:29PM +0100, Marc-André Lureau wrote: > > Hrm, all of this would have been more useful during the review of "Check > > coroutine_init() return value" as this is an alternate approach I > > experimented with, but then I preferred to try to avoid adding more abort() > > t

Re: [Spice-devel] [PATCH spice-gtk] Add SPICE_MAX_CLIPBOARD environment variable

2013-11-19 Thread Marc-André Lureau
(To be applied after 1/5 from http://lists.freedesktop.org/archives/spice-devel/2013-November/015257.html) On Tue, Nov 19, 2013 at 5:50 PM, Marc-André Lureau wrote: > Allow to easily override default max-clipboard value with environment > variable. > --- > gtk/channel-main.c | 33 +++

[Spice-devel] [PATCH spice-gtk] Add SPICE_MAX_CLIPBOARD environment variable

2013-11-19 Thread Marc-André Lureau
Allow to easily override default max-clipboard value with environment variable. --- gtk/channel-main.c | 33 - 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/gtk/channel-main.c b/gtk/channel-main.c index d4b4416..2c02ece 100644 --- a/gtk/channel-main

Re: [Spice-devel] [PATCH spice-gtk 1/4] coroutine: don't force coroutine_init checking

2013-11-19 Thread Marc-André Lureau
On Tue, Nov 19, 2013 at 5:25 PM, Christophe Fergeau wrote: > On Tue, Nov 19, 2013 at 05:12:39PM +0100, Marc-André Lureau wrote: >> On Tue, Nov 19, 2013 at 5:09 PM, Christophe Fergeau >> wrote: >> > On Tue, Nov 19, 2013 at 11:05:13AM -0500, Marc-André Lureau wrote: >> >> >> >> >> >> - Origina

[Spice-devel] [PATCH spice-gtk] coroutine: abort on OOM or impossible conditions

2013-11-19 Thread Marc-André Lureau
Make the coroutine code more glib-like, by aborting on OOM or unhandled conditions. --- gtk/continuation.c| 8 +++- gtk/continuation.h| 2 +- gtk/coroutine.h | 3 ++- gtk/coroutine_gthread.c | 7 ++- gtk/coroutine_ucontext.c | 18 -- gtk/cor

Re: [Spice-devel] [PATCH spice-gtk 1/4] coroutine: don't force coroutine_init checking

2013-11-19 Thread Christophe Fergeau
On Tue, Nov 19, 2013 at 05:12:39PM +0100, Marc-André Lureau wrote: > On Tue, Nov 19, 2013 at 5:09 PM, Christophe Fergeau > wrote: > > On Tue, Nov 19, 2013 at 11:05:13AM -0500, Marc-André Lureau wrote: > >> > >> > >> - Original Message - > >> > On Tue, Nov 19, 2013 at 04:14:22PM +0100, Mar

Re: [Spice-devel] [PATCH spice-gtk 1/4] coroutine: don't force coroutine_init checking

2013-11-19 Thread Marc-André Lureau
On Tue, Nov 19, 2013 at 5:09 PM, Christophe Fergeau wrote: > On Tue, Nov 19, 2013 at 11:05:13AM -0500, Marc-André Lureau wrote: >> >> >> - Original Message - >> > On Tue, Nov 19, 2013 at 04:14:22PM +0100, Marc-André Lureau wrote: >> > > Just like any other C function >> > >> > NACK, I just

Re: [Spice-devel] [PATCH spice-gtk 1/4] coroutine: don't force coroutine_init checking

2013-11-19 Thread Christophe Fergeau
On Tue, Nov 19, 2013 at 11:05:13AM -0500, Marc-André Lureau wrote: > > > - Original Message - > > On Tue, Nov 19, 2013 at 04:14:22PM +0100, Marc-André Lureau wrote: > > > Just like any other C function > > > > NACK, I just added this annotation as not checking its return value will > > c

Re: [Spice-devel] [PATCH spice-gtk 1/4] coroutine: don't force coroutine_init checking

2013-11-19 Thread Marc-André Lureau
- Original Message - > On Tue, Nov 19, 2013 at 04:14:22PM +0100, Marc-André Lureau wrote: > > Just like any other C function > > NACK, I just added this annotation as not checking its return value will > cause very hard to track down failures (no usable backtraces), so better to > force

Re: [Spice-devel] [PATCH spice-gtk 2/4] coroutine: replace IN_MAIN_CONTEXT macro

2013-11-19 Thread Christophe Fergeau
On Tue, Nov 19, 2013 at 04:14:23PM +0100, Marc-André Lureau wrote: > Use a nicer function, with correct prefix. > Remove extra "context" from function name > --- > gtk/coroutine.h | 8 +--- > gtk/coroutine_gthread.c | 2 +- > gtk/coroutine_ucontext.c | 2 +- > gtk/coroutine_winfib

Re: [Spice-devel] [PATCH spice-gtk 1/4] coroutine: don't force coroutine_init checking

2013-11-19 Thread Christophe Fergeau
On Tue, Nov 19, 2013 at 04:14:22PM +0100, Marc-André Lureau wrote: > Just like any other C function NACK, I just added this annotation as not checking its return value will cause very hard to track down failures (no usable backtraces), so better to force it to be checked, especially as this is onl

[Spice-devel] [PATCH spice-gtk 1/4] coroutine: don't force coroutine_init checking

2013-11-19 Thread Marc-André Lureau
Just like any other C function --- gtk/coroutine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/coroutine.h b/gtk/coroutine.h index ef6f3db..8d6c406 100644 --- a/gtk/coroutine.h +++ b/gtk/coroutine.h @@ -56,7 +56,8 @@ struct coroutine }; #define IN_MAIN_CONTEXT (co

[Spice-devel] [PATCH spice-gtk 3/4] tests: add some coroutine tests

2013-11-19 Thread Marc-André Lureau
--- tests/Makefile.am | 18 +--- tests/coroutine.c | 136 ++ 2 files changed, 147 insertions(+), 7 deletions(-) create mode 100644 tests/coroutine.c diff --git a/tests/Makefile.am b/tests/Makefile.am index 9510e2c..6f80d93 100644 --- a/tes

[Spice-devel] [PATCH spice-gtk 2/4] coroutine: replace IN_MAIN_CONTEXT macro

2013-11-19 Thread Marc-André Lureau
Use a nicer function, with correct prefix. Remove extra "context" from function name --- gtk/coroutine.h | 8 +--- gtk/coroutine_gthread.c | 2 +- gtk/coroutine_ucontext.c | 2 +- gtk/coroutine_winfibers.c | 2 +- gtk/gio-coroutine.c | 2 +- gtk/spice-channel-priv.h | 2 +-

[Spice-devel] [PATCH spice-gtk 4/4] coroutine: make gthread coroutine pass tests

2013-11-19 Thread Marc-André Lureau
The coroutine entry() return value must be passed via the caller->data, since coroutine_swap() returns from->data. (this is needed because coroutine_swap() argument is used both to return from entry() or to send data to a running coroutine) When leaving a coroutine, clear its caller. Return corre

Re: [Spice-devel] python bindings documentation/sample

2013-11-19 Thread Marc-André Lureau
- Original Message - > Hello, > > I installed the python bindings library but I don't see any > documentation/sample. The old python bindings should be deprecated soon. You should be using the GI bindings. > I can connect to the server using the python SSL library and the > connection

[Spice-devel] python bindings documentation/sample

2013-11-19 Thread Michal Suchanek
Hello, I installed the python bindings library but I don't see any documentation/sample. I can connect to the server using the python SSL library and the connection appears to work but I don't know how to create a spice session. The Spice GTK C documentation suggests to instantiate SpiceSession

Re: [Spice-devel] Fedora 19 and 20 spice guest Xorg crashes

2013-11-19 Thread Nahum Shalman
On 11/18/2013 05:32 PM, Dave Airlie wrote: On Tue, Nov 19, 2013 at 7:04 AM, Nahum Shalman wrote: Context: Host is running qemu-kvm 1.1.2 and spice 0.12.2. Fedora 16 VMs ran rock solid on these same virtualization hosts. The Fedora 19 and 20(testing) VMs are running xf86-video-qxl compiled from

Re: [Spice-devel] Implementing channel between module at spice client and guest OS

2013-11-19 Thread Marc-André Lureau
Hi - Original Message - > > -chardev spiceport,id=spiceportfoobar,name=com.foobar -device > > virtserialport,bus=virtio-serial0.0,nr=2,chardev=spiceportfoobar,id=channel1,name=com.foobar > > Just to make sure, this will create serial device at > /dev/virtio-ports/com.foobar, right? yes

Re: [Spice-devel] Implementing channel between module at spice client and guest OS

2013-11-19 Thread Alon Bar-Lev
- Original Message - > From: "Marc-André Lureau" > To: "Alon Bar-Lev" > Cc: "spice-devel" > Sent: Tuesday, November 19, 2013 2:50:17 PM > Subject: Re: [Spice-devel] Implementing channel between module at spice > client and guest OS > > Hi > Hi, Thank you for your response. Just a

Re: [Spice-devel] Implementing channel between module at spice client and guest OS

2013-11-19 Thread Marc-André Lureau
Hi On Mon, Nov 18, 2013 at 7:22 PM, Alon Bar-Lev wrote: > Hello, > > I am trying to figure out how to implement a channel between guest OS process > and component at client machine. Reading the documentation I found and the > vd_agent code which is somewhat similar but I could not find complete

Re: [Spice-devel] patch[1/1] fix a memory leak in qxl_screen_init

2013-11-19 Thread Marian Krcmarik
ping.. "bigclouds", are you willing to finish the patch and address Jeremy's comment? It's imo worthy to fix and It would be nice If you can finish that. - Original Message - > From: "Jeremy White" > To: "bigclouds" > Cc: spice-devel@lists.freedesktop.org > Sent: Wednesday, November 6,

Re: [Spice-devel] [spice-gtk] Check coroutine_init() return value

2013-11-19 Thread Marc-André Lureau
ack series - Original Message - > On Mon, Nov 18, 2013 at 06:00:16PM +0100, Christophe Fergeau wrote: > > coroutine_init() can fail, but spice-channel.c was not checking its return > > value, which could lead to some crashes if coroutine_init() failed and we > > then try to use coroutine_y