[Spice-devel] An overview of Network redirection in Spice

2010-03-02 Thread Yonit Halperin
Hi, I’ve previously worked on the network redirection feature, which part of it is already in the upstream. Here, I present an overview of this feature and its status. Motivation -- In many scenarios, the network that the Spice client resides in is not accessible from the virtual machine.

[Spice-devel] [PATCH] client: x11: fix a crash caused by a call to a destroyed window.

2010-04-01 Thread Yonit Halperin
Happens when a focused window is destroyed without a focus out event, and a focus-in event occurs on another window. --- client/x11/red_window.cpp | 12 +--- client/x11/red_window_p.h |2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/client/x11/red_window.cpp

[Spice-devel] [PATCH] DrvSetPointerShape: handle surface which is not bitmap

2010-04-13 Thread Yonit Halperin
--- display/res.c | 99 +++- display/rop.c |2 +- display/rop.h |3 ++ 3 files changed, 87 insertions(+), 17 deletions(-) diff --git a/display/res.c b/display/res.c index 318ea9c..2ea9565 100644 --- a/display/res.c +++ b/display/res.c

[Spice-devel] [PATCH] server: fix invalid self loop in surfaces dependencies.

2010-04-28 Thread Yonit Halperin
Cyclic dependencies between surfaces mustn't occur. They can cause invalid rendering - recent drawables might be rendered before older ones. --- server/red_worker.c | 27 ++- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/server/red_worker.c

[Spice-devel] [PATCH 1/9] JPEG support: introducing jpeg encoding for spice bitmaps.

2010-06-01 Thread Yonit Halperin
--- client/Makefile.am |2 + client/canvas.cpp |1 + client/canvas.h|4 + client/jpeg_decoder.cpp| 147 + client/jpeg_decoder.h | 91 + client/red_gdi_canvas.cpp |3 +- client/red_gl_canvas.cpp |3 +-

[Spice-devel] [PATCH 2/9] support for lossy images in the pixmap cache and fill bits

2010-06-01 Thread Yonit Halperin
1) add an option to determine if a bitmap can be sent lossy to the client 2) when required, replacing lossy cache items with their correspending lossless bitmaps --- client/canvas.cpp|1 + client/canvas.h | 23 ++- client/shared_cache.hpp

[Spice-devel] [PATCH 3/9] lossy surface regions in the client: infrastructure for tracking and updating

2010-06-01 Thread Yonit Halperin
--- server/red_worker.c | 160 +++ 1 files changed, 160 insertions(+), 0 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 55d181d..357c6e8 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -657,6 +657,7 @@

[Spice-devel] [PATCH 6/9] send qxl commands to client: support for resending lossy components when jpeg compression is enabled

2010-06-01 Thread Yonit Halperin
--- server/red_worker.c | 655 +-- 1 files changed, 639 insertions(+), 16 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index feb8c8a..35139ef 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -6705,10 +6705,19 @@

[Spice-devel] [PATCH 7/9] not using jpeg when sending a surface to the client (the whole surface)

2010-06-01 Thread Yonit Halperin
When a surface is sent to the client using red_send_surface_image, operations were already performed on it. Thus it may combine, especially if it is a primary surface, both picture-like areas and areas that are more artificial. In order to avoid noticeable artifacts, such surface will be sent

[Spice-devel] [PATCH 9/9] init/destroy lossy surface region

2010-06-01 Thread Yonit Halperin
--- server/red_worker.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 3b62311..b2f514a 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -8965,6 +8965,7 @@ static void red_send_surface_create(DisplayChannel

[Spice-devel] [PATCH] server: fix bitmap flags assignment in red_send_image

2010-06-02 Thread Yonit Halperin
SPICE_IMAGE_FLAGS_HIGH_BITS_SET was assigned to the wrong field --- server/red_worker.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index b2f514a..b1fb642 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@

[Spice-devel] jpeg support in spice-protocol

2010-06-09 Thread Yonit Halperin
Forgot to add the protocol patches when sending the jpeg support patches for spice. Cheers, Yonit. ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH 2/2] cache support for replacing images that were compressed using jpeg with lossless images

2010-06-09 Thread Yonit Halperin
--- spice/draw.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/spice/draw.h b/spice/draw.h index 91391c6..1cf59c8 100644 --- a/spice/draw.h +++ b/spice/draw.h @@ -168,11 +168,13 @@ enum { SPICE_IMAGE_TYPE_FROM_CACHE, SPICE_IMAGE_TYPE_SURFACE,

[Spice-devel] protocol changes for ZLIB over GLZ

2010-06-20 Thread Yonit Halperin
rebasing ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH] add image type for images that are compressed by zlib after they have been compressed by glz

