[Spice-devel] intel vgpu & spice & cursor

2017-10-12 Thread Gerd Hoffmann
Hi, We need to figure a way to handle intel vgpu with spice, especially how to handle the cursor. What we'll get from the vgpu is two dma-bufs: One for the primary plane (aka guest display), one for the cursor plane. We also get the position of the cursor. We do *not* get the hotspot of the

Re: [Spice-devel] qxl and page flip

2017-10-12 Thread Gerd Hoffmann
On Fri, 2017-10-06 at 12:40 +0200, Gerd Hoffmann wrote: >   Hi, > > > Would not actually be possible to detect a destroy + create > > commands and avoid having to change any version/driver? > > Well, that would be option (3) of the original mail:  Make the spice > client hide this.  Basically not

Re: [Spice-devel] intel vgpu & spice & cursor

2017-10-12 Thread Marc-André Lureau
Hi - Original Message - > Hi, > > We need to figure a way to handle intel vgpu with spice, especially how > to handle the cursor. > > What we'll get from the vgpu is two dma-bufs: One for the primary > plane (aka guest display), one for the cursor plane. We also get the > position of t

Re: [Spice-devel] intel vgpu & spice & cursor

2017-10-12 Thread Gerd Hoffmann
On Thu, 2017-10-12 at 05:42 -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > Hi, > > > > We need to figure a way to handle intel vgpu with spice, especially > > how > > to handle the cursor. > > > > What we'll get from the vgpu is two dma-bufs:  One for the primary > > p

[Spice-devel] [spice-server 1/5] utils: Introduce helpers to map channel types to names

2017-10-12 Thread Christophe Fergeau
spice_server_set_channel_security() is already mostly doing that. We can make its code more generic, and introduce a red_channel_get_name() method. This method will then be used to make debug messages more readable by showing the actual channel name rather than its type as an int. --- server/red-c

[Spice-devel] [spice-server 4/5] build: Add GEnum generation for RedPipeItem types

2017-10-12 Thread Christophe Fergeau
--- server/Makefile.am| 21 ++--- server/common-graphics-channel.h | 4 ++-- server/cursor-channel-client.h| 4 ++-- server/display-channel-private.h | 4 ++-- server/inputs-channel-client.h| 4 ++-- server/main-channel-client.h | 4 ++-- server/red-

[Spice-devel] [spice-server 2/5] channel: Introduce logging helpers

2017-10-12 Thread Christophe Fergeau
This commit adds red_channel_{debug,warning,printerr}() helpers which will prepend the log message with "channel-name:id (%p)". It also changes various locations which were doing this manually. --- server/red-channel-client.c | 34 ++ server/red-channel.c| 1

[Spice-devel] [spice-server 5/5] channel-client: Implement red_channel_client_get_pipe_item_name

2017-10-12 Thread Christophe Fergeau
Given a RedPipeItem, this returns a string corresponding to its type, which is useful while debugging to get a better feel of what's going on. This is achieved by introducing a new RedChannelClientClass::red_pipe_item_type member, which is then used together with the enum data generated by glib-mk

[Spice-devel] [spice-server 0/5] Debug helpers

2017-10-12 Thread Christophe Fergeau
Hey, While looking at that migration bug, these helpers proved quite helpful to get human-readable logs out of spice-server. Beginning of the patch series adds RedChannel helpers so that logs show a human-readable channel name. Second half of the patch series uses glib enum introspection in order

[Spice-devel] [spice-server 3/5] channel-client: Remove SpiceServerError typedef

2017-10-12 Thread Christophe Fergeau
The typename is unused, and glib-mkenums would try to generate a type with the same name when parsing red-channel-client.h --- server/red-channel-client.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/red-channel-client.h b/server/red-channel-client.h index 56503c4

[Spice-devel] Need Help

2017-10-12 Thread ????????
how can i connect successful!___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] get into trouble of the spice-connect

2017-10-12 Thread ????????
My host is centos7, with virt-manager installed a windows7, the host installed spice-server, windows7 started the vdagent service, in the host using the remote viewer connection, reported socket I / O error, How can i deal with it?___ Spice-devel mai

