On 02/14/2012 10:35 AM, Gerd Hoffmann wrote:
On 02/14/12 09:10, Yonit Halperin wrote:
RHBZ #790083
Signed-off-by: Yonit Halperin<address@hidden>
You are doing two things in one patch: (a) fix the compat mode bug,
which also matches the patch description, and (b) skip vram when it is
unused (in compat mode).
I'd love to see (b) done in a different way: simply walk all surfaces
and tag them dirty. Will have the same effect for compat mode (no
surfaces used -> nothing tagged dirty) and additionally it will (in
native mode) only migrate over the vram areas which are actually filled
with surfaces.
I can do it, by retrieving the surfaces addresses from the tracked guest
commands. However, if we already do it, it would be even better if we
just dirty only the areas that are actually modified by the update_area
calls. The problem is that (1) spice-server updates surfaces also
without request from driver. We can add a cb to the interface or use the
async_complete cb with a special flag (2) async_complete cb is called
from spice server context. We can add a pipe for update_area dirty
events, and make sure that it is handled, before migration moves from
the live stage.