2010-06-20 Thread Yonit Halperin
--- spice/draw.h | 11 +++ spice/enums.h |1 + 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/spice/draw.h b/spice/draw.h index ff70e7b..874681d 100644 --- a/spice/draw.h +++ b/spice/draw.h @@ -182,6 +182,17 @@ typedef struct SPICE_ATTR_PACKED SpiceJPEGImage {

[Spice-devel] [PATCH] add image type for RGBA bitmaps that were compressed by a combination of JPEG (RGB) and LZ (alpha channel).

2010-06-20 Thread Yonit Halperin
--- spice/draw.h | 12 spice/enums.h |5 + 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/spice/draw.h b/spice/draw.h index 874681d..e6fab5c 100644 --- a/spice/draw.h +++ b/spice/draw.h @@ -193,6 +193,18 @@ typedef struct SPICE_ATTR_PACKED

[Spice-devel] [PATCH] Lossy compression of RGBA images (on WAN connection)

2010-06-20 Thread Yonit Halperin
The RGB channels are compressed using JPEG. The alpha channel is compressed using LZ. --- common/canvas_base.c | 92 +++- common/lz.c | 12 common/lz_common.h |9 ++-- server/red_worker.c | 144 -

[Spice-devel] [PATCH 1/3] remove unnecessary send of SPICE_MSG_DISPLAY_RESET

2010-06-27 Thread Yonit Halperin
when SPICE_MSG_DISPLAY_RESET was sent, SPICE_MSG_DISPLAY_SURFACE_DESTROY had already been sent for all surfaces. It also caused a client crash since DisplayChannel::handle_reset assumes that screen exists. --- server/red_worker.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-)

Re: [Spice-devel] Status of 0.6 release

2010-07-05 Thread Yonit Halperin
On 07/05/2010 12:44 PM, Alexander Larsson wrote: * Improved support for WAN We have landed support for lossy compression (jpeg) and lz compression of glz images, for low bandwidth mode. We need to add some command line arguments to allow this to be enabled/tuned. This is a good basis for wan

[Spice-devel] QXL fixes

2010-07-12 Thread Yonit Halperin
These patches fix several BSODs and panics. They are coupled with additions to spice-protocol and qemu/hw/qxl.c. ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH 1/3] Fix global resources cleanup