Re: [Spice-devel] get into trouble of the spice-connect

2017-10-12 Thread Christophe Fergeau
On Thu, Oct 12, 2017 at 05:21:37PM +0800, 一位大叔 wrote: > My host is centos7, with virt-manager installed a windows7, the host > installed spice-server, windows7 started the vdagent service, in the > host using the remote viewer connection, reported socket I / O error, > How can i deal with it? I

Re: [Spice-devel] Spice Protocol Missing Headers

2017-10-12 Thread Christophe Fergeau
Hey, On Wed, Oct 11, 2017 at 02:33:00AM +1100, ge...@hostfission.com wrote: > I just spent the last hour searching for the header that contains "RedInit" > according to the Spice protocol specification, frustratingly not finding it. > > After digging through the client source I finally discovered

[Spice-devel] [PATCH spice-server v6 16/19] stream-channel: Activate streaming report from client

2017-10-12 Thread Frediano Ziglio
Setting the capability is not enough, each stream must be enabled so do so if client support them. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/stream-channel.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/server/stream-channel.c b/server/stre

[Spice-devel] [PATCH spice-server v6 14/19] stream-device: Create channel when needed

2017-10-12 Thread Frediano Ziglio
This allows a better id allocation as devices are created after fixed ones. Also will allow to support more easily multiple monitor. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/stream-device.c | 38 -- 1 file changed, 32 insertions(+)

[Spice-devel] [PATCH spice-server v6 13/19] stream-device: Start supporting resetting device when close/open on guest

2017-10-12 Thread Frediano Ziglio
When guest close the device the host device has to be reset too. This make easier to restart the guest device which can happen in case of reboot, agent issues or if we want to update the agent. Signed-off-by: Frediano Ziglio --- server/stream-channel.c | 34 ++ se

[Spice-devel] [PATCH spice-server v6 10/19] stream-channel: Support client connection/disconnection

2017-10-12 Thread Frediano Ziglio
When a new client is connected we must restart the stream so new clients can receive correct data without having to wait for the next full screen (which on idle screen could take ages). On disconnection we should tell the guest to stop streaming not wasting resources to stream not needed data. Sig

[Spice-devel] [PATCH spice-server v6 07/19] stream-device: Handle streaming data from device to channel

2017-10-12 Thread Frediano Ziglio
Handle stream data from device sending to the channel. The StreamChannel will forward the data to the clients using standard DisplayChannel messages, and will create and destroy streams as necessary. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/stream-channel.c | 103 +++

[Spice-devel] [PATCH spice-server v6 17/19] WIP stream-device: handle cursor from device

2017-10-12 Thread Frediano Ziglio
TODO: reuse message code buffering code to handle msg_buf can be reused by different messages we should limit msg_buf base on type of messages Signed-off-by: Frediano Ziglio --- server/stream-device.c | 138 - 1 file changed, 137 insert

[Spice-devel] [PATCH spice-server v6 06/19] stream-device: Create channel for stream device