2010-07-12 Thread Yonit Halperin
--- display/res.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/display/res.c b/display/res.c index 05bc9e6..c769aeb 100644 --- a/display/res.c +++ b/display/res.c @@ -322,7 +322,7 @@ void CleanGlobalRes() { UINT32 i; -if (!global_res) { +if

[Spice-devel] [PATCH] add QXL_IO_RESET_RAM_DRAW_DATA

2010-07-12 Thread Yonit Halperin
--- spice/qxl_dev.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h index 7a121ad..fa43dc1 100644 --- a/spice/qxl_dev.h +++ b/spice/qxl_dev.h @@ -80,6 +80,7 @@ enum { QXL_IO_DESTROY_PRIMARY, QXL_IO_DESTROY_SURFACE_WAIT,

[Spice-devel] [PATCH] qxl: add support for QXL_IO_RESET_RAM_DRAW_DATA

2010-07-12 Thread Yonit Halperin
--- hw/qxl.c | 54 ++ 1 files changed, 42 insertions(+), 12 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index ab1587a..2501b39 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -179,22 +179,29 @@ static void init_qxl_rom(PCIQXLDevice *d) d-modes

[Spice-devel] [PATCH] server: enabling/disabling jpeg and zlib-over-glz via spice command line args

2010-07-12 Thread Yonit Halperin
--- server/red_dispatcher.c |4 server/red_worker.c | 27 --- server/red_worker.h |2 ++ server/reds.c | 26 ++ server/spice.h | 10 ++ 5 files changed, 66 insertions(+), 3 deletions(-) diff

Re: [Spice-devel] [PATCH 3/3] Fix corrupted ram data (e.g., release_ring), and unsynchronized worker, after driver is disabled and re-enabled.

2010-07-12 Thread Yonit Halperin
On 07/12/2010 12:43 PM, Gerd Hoffmann wrote: On 07/12/10 11:15, Yonit Halperin wrote: On logoff in Win7 guest, and on switch user and login into Winxp guest, the driver is disabled and re-enabled (while the miniport in not reset). However, before the fix, all the draw objects, e.g., surfaces

[Spice-devel] QXL fixes - version 2

2010-07-12 Thread Yonit Halperin
These patches fix several BSODs and panics. Version 2: no change in qemu and spic-protocol. The old reset method is performed on each device when the driver is disabled. ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org

[Spice-devel] [PATCH 1/3] Fix global resources cleanup

2010-07-12 Thread Yonit Halperin
--- display/res.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/display/res.c b/display/res.c index 05bc9e6..c769aeb 100644 --- a/display/res.c +++ b/display/res.c @@ -322,7 +322,7 @@ void CleanGlobalRes() { UINT32 i; -if (!global_res) { +if

[Spice-devel] [PATCH] client: fix - exit on bad display-effect argument

2010-08-08 Thread Yonit Halperin
--- client/application.cpp |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/client/application.cpp b/client/application.cpp index 3dafbc6..490cd8c 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -1926,6 +1926,8 @@ bool

[Spice-devel] [PATCH] server: remove unnecessary dependency between surfaces and Glz drawables

2010-08-11 Thread Yonit Halperin
Fixes freedesktop bug #28568 --- server/red_worker.c | 38 -- 1 files changed, 4 insertions(+), 34 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 1c32a26..87f5582 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@

[Spice-devel] [Qxl PATCH] Change surfaces allocation method.

2010-08-17 Thread Yonit Halperin
The driver no longer claims to support DirectDraw. It uses mspace to allocate surfaces and not HeapVidMemAllocAligned. This fixes freedesktop bug #29254. --- display/driver.c | 18 ++- display/qxldd.h | 19 +-- display/res.c| 158

Re: [Spice-devel] [Qxl PATCH] Change surfaces allocation method.

2010-08-18 Thread Yonit Halperin
On 08/17/2010 05:36 PM, Alexander Larsson wrote: On Tue, 2010-08-17 at 14:26 +0300, Yonit Halperin wrote: The driver no longer claims to support DirectDraw. It uses mspace to allocate surfaces and not HeapVidMemAllocAligned. This fixes freedesktop bug #29254. Ack (although you should git rm

[Spice-devel] [Qxl PATCH] aligning surfaces stride to 4

2010-08-18 Thread Yonit Halperin
--- display/res.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/display/res.c b/display/res.c index 3fe5fe6..6be006e 100644 --- a/display/res.c +++ b/display/res.c @@ -600,15 +600,17 @@ _inline void GetSurfaceMemory(PDev *pdev, UINT32 x, UINT32 y, UINT32

[Spice-devel] [PATCH] Limiting video streaming to the primary surface. freedesktop bug #28088.

2010-08-19 Thread Yonit Halperin
--- server/red_worker.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index cbfe405..6fd01d5 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -1516,7 +1516,10 @@ static inline void

Re: [Spice-devel] [PATCH] Limiting video streaming to the primary surface. freedesktop bug #28088.

2010-08-19 Thread Yonit Halperin
Please ignore the patch. I forgot to add something to it. I will resend it later. ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH] Limiting video streaming to the primary surface. freedesktop bug #28088.

2010-08-22 Thread Yonit Halperin
--- server/red_worker.c | 47 --- 1 files changed, 40 insertions(+), 7 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index cbfe405..ef9aa53 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -1516,7 +1516,10 @@ static

Re: [Spice-devel] [PATCH 1/8] Move SurfaceInfo structure

2010-08-22 Thread Yonit Halperin
On 08/20/2010 09:54 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com This is in preparation for using it in DevRes Ack ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org

Re: [Spice-devel] [PATCH 2/8] Add helper functions for surface info - id mapping

2010-08-22 Thread Yonit Halperin
On 08/20/2010 09:54 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com --- display/driver.c |6 ++ display/res.c |4 ++-- display/surface.c |8 display/surface.h | 20 ++-- 4 files changed, 22 insertions(+), 16 deletions(-)

Re: [Spice-devel] [PATCH 3/8] Move SurfaceInfo to global data

2010-08-22 Thread Yonit Halperin
On 08/20/2010 09:54 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com When we release a surface resource, for instance when AllocMem gets OOM, we call ReleaseOutput with the pdev in use (i.e. probably the currently active one). However, its possible that the resource we free

Re: [Spice-devel] [PATCH 4/8] Always release free resources when allocating

2010-08-22 Thread Yonit Halperin
On 08/20/2010 09:54 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com Leaving around potentially freeable resources when you're about to allocate just increases the risk for fragmentation, which is bad, especially for the vram where we do many large allocations in a limited

Re: [Spice-devel] [PATCH 5/8] Make malloc_sem global

2010-08-22 Thread Yonit Halperin
On 08/20/2010 09:54 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com It protects shared data (mspace info) so it needs to be shared. --- display/driver.c | 22 ++ display/qxldd.h |2 +- display/res.c| 17 + 3 files

Re: [Spice-devel] [PATCH 7/8] Store surfaces_used in a bit-array

2010-08-22 Thread Yonit Halperin
On 08/20/2010 09:54 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com This is smaller than a byte array, and allows us to skip full blocks of 32 ids in one check. --- Hi, why not use a linked list, for free surfaces, in a static UINT32[n_surfaces] array? Any reason besides

Re: [Spice-devel] [PATCH 7/8] Store surfaces_used in a bit-array

2010-08-22 Thread Yonit Halperin
On 08/22/2010 03:56 PM, Yonit Halperin wrote: On 08/20/2010 09:54 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com This is smaller than a byte array, and allows us to skip full blocks of 32 ids in one check. --- Hi, why not use a linked list, for free surfaces, in a static

Re: [Spice-devel] [PATCH 0/8] Win32 driver fixes for 0.6.0

2010-08-22 Thread Yonit Halperin
On 08/20/2010 09:54 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com This is a bunch of changes I think we we need before the 0.6.0 release. They do: * Make SurfaceInfo global to fix potential memory corruption (#29053) * Make malloc_sem global since it protects a the

[Spice-devel] [PATCH 2/2] server: remove the no longer used glz drawables list that was maintained for each surface.

2010-08-23 Thread Yonit Halperin
From: Yonit Halperin yhalp...@yhalperi.tlv.redhat.com --- server/red_worker.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 0e5565f..d94f3e4 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -594,11

Re: [Spice-devel] [PATCH] Limiting video streaming to the primary surface. freedesktop bug #28088.

2010-08-23 Thread Yonit Halperin
Fixed and pushed - Original Message - From: Alexander Larsson al...@redhat.com To: Yonit Halperin yhalp...@redhat.com Cc: spice-devel@lists.freedesktop.org Sent: Monday, August 23, 2010 1:15:57 PM (GMT+0200) Auto-Detected Subject: Re: [Spice-devel] [PATCH] Limiting video streaming

Re: [Spice-devel] [PATCH 1/7] Make malloc_sem global

2010-08-24 Thread Yonit Halperin
On 08/24/2010 11:41 AM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com It protects shared data (mspaces info) so it needs to be shared. Ack. I guess cmd_sem and print_sem should be made global as well. ___ Spice-devel mailing list

Re: [Spice-devel] [PATCH 3/7] Release resources before allocating

2010-08-24 Thread Yonit Halperin
On 08/24/2010 11:41 AM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com Before trying to allocate memory we free a large chunk of freeable resources. Leaving the resources unfreed before allocating increases the risks of unnecessarily fragmenting the heap, which is bad,

Re: [Spice-devel] [PATCH 4/7] Free surface id if surface construction failed

2010-08-24 Thread Yonit Halperin
On 08/24/2010 11:41 AM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com --- display/driver.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) Ack ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org

Re: [Spice-devel] [PATCH 5/7] Add union to SurfaceInfo to put in next_free pointer

2010-08-24 Thread Yonit Halperin
On 08/24/2010 11:41 AM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com --- display/driver.c |2 +- display/qxldd.h | 10 +++--- display/surface.c |2 +- display/surface.h |2 +- 4 files changed, 10 insertions(+), 6 deletions(-) Ack. Liked the

Re: [Spice-devel] [PATCH 6/7] New list based surface allocator

2010-08-24 Thread Yonit Halperin
On 08/24/2010 11:41 AM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com We store a free list in the SurfaceInfos, using a field not otherwise used for free surfaces. Also, treat base_mem == NULL as surface in use for easy checking. base_mem != NULL --- display/qxldd.h |

Re: [Spice-devel] [PATCH 7/7] Remove unused surfaces_used

2010-08-24 Thread Yonit Halperin
On 08/24/2010 11:41 AM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com --- display/qxldd.h |1 - display/res.c | 12 +--- 2 files changed, 1 insertions(+), 12 deletions(-) Ack ___ Spice-devel mailing list

[Spice-devel] [PATCH] server: clean glz drawables when reseting qxl

2010-08-25 Thread Yonit Halperin
When the we reset qxl, we destroy all srufaces. Since surfaces and glz drawables are no longer dependent, we need to call red_display_clear_glz_drawables explicitly in order to clear all our drawables references in the server. --- server/red_worker.c |3 +++ 1 files changed, 3 insertions(+),

[Spice-devel] [PATCH 0/3] Server fixes and cleanups for destorying surface

2010-08-26 Thread Yonit Halperin
Fixes for server crash, #29750. And cleanups in destroy surfaces code. Yonit Halperin (3): server: consider also PIPE_ITEM_UPGRADE when searching for drawables in red_clear_surface_drawables_from_pipe server: really wait for a surface to be destroyed, when calling destroy_surface_wait

[Spice-devel] [PATCH 2/3] server: really wait for a surface to be destroyed, when calling destroy_surface_wait

2010-08-26 Thread Yonit Halperin
Waiting till all the pipe items that are dependent on the surface will be sent. This was probably the cause for freedesktop bug #29750. --- server/red_worker.c | 84 +- 1 files changed, 75 insertions(+), 9 deletions(-) diff --git

Re: [Spice-devel] [PATCH 1/2] server: red_send_image() initialize bitmap.flags

2010-08-29 Thread Yonit Halperin
On 08/26/2010 09:10 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com We're currently sending this to the network based on random memory. --- server/red_worker.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/server/red_worker.c

Re: [Spice-devel] [PATCH 2/2] server: red_send_image() - append image data to right marshaller

2010-08-29 Thread Yonit Halperin
On 08/26/2010 09:10 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com The actual bitmap data was added to the main marshaller rather than the submarshaller that pointed to the SpiceImage part. This made us send too short messages failing demarshalling in the client. ---

Re: [Spice-devel] [PATCH 2/2] server: red_send_image() - append image data to right marshaller

2010-08-29 Thread Yonit Halperin
On 08/26/2010 09:10 PM, al...@redhat.com wrote: From: Alexander Larssonal...@redhat.com The actual bitmap data was added to the main marshaller rather than the submarshaller that pointed to the SpiceImage part. This made us send too short messages failing demarshalling in the client. ---

Re: [Spice-devel] [PATCH] vdagent: support announce_capabilities

2010-08-29 Thread Yonit Halperin
On 29/08/2010 20:27, Alon Levy wrote: --- vdagent/vdagent.cpp | 52 ++- 1 files changed, 51 insertions(+), 1 deletions(-) diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp index b1f47c0..8cba032 100644 --- a/vdagent/vdagent.cpp +++

[Spice-devel] [PATCH] server: fix red_current_flush to flush only the surface that was given as parameter

2010-08-30 Thread Yonit Halperin
A side effect of the previous red_current_flush, which flushed all the surfaces, and was called on a new display channel connection, was that red_handle_drawable_surfaces_client_synced sent the most updated surfaces images when needed. However, now, it should explicitly call red_current_flush.

[Spice-devel] [[Qemu PATCH]] spice: initialize QXLDrawable.surfaces_dest in VGA mode

2010-08-31 Thread Yonit Halperin
--- spice-display.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/spice-display.c b/spice-display.c index fec2432..fed2056 100644 --- a/spice-display.c +++ b/spice-display.c @@ -72,6 +72,9 @@ SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *ssd)

[Spice-devel] [PATCH] server: red_current_add_equal - don't push a drawable to the middle of the pipe if it depends on surfaces.

2010-08-31 Thread Yonit Halperin
This will prevent: 1) rendering problems (commands sent to the client in the wrong order) 2) sending commands for surfaces that haven't been created yet on the client side. --- server/red_worker.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git

Re: [Spice-devel] [PATCH] server: red_current_add_equal - don't push a drawable to the middle of the pipe if it depends on surfaces.

2010-08-31 Thread Yonit Halperin
On 08/31/2010 11:05 AM, Gerd Hoffmann wrote: +static inline int is_drawable_independent_from_surfaces(Drawable *drawable) +{ + int x; + + for (x = 0; x 3; ++x) { + if (drawable-surfaces_dest[x] != -1) { + return FALSE; + } + } + return TRUE; +} What happens if this meets qemu without the

Re: [Spice-devel] [PATCH] server: red_current_add_equal - don't push a drawable to the middle of the pipe if it depends on surfaces.

2010-08-31 Thread Yonit Halperin
On 08/31/2010 11:24 AM, Gerd Hoffmann wrote: On 08/31/10 10:11, Yonit Halperin wrote: On 08/31/2010 11:05 AM, Gerd Hoffmann wrote: +static inline int is_drawable_independent_from_surfaces(Drawable *drawable) +{ + int x; + + for (x = 0; x 3; ++x) { + if (drawable-surfaces_dest[x] != -1

Re: [Spice-devel] [PATCH] server: red_current_add_equal - don't push a drawable to the middle of the pipe if it depends on surfaces.

2010-08-31 Thread Yonit Halperin
On 08/31/2010 12:46 PM, Gerd Hoffmann wrote: While we are at it: How should surfaces_dest (and surfaces_rect) be filled for spice 0.4 commands? Right now they are just zero-initialized (see red_get_compat_drawable() in red_parse_qxl.c). Best to fill surfaces_dest with -1. For consistency

[Spice-devel] [PATCH] server: avoid creating a stream from traces more than once for the same drawable

2010-09-01 Thread Yonit Halperin
could have caused ASSERT(!drawable-stream) in red_create_stream --- server/red_worker.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 36c2763..74d26fe 100644 --- a/server/red_worker.c +++

Re: [Spice-devel] Announcing Spice 0.6.0

2010-09-01 Thread Yonit Halperin
On 09/01/2010 12:14 PM, Bitman Zhou wrote: I am using Ubuntu 10.04, Lucid, x86_64: sino...@zgd-class-node:~/build/spice-0.6/qemu-spice.kvm.v18$ gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5'

Re: [Spice-devel] Questions about image cache (in server/red_worker.c)

2011-05-19 Thread Yonit Halperin
Hi, you are not looking at the right cache. THe right cache is red_client_shared_cache.h (shared among multiple monitors; doesn't store images, only ids). The cached you looked at is the cache of the canvas. Cheers, Yonit. On 05/18/2011 10:54 AM, Yaniv Kaul wrote: I suspect the image

Re: [Spice-devel] Questions about image cache (in server/red_worker.c)

2011-05-19 Thread Yonit Halperin
On 05/19/2011 09:42 AM, Yaniv Kaul wrote: On 05/19/2011 09:18 AM, Yonit Halperin wrote: Hi, you are not looking at the right cache. THe right cache is red_client_shared_cache.h (shared among multiple monitors; doesn't store images, only ids). The cached you looked at is the cache

Re: [Spice-devel] [RFCv5 00/47] server: multiple client support

2011-05-22 Thread Yonit Halperin
Hi, Though implementing this feature using multiple instances of the core data structures, one instance per client, is straightforward and comprises a clean solution, I think that we should implement a more parsimonious solution with respect to memory and cpu, so we can support a large number

[Spice-devel] [PATCH 1/2] fix double release of a drawable. RHBZ #713474

2011-06-15 Thread Yonit Halperin
--- server/red_worker.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index bee86b9..c7869ad 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -1559,6 +1559,10 @@ static void

[Spice-devel] [PATCH 2/2] server: add missing calls to red_handle_drawable_surfaces_client_synced

2011-06-15 Thread Yonit Halperin
red_handle_drawable_surfaces_client_synced was called only from red_pipe_add_drawable, while it should also be called from red_pipe_add_drawable_after. Otherwise, the client might receive a command with a reference to a surface it doesn't hold and crash. --- server/red_worker.c |2 ++ 1

Re: [Spice-devel] synchronous io considered harmful

2011-06-19 Thread Yonit Halperin
Hi, On 06/17/2011 07:12 PM, Alon Levy wrote: On Fri, Jun 17, 2011 at 09:34:12AM +0200, Gerd Hoffmann wrote: On 06/16/11 21:21, Alon Levy wrote: Hi, I just had a short conversation with Marc-Andre about a bug in spice/qxl and it turns out there are a couple of possible solutions and I require

Re: [Spice-devel] [PATCH 0/9] add optional libjpeg-turbo use to spice-server mjpeg encoder

2011-06-28 Thread Yonit Halperin
On 06/28/2011 02:18 PM, Christophe Fergeau wrote: Hi, Currently, the mjpeg encoder has to preprocess the images it gets from spice-server to make sure the pixel order is the one libjpeg expects (RGB). This means iterating over the whole images swapping pixels since the input images are BGR or

Re: [Spice-devel] [PATCH 6/6] server/red_worker: send surface images on demand (UPDATE_MEM)

2011-06-30 Thread Yonit Halperin
On 06/20/2011 02:18 PM, Alon Levy wrote: From: Yonit Halperinyhalp...@redhat.com When surfaces are being reloaded to the worker (e.g., after UPDATE_MEM), we will send them to the client only if and when it needs them. --- server/red_worker.c | 33 +++-- 1 files

Re: [Spice-devel] [PATCH 6/6] server/red_worker: send surface images on demand (UPDATE_MEM)

2011-06-30 Thread Yonit Halperin
On 06/30/2011 12:58 PM, Alon Levy wrote: On Thu, Jun 30, 2011 at 12:36:27PM +0300, Yonit Halperin wrote: On 06/20/2011 02:18 PM, Alon Levy wrote: From: Yonit Halperinyhalp...@redhat.com When surfaces are being reloaded to the worker (e.g., after UPDATE_MEM), we will send them to the client

[Spice-devel] [PATCH 1/2] server: removing local cursor, this solves RHBZ #714801

2011-07-04 Thread Yonit Halperin
When the worker was stoped, the cursor was copied from guest ram to the host ram, and its corresponding qxl command was released. This is unecessary, since the qxl ram still exists (we keep references to the surfaces in the same manner). It also led to BSOD on guest upon migration: the device

[Spice-devel] [PATCH 2/2] server: replace redundant code with red_cursor_reset

2011-07-04 Thread Yonit Halperin
In addition (1) make handle_dev_destroy_surfaces call red_release_cursor (2) call red_wait_outgoing_item(cursor_channel) only after adding msgs to pipe --- server/red_worker.c | 71 +- 1 files changed, 24 insertions(+), 47 deletions(-) diff --git

[Spice-devel] bad primary surface and server crash after migration

2011-07-04 Thread Yonit Halperin
Hi Gerd, I encountered several problems after migration, maybe you can help: 1) on qxl_pre_load, sometimes the command ring is not empty and when handle_dev_destroy_surface (on hard reset), flush_all_qxl_commands is called. When attempting to process a command we receive id 0, group 0, virt

Re: [Spice-devel] bad primary surface and server crash after migration

2011-07-04 Thread Yonit Halperin
On 07/04/2011 11:54 AM, Yonit Halperin wrote: Hi Gerd, I encountered several problems after migration, maybe you can help: 1) on qxl_pre_load, sometimes the command ring is not empty and when handle_dev_destroy_surface (on hard reset), flush_all_qxl_commands is called. When attempting

Re: [Spice-devel] bad primary surface and server crash after migration

2011-07-04 Thread Yonit Halperin
On 07/04/2011 12:23 PM, Gerd Hoffmann wrote: On 07/04/11 10:51, Yonit Halperin wrote: Hi Gerd, I encountered several problems after migration, maybe you can help: 1) on qxl_pre_load, sometimes the command ring is not empty and when handle_dev_destroy_surface (on hard reset

[Spice-devel] [PATCH] qxl: make sure primary surface is saved on migration

2011-07-04 Thread Yonit Halperin
--- hw/qxl.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 2bb36c6..9fdeffb 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1165,11 +1165,14 @@ static void qxl_vm_change_state_handler(void *opaque, int running, int reason)

[Spice-devel] [PATCHv2] qxl: make sure primary surface is saved on migration

2011-07-04 Thread Yonit Halperin
--- hw/qxl.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 2bb36c6..cff95a4 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1165,11 +1165,14 @@ static void qxl_vm_change_state_handler(void *opaque, int running, int reason)

[Spice-devel] [PATCHv3] qxl: make sure primary surface is saved on migration

2011-07-04 Thread Yonit Halperin
--- hw/qxl.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 2bb36c6..b3a3507 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1165,11 +1165,14 @@ static void qxl_vm_change_state_handler(void *opaque, int running, int reason)

[Spice-devel] [PATCH] server: not reading command rings before RED_WORKER_MESSAGE_START, RHBZ #718713

2011-07-04 Thread Yonit Halperin
On migration, destroy_surfaces is called from qxl (qxl_hard_reset), before the device was loaded (on destination). handle_dev_destroy_surfaces led to red_process_commands, which read the qxl command ring (which appeared to be not empty), and then when processing the command it accessed unmapped

[Spice-devel] [PATCH 1/2] server: display_channel: releasing pipe items resources when the pipe is cleared (on disconnect)

2011-07-05 Thread Yonit Halperin
fixes display_channel_release_item: panic: invalid item type Before changing the red_worker to use the red_channel interface, there was a devoted red_pipe_clear routine for the display channel and cursor channel. However, clearing the pipe in red_channel, uses the release_item callback the worker

[Spice-devel] [PATCH 2/2] server: cursor_channel: releasing pipe items resources when the pipe is cleared (on disconnect)

2011-07-05 Thread Yonit Halperin
same as commit 74a9d10af96f4d7c8c1b1d7fca124a8df9180787 for cursor channel --- server/red_worker.c | 43 ++- 1 files changed, 34 insertions(+), 9 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index fc4326c..8e8ec13 100644 ---

Re: [Spice-devel] [PATCH] server: fix segfault if no migrate_info provided

2011-07-05 Thread Yonit Halperin
On 07/05/2011 03:22 PM, Alon Levy wrote: On Mon, Jun 20, 2011 at 10:57:58AM +0200, Alon Levy wrote: ping? qemu calls spice_server_migrate_switch even if it didn't do a spice_server_migrate_info first. Fix the resulting error by not pushing a switch host tag to the pipe in this case, and add a

Re: [Spice-devel] [PATCH v2] server: add async io support

2011-07-07 Thread Yonit Halperin
On 07/06/2011 08:37 PM, Alon Levy wrote: The new _ASYNC io's in qxl_dev listed at the end get six new api functions, and an additional callback function async_complete. When the async version of a specific io is used, completion is notified by calling async_complete, and no READY message is

Re: [Spice-devel] [PATCH v2] server: add async io support

2011-07-07 Thread Yonit Halperin
On 07/06/2011 08:37 PM, Alon Levy wrote: The new _ASYNC io's in qxl_dev listed at the end get six new api functions, and an additional callback function async_complete. When the async version of a specific io is used, completion is notified by calling async_complete, and no READY message is

Re: [Spice-devel] [PATCH v2] server: add QXLWorker.flush_surfaces_async for S3/S4 support

2011-07-07 Thread Yonit Halperin
On 07/06/2011 08:37 PM, Alon Levy wrote: This does three things: flush both command rings stop (rendering everything) start Pulled out start and stop to their own functions to do this easily. The added api is specifically async, i.e. it calls async_complete when done. Hi, after flushing

Re: [Spice-devel] [PATCH qxl-win v3] display/surface: add surfaces from/to ram

2011-07-07 Thread Yonit Halperin
Hi, Generally, when parameters of a function are divided into several lines, they should be aligned to the same column. On 07/07/2011 12:43 PM, Alon Levy wrote: Adds fields to SurfaceInfo to cache data previously only available via SurfaceArea::draw_area. Adds two functions to save and

Re: [Spice-devel] [PATCH qxl-win v3] display/surface: add DEVICE_BITMAP_ALLOCATION_TYPE_RAM, cleanup surface alloc/free code paths

2011-07-07 Thread Yonit Halperin
On 07/07/2011 12:43 PM, Alon Levy wrote: This adds a third surface allocation type, allocation from guest memory using the windows ddk allocator. Not all code paths are used later - the creation is not done since copy-surfaces-to-ram allocates memory itself, and at the end we never allocate any

Re: [Spice-devel] [PATCH qxl-win v3] display/*: add PDev-enabled

2011-07-07 Thread Yonit Halperin
On 07/07/2011 12:43 PM, Alon Levy wrote: GDI will continue using any callback we registered even after a DrvAssertMode(FALSE). We are expected to move any surface we own to GDI handled and ignore any new requests to create a surface. This is called punting and we use PDev-enabled to indicate if

Re: [Spice-devel] [PATCH qxl-win v3] display/driver: reimplement DrvAssertMode for Suspend+Hibernate (S3+S4) support

2011-07-07 Thread Yonit Halperin
Hi, I forgot some more things about this patch: On 07/07/2011 05:00 PM, Yonit Halperin wrote: +static BOOL AssertModeDisable(PDev *pdev) +{ + DEBUG_PRINT((pdev, 3, %s entry\n, __FUNCTION__)); + /* flush command ring and update all surfaces */ + WRITE_PORT_UCHAR(pdev-notify_cmd_port, 0

Re: [Spice-devel] [PATCH qxl-win v3] display: add FlushRelease and FlushSurfaces for alternative V06 (2) revision implementation

2011-07-09 Thread Yonit Halperin
On 07/07/2011 12:43 PM, Alon Levy wrote: --- display/driver.c | 44 ++-- 1 files changed, 42 insertions(+), 2 deletions(-) diff --git a/display/driver.c b/display/driver.c index fff462d..e77e32f 100644 --- a/display/driver.c +++ b/display/driver.c @@

Re: [Spice-devel] [PATCH v3] server: add QXLWorker.flush_surfaces_async for S3/S4 support

2011-07-10 Thread Yonit Halperin
On 07/07/2011 07:33 PM, Alon Levy wrote: This does three things: flush both command rings stop (rendering everything) start Hi, just need to update the message :) Pulled out start and stop to their own functions to do this easily. The added api is specifically async, i.e. it calls

Re: [Spice-devel] [PATCH v3] server: add QXLInterface::surface_updated callback

2011-07-10 Thread Yonit Halperin
On 07/07/2011 07:33 PM, Alon Levy wrote: used to move dirty rectangle notification from update_area to surface_updated. This is RfC quality. Specifically where to call surface_updated. Currently I only call it from stop. This should be good enough for migration, which is the only use case I

Re: [Spice-devel] bad primary surface and server crash after migration

2011-07-10 Thread Yonit Halperin
On 07/04/2011 12:23 PM, Gerd Hoffmann wrote: On 07/04/11 10:51, Yonit Halperin wrote: Hi Gerd, I encountered several problems after migration, maybe you can help: 1) on qxl_pre_load, sometimes the command ring is not empty and when handle_dev_destroy_surface (on hard reset

Re: [Spice-devel] RFC: Render support in the protocol

2011-07-10 Thread Yonit Halperin
On 07/06/2011 04:38 PM, Soeren Sandmann wrote: RENDER is a very commonly used X extension that currently is not supported very well in SPICE. This leads to the QXL X driver having to read back pixels from the device, render in software, then transmit an image. This is currently the biggest

[Spice-devel] [PATCH v2 0/2] Fix unsafe access to a drawable

2011-07-12 Thread Yonit Halperin
Hi, This version is more efficient since it removes the other_drawable from the tree before red_handle_drawable_surfaces_client_synced is called. In this manner, other_drawable won't be unnecessarily rendered if update_area is called. Yonit Halperin (2): server: fix access to a released

  1   2   3   4   5   6   7   8   >