2017-10-12 Thread Frediano Ziglio
So can be used by the device to communicate with the clients. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/stream-channel.c | 52 +++-- server/stream-device.c | 14 + 2 files changed, 64 insertions(+), 2 deletions(

[Spice-devel] [PATCH spice-server v6 08/19] stream-channel: Allows not fixed size

2017-10-12 Thread Frediano Ziglio
Remove the fixed size stream and support any display size. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/stream-channel.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/server/stream-channel.c b/server/stream-channel.c

[Spice-devel] [PATCH spice-server v6 03/19] stream-device: Start parsing new protocol from guest

2017-10-12 Thread Frediano Ziglio
Parse the data sent from the guest to the streaming device. At the moment, the data is simply discarded after it is parsed. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/stream-device.c | 128 +++-- 1 file changed, 124 insertion

[Spice-devel] [PATCH spice-server v6 09/19] stream-channel: Allows to register callback to get new stream request

2017-10-12 Thread Frediano Ziglio
The channel needs to communicate when it receive a new stream request from the guest. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/stream-channel.c | 12 server/stream-channel.h | 6 ++ 2 files changed, 18 insertions(+) diff --git a/server/stream-chann

[Spice-devel] [PATCH spice-server v6 12/19] char-device: Do not stop and clear interface on reset

2017-10-12 Thread Frediano Ziglio
Currently, red_char_device_reset() stops the device, clears all pending messages, and clears its device instance. After this function is called, the char device will not work again until it is assigned a new device instance and restarted. This is fine for the vdagent char device, which is currently

[Spice-devel] [PATCH spice-server v6 11/19] stream-channel: Do not show an empty blank screen on start

2017-10-12 Thread Frediano Ziglio
Start showing something when we have a surface and stream instead of showing a blank screen which is now not useful. Was useful for debugging purposes to understand that the new channel was sending messages correctly to client and client could handle them. Signed-off-by: Frediano Ziglio Acked-by:

[Spice-devel] [PATCH spice-server v6 18/19] stream-device: Implement mouse movement

2017-10-12 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/stream-device.c | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/server/stream-device.c b/server/stream-device.c index 6210cb5a5..3c3d35dcb 100644 --- a/server/stream-devic

[Spice-devel] [PATCH spice-server v6 19/19] WIP: Try to reduce delay

2017-10-12 Thread Frediano Ziglio
This is an hacky patch that tries to reduce lag --- server/stream-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/stream-device.c b/server/stream-device.c index 3c3d35dcb..5643ddaf7 100644 --- a/server/stream-device.c +++ b/server/stream-device.c @@ -205,7 +205,

[Spice-devel] [PATCH spice-server v6 15/19] stream-device: Limit sending queue from guest to server

2017-10-12 Thread Frediano Ziglio
Do not allow the guest to fill host memory. Also having a huge queue mainly cause to have a higher video latency. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/stream-channel.c | 41 - server/stream-channel.h | 10 ++ server

[Spice-devel] [PATCH spice-server v6 05/19] stream-channel: Start implementing DisplayChannel properly

2017-10-12 Thread Frediano Ziglio
Handle messages from clients. Send some messages to clients. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/stream-channel.c | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/server/stream-channel.c b/server/strea

[Spice-devel] [PATCH spice-server v6 04/19] stream-channel: Write a base channel to implement the streaming

2017-10-12 Thread Frediano Ziglio
Currently only compile, not used and not much sense Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/Makefile.am | 2 + server/stream-channel.c | 175 server/stream-channel.h | 53 +++ 3 files changed, 230

[Spice-devel] [PATCH spice-server v6 01/19] Notify client of the creation of new channels dynamically

2017-10-12 Thread Frediano Ziglio
This allows the server to add channels after the client is connected. Signed-off-by: Frediano Ziglio --- Changes since v5: - added a comment before sending a new channel list to client; - renamed channels_list_sent to initial_channels_list_sent; - use new red_channel_pipes_add. Changes since v4:

[Spice-devel] [PATCH spice-server v6 00/19] Allows guests to send display data as video streams

2017-10-12 Thread Frediano Ziglio
This patcheset add a device to allow guest machines with assigned hardware devices to send encoded video and other informations that will be handled as a normal display by Spice. New GPU devices are capable to capture and encode video in an efficient way. As the GPU in this case is assigned to the

[Spice-devel] [PATCH spice-server v6 02/19] stream-device: Add device to handle streaming

2017-10-12 Thread Frediano Ziglio
Add a stub device in guest. The aim of this device is to make it possible for the guest to send a stream through a DisplayChannel (in the sense of protocol channel). This stub allows the guest to send some data and you can see some debug lines of data arrived on host logs. Signed-off-by: Frediano

Re: [Spice-devel] [PATCH spice-server] red-channel: Remove red_channel_init_outgoing_messages_window

2017-10-12 Thread Christophe Fergeau
On Fri, Oct 06, 2017 at 11:58:32AM +0100, Frediano Ziglio wrote: > This function does not make much sense anymore. > Is called by RedVmcChannel which doesn't use RedChannelClient ACKs > so the variable changed are not used. > Also is called when the channel is constructed to set client > fields h

[Spice-devel] [PATCH spice-server 2/2] reds: Remove leak allocating migration state

2017-10-12 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/reds.c | 2 +- server/reds.h | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/server/reds.c b/server/reds.c index 6c8e06959..344f79916 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3378,7 +3378,7 @@ SPICE_GNUC_VISIBLE int spic

[Spice-devel] [PATCH spice-server 1/2] tests: Check leaks registering migration interface

2017-10-12 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/tests/test-leaks.c | 36 1 file changed, 36 insertions(+) diff --git a/server/tests/test-leaks.c b/server/tests/test-leaks.c index 04dcac4f4..7032000aa 100644 --- a/server/tests/test-leaks.c +++ b/server/tests/test-le

Re: [Spice-devel] [PATCH spice-server] inputs-channel: Check message size handling migration data

2017-10-12 Thread Christophe Fergeau
On Fri, Oct 06, 2017 at 11:58:33AM +0100, Frediano Ziglio wrote: > Prevent possible buffer reading overflow. > Note that message pointer must be valid and data are checked > value by value so even on overflow you just get an error. > > Signed-off-by: Frediano Ziglio > --- > server/inputs-channel

Re: [Spice-devel] [PATCH spice-server] red-channel: Remove red_channel_init_outgoing_messages_window

2017-10-12 Thread Frediano Ziglio
> > On Fri, Oct 06, 2017 at 11:58:32AM +0100, Frediano Ziglio wrote: > > This function does not make much sense anymore. > > Is called by RedVmcChannel which doesn't use RedChannelClient ACKs > > so the variable changed are not used. > > > > Also is called when the channel is constructed to set

Re: [Spice-devel] [PATCH spice-server] inputs-channel: Check message size handling migration data

2017-10-12 Thread Frediano Ziglio
> > On Fri, Oct 06, 2017 at 11:58:33AM +0100, Frediano Ziglio wrote: > > Prevent possible buffer reading overflow. > > Note that message pointer must be valid and data are checked > > value by value so even on overflow you just get an error. > > > > Signed-off-by: Frediano Ziglio > > --- > > se

Re: [Spice-devel] [PATCH spice-server] red-channel: Remove red_channel_init_outgoing_messages_window

2017-10-12 Thread Christophe Fergeau
On Thu, Oct 12, 2017 at 11:06:02AM -0400, Frediano Ziglio wrote: > > > > On Fri, Oct 06, 2017 at 11:58:32AM +0100, Frediano Ziglio wrote: > > > This function does not make much sense anymore. > > > Is called by RedVmcChannel which doesn't use RedChannelClient ACKs > > > so the variable changed are

Re: [Spice-devel] qxl and page flip

2017-10-12 Thread Dave Airlie
On 12 October 2017 at 19:16, Gerd Hoffmann wrote: > On Fri, 2017-10-06 at 12:40 +0200, Gerd Hoffmann wrote: >> Hi, >> >> > Would not actually be possible to detect a destroy + create >> > commands and avoid having to change any version/driver? >> >> Well, that would be option (3) of the original

Re: [Spice-devel] qxl and page flip

2017-10-12 Thread Frediano Ziglio
> > On 12 October 2017 at 19:16, Gerd Hoffmann wrote: > > On Fri, 2017-10-06 at 12:40 +0200, Gerd Hoffmann wrote: > >> Hi, > >> > >> > Would not actually be possible to detect a destroy + create > >> > commands and avoid having to change any version/driver? > >> > >> Well, that would be option

Re: [Spice-devel] qxl and page flip

2017-10-12 Thread Gerd Hoffmann
Hi, > > Daniel Vetter suggested we take a different path for atomic page > > flip, and > > put back the copy mechanism until we can support atomic modesetting > > properly, > > which might be simpler than reverting all the qxl atomic work. > > > > Dave. > About my suggestion on create+destroy